{"record":{"id":"bbf04c19bccbbe53","repo":"Hmbown/CodeWhale","slug":"skill-name-has-unknown-package-digest-refusin","errorCode":null,"errorMessage":"skill '{name}' has unknown package digest; refusing mutation","messagePattern":"skill '(.+?)' has unknown package digest; refusing mutation","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/skills/mutation.rs","lineNumber":502,"sourceCode":"                ctx.home,\n                ctx.configured_skills_dir,\n                SkillAuditMode::Compatible,\n                None,\n            );\n            if compatible.skills.iter().any(|s| {\n                s.id.canonical_name == canonical\n                    && s.source_kind == SkillSourceKind::CompatibleExternal\n            }) {\n                bail!(\n                    \"skill '{name}' exists only in a compatible external root; \\\n                     import it with /skills (refusing to write external harness directories)\"\n                );\n            }\n            bail!(\"skill '{name}' not found in Codewhale-owned project/global roots\");\n        }\n        [only] => {\n            let DigestState::Known(digest) = &only.digest else {\n                bail!(\"skill '{name}' has unknown package digest; refusing mutation\");\n            };\n            Ok(ResolvedOwnedSkill {\n                id: only.id.clone(),\n                digest: digest.clone(),\n            })\n        }\n        _ => bail!(\n            \"skill '{name}' exists in both project and global Codewhale roots; \\\n             specify --project or --global\"\n        ),\n    }\n}\n\nfn find_audited_skill(\n    ctx: &MutationContext<'_>,\n    skill_id: &AuditedSkillId,\n) -> Result<(AuditedSkill, PathBuf)> {\n    let snap = scan_with_configured(","sourceCodeStart":484,"sourceCodeEnd":520,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/skills/mutation.rs#L484-L520","documentation":"Every mutation of an owned skill requires a known content digest so the library can verify the package has not changed since it was audited. When the catalog's DigestState for the matched skill is not Known (digest computation failed, was never recorded, or the package is in an unreadable state), the resolver refuses to proceed rather than mutating unverified content.","triggerScenarios":"execute/execute_sync with a name-based request where exactly one owned-root skill matches the name but its digest state is DigestState other than Known — e.g. the package directory is unreadable, digest computation previously errored, or the catalog entry predates digest tracking.","commonSituations":"A partially-written or corrupted skill package; a skill directory created by hand rather than via import; permission problems preventing the digest from being computed; a catalog cache written by an older version without digests.","solutions":["Re-list/re-scan the catalog so digests are recomputed, then retry the mutation","Fix read permissions on the skill package directory so the digest can be computed","Re-import the skill into the owned root to rebuild a complete, digested package entry","Remove the broken package and install it fresh"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"fn digest_is_known(catalog: &SkillCatalog, name: &str) -> bool {\n    matches!(catalog.digest_state_for(name), Some(DigestState::Known(_)))\n}","typeGuard":"fn known_digest(state: &DigestState) -> Option<&str> {\n    match state { DigestState::Known(d) => Some(d), _ => None }\n}","tryCatchPattern":"if !digest_is_known(&catalog, name) {\n    catalog.rescan()?; // force digest recomputation before mutating\n}","preventionTips":["Re-scan the catalog after any change to skill package directories","Fix read permissions on skill packages so digests can be computed","Re-import hand-created or partially written skill packages to establish a valid digest"],"tags":["skills","digest","integrity","catalog"],"backgroundTag":"checksum-mismatch","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}