Hmbown/CodeWhale · error · anyhow::Error

The installer did not report the destination path.

Error message

The installer did not report the destination path.

What it means

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.

Solutions

  1. List the plugins directory / plugin registry and remove the partially installed plugin by hand.
  2. Re-run the plugin install to get a clean, verified state.
  3. Check disk space and network stability if the install was interrupted.
  4. Report as a bug with logs - the installer must always report its destination for rollback to work.
Defensive patterns

Strategy: fallback

Validate before calling

// Rust: after install, confirm a destination was reported before trusting rollback
let installed = install_plugin(name)?;
anyhow::ensure!(
    installed.path.is_some(),
    "installer reported no destination; automatic rollback unavailable"
);

Try / catch

// Rust: manual cleanup fallback when rollback lacks a path
Err(err) if err.to_string().contains("did not report the destination path") => {
    manual_plugin_cleanup(name).await?; // remove by hand from the plugins dir
    Err(err.context("hash mismatch; plugin removed manually"))
}

Prevention

When it happens

Trigger: 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.

Common situations: Interrupted plugin installs (disk full, network drop); corrupted downloads failing hash; version skew between installer stages.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/3e032c3949bd7039. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/commands/groups/plugins/mod.rs:572

            other => CommandResult::error(format!("Unexpected install outcome: {other:?}")),
        },
        Err(error) => action_error(app, &format!("Plugin install failed: {error:#}")),
    }
}

fn rollback_hash_mismatch(
    app: &mut App,
    name: &str,
    installed_path: Option<&std::path::Path>,
    expected: &str,
    actual: Option<&str>,
) -> CommandResult {
    let locale = app.ui_locale;
    let missing_destination =
        tr(locale, MessageId::PluginKimiRollbackDestinationMissing).into_owned();
    let rollback = installed_path
        .and_then(std::path::Path::parent)
        .ok_or_else(|| anyhow::anyhow!(missing_destination))
        .and_then(|plugins_dir| crate::plugins::install::uninstall(name, plugins_dir));
    app.plugin_registry = app.plugin_registry.rediscover_for_workspace(&app.workspace);
    app.refresh_skill_cache();
    let actual = actual
        .map(escape_review_text)
        .unwrap_or_else(|| tr(locale, MessageId::PluginKimiHashUnavailable).into_owned());
    let name = escape_review_text(name);
    let expected = escape_review_text(expected);
    match rollback {
        Ok(()) => CommandResult::error(
            tr(locale, MessageId::PluginKimiMismatchRemoved)
                .replace("{name}", &name)
                .replace("{expected}", &expected)
                .replace("{actual}", &actual),
        ),
        Err(error) => CommandResult {
            message: Some(
                tr(locale, MessageId::PluginKimiMismatchRollbackFailed)

View on GitHub (pinned to 0c42157ee5)