{"record":{"id":"443430687154bdbc","repo":"Hmbown/CodeWhale","slug":"owned-skill-anchor-does-not-exist","errorCode":null,"errorMessage":"owned skill anchor {} does not exist","messagePattern":"owned skill anchor (.+?) does not exist","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/skills/mutation.rs","lineNumber":182,"sourceCode":"/// Validate the complete owned-root chain without following a symlink in the\n/// workspace/home anchor, `.codewhale`, or `skills` component.\nfn validate_owned_target_chain(\n    anchor: &Path,\n    skills_dir: &Path,\n    require_existing: bool,\n) -> Result<()> {\n    let expected = anchor.join(\".codewhale\").join(\"skills\");\n    if skills_dir != expected {\n        bail!(\n            \"refusing to mutate non-canonical CodeWhale skills root {}\",\n            skills_dir.display()\n        );\n    }\n\n    let anchor_exists = checked_real_directory(anchor)?;\n    if !anchor_exists {\n        if require_existing {\n            bail!(\"owned skill anchor {} does not exist\", anchor.display());\n        }\n        return Ok(());\n    }\n\n    let codewhale_dir = anchor.join(\".codewhale\");\n    let codewhale_exists = checked_real_directory(&codewhale_dir)?;\n    if !codewhale_exists {\n        if require_existing {\n            bail!(\n                \"owned skill parent {} does not exist\",\n                codewhale_dir.display()\n            );\n        }\n        return Ok(());\n    }\n\n    let skills_exists = checked_real_directory(skills_dir)?;\n    if !skills_exists {","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/skills/mutation.rs#L164-L200","documentation":"In validate_owned_target_chain the workspace/home anchor itself does not exist as a real directory while require_existing is true. This fires for mutations (update/remove/trust) that presuppose an already-initialized skills root: if the anchor directory is gone, the audited state is stale and the mutation cannot proceed safely. The missing anchor path is the input at fault; with require_existing=false this same condition is tolerated.","triggerScenarios":"Thrown at crates/tui/src/skills/mutation.rs:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Recreate the workspace or home directory expected as the anchor","Re-run a skills scan/audit so descriptors reflect the missing root","Install the skill first if the owned roots were never initialized"],"exampleFix":null,"handlingStrategy":"validation","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"}