{"record":{"id":"24be0cf214361499","repo":"astrid-runtime/astrid","slug":"durable-capsule-manifest-bytes-do-not-match-materi","errorCode":null,"errorMessage":"durable capsule manifest bytes do not match materialization","messagePattern":"durable capsule manifest bytes do not match materialization","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-kernel/src/capsule_materialization.rs","lineNumber":41,"sourceCode":"            self.principal_store\n                .as_ref()\n                .ok_or_else(|| anyhow::anyhow!(\"durable capsule registry is unavailable\"))?,\n            &astrid_storage::StateOwner::Principal(uid),\n            manifest.package.name.as_str(),\n        )?\n        .ok_or_else(|| anyhow::anyhow!(\"materialized capsule is absent from durable registry\"))?;\n        if verified.snapshot() != snapshot {\n            anyhow::bail!(\"materialized capsule snapshot differs from the caller's publication\");\n        }\n        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(),","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-kernel/src/capsule_materialization.rs#L23-L59","documentation":"Byte-level integrity check in verify_published_materialization: the Capsule.toml bytes in the materialized directory differ from the manifest bytes stored in the durable registry, so the projection file was altered or corrupted after publication.","triggerScenarios":"Thrown at crates/astrid-kernel/src/capsule_materialization.rs:41 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-materialize the capsule from the durable package","Treat the cache directory as suspect; repair via repair_published_materialization","Investigate what rewrote Capsule.toml in the cache"],"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"}