{"record":{"id":"0eb0dd4fd97d1345","repo":"Hmbown/CodeWhale","slug":"staged-plugin-manifest-failed-validation-error","errorCode":null,"errorMessage":"staged plugin manifest failed validation: {error}","messagePattern":"staged plugin manifest failed validation: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/plugins/install/stage.rs","lineNumber":76,"sourceCode":"\n#[cfg(not(unix))]\nfn ensure_plugins_dir(user_plugins_dir: &Path) -> Result<()> {\n    fs::create_dir_all(user_plugins_dir).with_context(|| {\n        format!(\n            \"failed to create user plugins directory {}\",\n            user_plugins_dir.display()\n        )\n    })\n}\n\n/// Validate the staged tree and return the manifest name + content hash.\npub(super) fn validate_staged(staged_path: &Path) -> Result<(String, String)> {\n    let manifest_path = crate::plugins::agent_plugin::resolve_manifest_path(staged_path)\n        .ok_or_else(|| {\n            anyhow::anyhow!(\"staged bundle has no plugin.json, kimi.plugin.json, or plugin.toml\")\n        })?;\n    let validated = PluginManifest::validate_from_path(&manifest_path)\n        .map_err(|error| anyhow::anyhow!(\"staged plugin manifest failed validation: {error}\"))?;\n    let name = validated.manifest.plugin.name.clone();\n    validate_skill_name_segment(&name).map_err(|error| {\n        anyhow::anyhow!(\"[plugin].name is not a safe directory name: {error:#}\")\n    })?;\n    Ok((name, validated.content_hash))\n}\n\n/// Copy a local bundle directory into staging. Symlinks anywhere in the\n/// source are rejected; a stale `.installed-from` marker is never copied so\n/// provenance always reflects *this* install.\npub(super) fn stage_local_copy(\n    source: &Path,\n    user_plugins_dir: &Path,\n    max_size: u64,\n) -> Result<StagedPlugin> {\n    // Validate the source first; this also rejects symlinked roots/manifests.\n    let manifest_path =\n        crate::plugins::agent_plugin::resolve_manifest_path(source).ok_or_else(|| {","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/plugins/install/stage.rs#L58-L94","documentation":"Error \"staged plugin manifest failed validation: {error}\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/tui/src/plugins/install/stage.rs:76 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"}