{"record":{"id":"3e032c3949bd7039","repo":"Hmbown/CodeWhale","slug":"the-installer-did-not-report-the-destination-path","errorCode":null,"errorMessage":"The installer did not report the destination path.","messagePattern":"The installer did not report the destination path\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/commands/groups/plugins/mod.rs","lineNumber":572,"sourceCode":"            other => CommandResult::error(format!(\"Unexpected install outcome: {other:?}\")),\n        },\n        Err(error) => action_error(app, &format!(\"Plugin install failed: {error:#}\")),\n    }\n}\n\nfn rollback_hash_mismatch(\n    app: &mut App,\n    name: &str,\n    installed_path: Option<&std::path::Path>,\n    expected: &str,\n    actual: Option<&str>,\n) -> CommandResult {\n    let locale = app.ui_locale;\n    let missing_destination =\n        tr(locale, MessageId::PluginKimiRollbackDestinationMissing).into_owned();\n    let rollback = installed_path\n        .and_then(std::path::Path::parent)\n        .ok_or_else(|| anyhow::anyhow!(missing_destination))\n        .and_then(|plugins_dir| crate::plugins::install::uninstall(name, plugins_dir));\n    app.plugin_registry = app.plugin_registry.rediscover_for_workspace(&app.workspace);\n    app.refresh_skill_cache();\n    let actual = actual\n        .map(escape_review_text)\n        .unwrap_or_else(|| tr(locale, MessageId::PluginKimiHashUnavailable).into_owned());\n    let name = escape_review_text(name);\n    let expected = escape_review_text(expected);\n    match rollback {\n        Ok(()) => CommandResult::error(\n            tr(locale, MessageId::PluginKimiMismatchRemoved)\n                .replace(\"{name}\", &name)\n                .replace(\"{expected}\", &expected)\n                .replace(\"{actual}\", &actual),\n        ),\n        Err(error) => CommandResult {\n            message: Some(\n                tr(locale, MessageId::PluginKimiMismatchRollbackFailed)","sourceCodeStart":554,"sourceCodeEnd":590,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/commands/groups/plugins/mod.rs#L554-L590","documentation":"rollback_hash_mismatch runs when a plugin install fails its post-install hash verification: it uninstalls the just-written plugin by taking the parent directory of the destination path the installer reported. If the installer never reported a destination (installed_path is None), the rollback cannot locate the plugins directory and fails with this localized message; the hash-mismatch outcome is then reported without automatic cleanup.","triggerScenarios":"The plugin install pipeline aborts before recording its extraction path (early IO failure, interrupted download, Ctrl-C mid-extract) and the hash check then finds a mismatch; a partial install leaves files behind with no path metadata; an invariant break between installer stages.","commonSituations":"Interrupted plugin installs (disk full, network drop); corrupted downloads failing hash; version skew between installer stages.","solutions":["List the plugins directory / plugin registry and remove the partially installed plugin by hand.","Re-run the plugin install to get a clean, verified state.","Check disk space and network stability if the install was interrupted.","Report as a bug with logs - the installer must always report its destination for rollback to work."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Rust: after install, confirm a destination was reported before trusting rollback\nlet installed = install_plugin(name)?;\nanyhow::ensure!(\n    installed.path.is_some(),\n    \"installer reported no destination; automatic rollback unavailable\"\n);\n","typeGuard":null,"tryCatchPattern":"// Rust: manual cleanup fallback when rollback lacks a path\nErr(err) if err.to_string().contains(\"did not report the destination path\") => {\n    manual_plugin_cleanup(name).await?; // remove by hand from the plugins dir\n    Err(err.context(\"hash mismatch; plugin removed manually\"))\n}\n","preventionTips":["After any failed plugin install, list the plugins directory to spot partial extractions.","Avoid interrupting installs mid-extraction (Ctrl-C, disk-full).","Re-run install after cleanup so the registry and directory agree."],"tags":["plugins","install","rollback","hash-mismatch","kimi"],"backgroundTag":"failed-install-rollback","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}