{"record":{"id":"97ef2b81bdb8e5fc","repo":"Hmbown/CodeWhale","slug":"overlay-is-stale-run-cli-command-update-befor-97ef2b","errorCode":null,"errorMessage":"overlay is stale; run `{CLI_COMMAND} update` before install-bundle","messagePattern":"overlay is stale; run `(.+?) update` before install-bundle","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/integrations/dsh/mod.rs","lineNumber":734,"sourceCode":"    app: DshAppBundle,\n) -> Result<DshBundleRecord> {\n    let pnpm_version = match availability {\n        BundleAvailability::Available { pnpm_version } => pnpm_version.clone(),\n        BundleAvailability::NotAvailable { reason } => {\n            anyhow::bail!(\"DSH plugin path not available: {reason}\")\n        }\n    };\n    let mut doc = DshReceiptDocument::load(&paths.receipt)?;\n    let Some(mut record) = doc.current.take() else {\n        anyhow::bail!(\"DSH is not connected; run `{CLI_COMMAND} connect` first\");\n    };\n    if record.bundle.is_some() {\n        anyhow::bail!(\"bundle already installed; use `{CLI_COMMAND} update` or `remove-bundle`\");\n    }\n    let overlay_text = std::fs::read_to_string(&paths.overlay)\n        .with_context(|| format!(\"read {}\", paths.overlay.display()))?;\n    if sha256_hex(overlay_text.as_bytes()) != record.overlay_sha256 {\n        anyhow::bail!(\"overlay is stale; run `{CLI_COMMAND} update` before install-bundle\");\n    }\n    let patch_sha = bundle::write_bundle(&paths.bundle_dir, &codewhale_version(), &overlay_text)?;\n    let (app_source, outcomes) =\n        match bundle::install_into_profile(runner, detection, app, &paths.bundle_dir) {\n            Ok(ok) => ok,\n            Err(error) => {\n                // Leave DSH state as dsh left it; drop our half-written package.\n                let _ = bundle::remove_bundle_files(&paths.bundle_dir);\n                return Err(error);\n            }\n        };\n    let now = now_rfc3339();\n    let mut digest_input = String::new();\n    for outcome in &outcomes {\n        digest_input.push_str(&outcome.output_sha256);\n        digest_input.push('\\n');\n    }\n    let bundle_record = DshBundleRecord {","sourceCodeStart":716,"sourceCodeEnd":752,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/integrations/dsh/mod.rs#L716-L752","documentation":"Error \"overlay is stale; run `{CLI_COMMAND} update` before install-bundle\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/tui/src/integrations/dsh/mod.rs:734 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}