{"record":{"id":"52d1131fdd88b06d","repo":"astrid-runtime/astrid","slug":"durable-capsule-authority-bytes-do-not-match-mater","errorCode":null,"errorMessage":"durable capsule authority bytes do not match materialization","messagePattern":"durable capsule authority bytes do not match materialization","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-kernel/src/capsule_materialization.rs","lineNumber":51,"sourceCode":"        if verified.manifest().package.name != manifest.package.name\n            || verified.manifest().package.version != manifest.package.version\n        {\n            anyhow::bail!(\"materialized capsule manifest differs from durable registry\");\n        }\n        let manifest_bytes = Self::read_projection_file_nofollow(&dir.join(\"Capsule.toml\"))\n            .map_err(|error| anyhow::anyhow!(\"read materialized capsule manifest: {error:#}\"))?;\n        if manifest_bytes != verified.manifest_bytes() {\n            anyhow::bail!(\"durable capsule manifest bytes do not match materialization\");\n        }\n        let metadata_bytes = Self::read_projection_file_nofollow(&dir.join(\"meta.json\"))\n            .map_err(|error| anyhow::anyhow!(\"read materialized capsule metadata: {error:#}\"))?;\n        if metadata_bytes != verified.metadata_bytes() {\n            anyhow::bail!(\"durable capsule metadata does not match materialization\");\n        }\n        let authority_bytes = Self::read_projection_file_nofollow(&dir.join(\"authority.json\"))\n            .map_err(|error| anyhow::anyhow!(\"read materialized capsule authority: {error:#}\"))?;\n        if authority_bytes != verified.snapshot().package().authority {\n            anyhow::bail!(\"durable capsule authority bytes do not match materialization\");\n        }\n        let mut expected_files = verified\n            .archive_entries()\n            .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()","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-kernel/src/capsule_materialization.rs#L33-L69","documentation":"Byte-level integrity check in verify_published_materialization: authority.json in the materialized directory differs from the authority recorded in the durable snapshot, so the cached authority material is not the one that was verified at publish time.","triggerScenarios":"Thrown at crates/astrid-kernel/src/capsule_materialization.rs:51 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-materialize the capsule so authority.json matches the durable package","Do not run the capsule until repaired — authority mismatch implies tampering risk","Check for symlink or no-follow violations in the projection 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"}