astrid-runtime/astrid · error
durable capsule authority bytes do not match materialization
Error message
durable capsule authority bytes do not match materialization
What it means
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.
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
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/astrid-kernel/src/capsule_materialization.rs:51 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/52d1131fdd88b06d.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-kernel/src/capsule_materialization.rs:51
if verified.manifest().package.name != manifest.package.name
|| verified.manifest().package.version != manifest.package.version
{
anyhow::bail!("materialized capsule manifest differs from durable registry");
}
let manifest_bytes = Self::read_projection_file_nofollow(&dir.join("Capsule.toml"))
.map_err(|error| anyhow::anyhow!("read materialized capsule manifest: {error:#}"))?;
if manifest_bytes != verified.manifest_bytes() {
anyhow::bail!("durable capsule manifest bytes do not match materialization");
}
let metadata_bytes = Self::read_projection_file_nofollow(&dir.join("meta.json"))
.map_err(|error| anyhow::anyhow!("read materialized capsule metadata: {error:#}"))?;
if metadata_bytes != verified.metadata_bytes() {
anyhow::bail!("durable capsule metadata does not match materialization");
}
let authority_bytes = Self::read_projection_file_nofollow(&dir.join("authority.json"))
.map_err(|error| anyhow::anyhow!("read materialized capsule authority: {error:#}"))?;
if authority_bytes != verified.snapshot().package().authority {
anyhow::bail!("durable capsule authority bytes do not match materialization");
}
let mut expected_files = verified
.archive_entries()
.map(|(path, bytes)| (path.to_owned(), bytes.to_vec()))
.collect::<std::collections::BTreeMap<_, _>>();
expected_files.insert(
"Capsule.toml".to_owned(),
verified.manifest_bytes().to_vec(),
);
expected_files.insert("meta.json".to_owned(), verified.metadata_bytes().to_vec());
expected_files.insert(
"authority.json".to_owned(),
verified.snapshot().package().authority.clone(),
);
let actual = Self::inventory_projection_files(dir)?;
if actual.files
!= expected_files
.keys()View on GitHub (pinned to affd8760f4)