Hmbown/CodeWhale · error · anyhow::Error
refusing to update skill outside CodeWhale-owned roots
Error message
refusing to update skill outside CodeWhale-owned roots
What it means
Raised in update_skill when the audited skill's root is not a writable CodeWhale-owned root. Updates are only permitted on directories the tool owns and controls (project or user skill roots under its management); a skill discovered from a foreign or read-only location cannot be updated in place.
Source
Thrown at crates/tui/src/skills/mutation.rs:864
copy_dir_regular_files(&path, &target)?;
} else if meta.is_file() {
if name_str.starts_with('.') {
continue;
}
fs::copy(&path, &target)?;
}
}
Ok(())
}
async fn update_skill(
skill_id: AuditedSkillId,
expected_digest: Option<String>,
ctx: &MutationContext<'_>,
) -> Result<SkillMutationReceipt> {
let (skill, path) = find_audited_skill(ctx, &skill_id)?;
if !skill.root.is_writable_owned() {
bail!("refusing to update skill outside CodeWhale-owned roots");
}
if skill.source_kind != SkillSourceKind::CodeWhaleManaged {
bail!("only CodeWhale managed skills can be updated");
}
let skills_dir = validate_owned_skill_path(ctx, &skill, &path)?;
// Imported skills carry `import:…` provenance and must not hit the registry.
ensure_remote_updatable(&path)?;
let before = verify_expected_digest(&path, expected_digest.as_deref())?;
let scope = match skill.root.kind {
SkillRootKind::CodeWhaleProject => SkillScope::Project,
SkillRootKind::CodeWhaleGlobal => SkillScope::Global,
_ => SkillScope::Logical,
};
let package_name = on_disk_package_name(&skill_id)?;
validate_owned_skill_path(ctx, &skill, &path)?;
let outcome = install::update_with_registry(
package_name,View on GitHub (pinned to 0c42157ee5)
Solutions
- Only call update on skills whose root kind is a CodeWhale-owned scope
- Import the skill into an owned scope first, then update the imported copy
- Edit the external skill at its own source with its own tooling
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/skills/mutation.rs:864 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/123ebd76b3b77e10.
Report an issue: GitHub.