Hmbown/CodeWhale · error · anyhow::Error
owned skill path {} escapes direct root {}
Error message
owned skill path {} escapes direct root {} What it means
Defense-in-depth check in validate_owned_child: after canonicalizing both the skills root and the child, the child's real parent is no longer the real root. Some symlink inside the package directory redirects it outside the owned root, so mutating it would write elsewhere; the canonicalized child escaping the canonicalized root is the fault condition.
Source
Thrown at crates/tui/src/skills/mutation.rs:318
}
let exists = checked_real_directory(child)?;
if !exists {
if require_existing {
bail!("owned skill path {} does not exist", child.display());
}
return Ok(false);
}
let canonical_root = fs::canonicalize(skills_dir).with_context(|| {
format!(
"failed to resolve owned skill root {}",
skills_dir.display()
)
})?;
let canonical_child = fs::canonicalize(child)
.with_context(|| format!("failed to resolve owned skill path {}", child.display()))?;
if canonical_child.parent() != Some(canonical_root.as_path()) {
bail!(
"owned skill path {} escapes direct root {}",
child.display(),
skills_dir.display()
);
}
Ok(true)
}
fn validate_owned_skill_path(
ctx: &MutationContext<'_>,
skill: &AuditedSkill,
path: &Path,
) -> Result<PathBuf> {
if skill.id.root_id != skill.root.id {
bail!("audited skill root identity changed; refusing mutation");
}
let skills_dir = validate_owned_root_descriptor(ctx, &skill.root)?;
let package_name = on_disk_package_name(&skill.id)?;View on GitHub (pinned to 0c42157ee5)
Solutions
- Inspect the skill package directory for symlinks and remove them
- Reinstall the skill so a clean, link-free package directory is created
- Re-scan skills after repairing the directory
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/skills/mutation.rs:318 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/5aa75bb6d8f40cfc.
Report an issue: GitHub.