{"record":{"id":"0664207b5d99d1ec","repo":"astrid-runtime/astrid","slug":"materialized-capsule-file-inventory-differs-from-d","errorCode":null,"errorMessage":"materialized capsule file inventory differs from durable package","messagePattern":"materialized capsule file inventory differs from durable package","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-kernel/src/capsule_materialization.rs","lineNumber":73,"sourceCode":"            .map(|(path, bytes)| (path.to_owned(), bytes.to_vec()))\n            .collect::<std::collections::BTreeMap<_, _>>();\n        expected_files.insert(\n            \"Capsule.toml\".to_owned(),\n            verified.manifest_bytes().to_vec(),\n        );\n        expected_files.insert(\"meta.json\".to_owned(), verified.metadata_bytes().to_vec());\n        expected_files.insert(\n            \"authority.json\".to_owned(),\n            verified.snapshot().package().authority.clone(),\n        );\n        let actual = Self::inventory_projection_files(dir)?;\n        if actual.files\n            != expected_files\n                .keys()\n                .cloned()\n                .collect::<std::collections::BTreeSet<_>>()\n        {\n            anyhow::bail!(\"materialized capsule file inventory differs from durable package\");\n        }\n        let mut expected_directories = expected_files\n            .keys()\n            .flat_map(|relative| authenticated_ancestor_directories(relative))\n            .collect::<std::collections::BTreeSet<_>>();\n        let archive_directories = verified\n            .archive_directories()\n            .map(ToOwned::to_owned)\n            .collect::<Vec<_>>();\n        expected_directories.extend(archive_directories.iter().cloned());\n        expected_directories.extend(\n            archive_directories\n                .iter()\n                .map(String::as_str)\n                .flat_map(authenticated_ancestor_directories),\n        );\n        if actual.directories != expected_directories {\n            anyhow::bail!(\"materialized capsule directory inventory differs from durable package\");","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-kernel/src/capsule_materialization.rs#L55-L91","documentation":"Whole-directory inventory check in verify_published_materialization: the set of files (and their bytes) in the materialized capsule directory differs from the expected inventory (package files plus Capsule.toml, meta.json, authority.json), indicating missing, extra, or modified files.","triggerScenarios":"Thrown at crates/astrid-kernel/src/capsule_materialization.rs:73 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-materialize the capsule from the durable package to rebuild the projection","Remove extra/unexpected files and re-verify","Investigate the writer that produced the divergent directory"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}