{"record":{"id":"138aef5dec35f4c2","repo":"jdx/mise","slug":"receipt-target-inventory-contains-an-unclassified","errorCode":null,"errorMessage":"receipt target inventory contains an unclassified path","messagePattern":"receipt target inventory contains an unclassified path","errorType":"validation","errorClass":"eyre::Report","httpStatus":null,"severity":"warning","filePath":"src/system/packages/brew/cask.rs","lineNumber":7286,"sourceCode":"        .apps\n        .iter()\n        .chain(&receipt.binaries)\n        .chain(&receipt.fonts)\n        .chain(&receipt.completions)\n        .cloned()\n        .collect::<BTreeSet<_>>();\n    if expected.is_empty()\n        || records.len() != receipt.targets.len()\n        || records.len() != expected.len()\n        || receipt\n            .metadata_only_apps\n            .iter()\n            .any(|path| !receipt.apps.contains(path))\n    {\n        bail!(\"receipt target inventory is incomplete or duplicated\");\n    }\n    if records.keys().any(|path| !expected.contains(path)) {\n        bail!(\"receipt target inventory contains an unclassified path\");\n    }\n\n    for path in &receipt.apps {\n        let record = records\n            .get(path)\n            .ok_or_else(|| eyre!(\"missing app target record\"))?;\n        if record.fingerprint.kind != CaskTargetKind::Directory\n            || !allowed_appdir_roots()?\n                .iter()\n                .any(|root| path_is_below(path, root))\n            || !path.file_name().is_some_and(|name| {\n                staged_app_matches_target(record, &candidate.version_dir.join(name))\n            })\n        {\n            bail!(\n                \"app target is outside an allowed Applications directory: {}\",\n                path.display()\n            );","sourceCodeStart":7268,"sourceCodeEnd":7304,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/system/packages/brew/cask.rs#L7268-L7304","documentation":"Every path in receipt.targets must be classifiable — it must appear in at least one of the receipt's apps/binaries/fonts/completions lists, because the validator applies per-kind rules (directory/symlink/file, allowed roots, staged-copy match). A target record whose path is in none of those lists is 'unclassified', and the prune is refused since the validator cannot decide which rule set applies.","triggerScenarios":"A receipt.targets entry whose path is absent from all classified lists — a corrupted receipt, a receipt mixing data from different mise versions, or a new artifact kind written by a newer mise that this validator does not know.","commonSituations":"Pruning casks installed by a newer mise version after downgrading; partially corrupted receipts after disk trouble or interrupted writes.","solutions":["Upgrade mise to at least the version that installed the cask (so new artifact kinds are classified) and retry the prune.","Reinstall the cask with the current mise so targets and classified lists are rewritten together.","Manually inspect `.mise-cask.toml` and repair/remove the stray target entry only if you understand the artifact."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Ensure every recorded target is classifiable before pruning\nlet classified: BTreeSet<_> = receipt.apps.iter().chain(&receipt.binaries).chain(&receipt.fonts).chain(&receipt.completions).collect();\nif receipt.targets.iter().any(|t| !classified.contains(&t.path)) {\n    // unknown artifact kind; skip prune, reinstall or upgrade mise\n}","typeGuard":null,"tryCatchPattern":"Catch the Err and add a CaskPruneSkip carrying the reason; recommend reinstalling the cask with the current mise version.","preventionTips":["Don't downgrade mise below the version that installed a cask and then prune it.","Reinstall casks after upgrades that add new artifact kinds."],"tags":["homebrew","cask","prune","receipt","validation"],"backgroundTag":"manifest-mismatch","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}