{"record":{"id":"d86fc6814309570a","repo":"Hmbown/CodeWhale","slug":"only-user-scope-bundles-installed-via-plugin-inst","errorCode":null,"errorMessage":"only user-scope bundles installed via /plugin install can be updated; `{selector}` is a {} bundle","messagePattern":"only user-scope bundles installed via /plugin install can be updated; `(.+?)` is a (.+?) bundle","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/plugins/mutation.rs","lineNumber":171,"sourceCode":"            installed_content_hash: Some(installed.installed_content_hash),\n            outcome: PluginMutationOutcome::Installed,\n        },\n        PluginInstallOutcome::NeedsApproval(host) => blocked(host, true),\n        PluginInstallOutcome::NetworkDenied(host) => blocked(host, false),\n    })\n}\n\nasync fn update_plugin(\n    selector: &str,\n    ctx: &PluginMutationContext<'_>,\n    registry: &mut PluginRegistry,\n) -> Result<PluginMutationReceipt> {\n    let plugin = registry\n        .get(selector)\n        .with_context(|| format!(\"Plugin bundle `{selector}` was not found\"))?\n        .clone();\n    if plugin.scope != PluginScope::User {\n        bail!(\n            \"only user-scope bundles installed via /plugin install can be updated; \\\n             `{selector}` is a {} bundle\",\n            plugin.scope.as_str()\n        );\n    }\n    let plugins_dir = user_plugins_dir(registry)?;\n    let outcome = install::update(plugin.name(), &plugins_dir, ctx.max_size, ctx.network).await?;\n    Ok(match outcome {\n        PluginUpdateResult::NoChange => PluginMutationReceipt {\n            name: plugin.name().to_string(),\n            path: None,\n            content_hash: None,\n            installed_content_hash: None,\n            outcome: PluginMutationOutcome::NoChange,\n        },\n        PluginUpdateResult::Updated(installed) => PluginMutationReceipt {\n            name: installed.name,\n            path: Some(installed.path),","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/plugins/mutation.rs#L153-L189","documentation":"update_plugin scope guard: mutation via this surface is restricted to user-scope bundles originally installed through /plugin install; the selected bundle belongs to another scope (built-in, workspace, etc. — shown in the placeholder). Those are managed in their own roots, so update is refused here.","triggerScenarios":"Thrown at crates/tui/src/plugins/mutation.rs:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Update the bundle in its own root/scope","Or install a user-scope copy via /plugin install and update that"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}