astrid-runtime/astrid · error
durable capsule manifest bytes do not match materialization
Error message
durable capsule manifest bytes do not match materialization
What it means
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.
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
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at crates/astrid-kernel/src/capsule_materialization.rs:41 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/24be0cf214361499.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-kernel/src/capsule_materialization.rs:41
self.principal_store
.as_ref()
.ok_or_else(|| anyhow::anyhow!("durable capsule registry is unavailable"))?,
&astrid_storage::StateOwner::Principal(uid),
manifest.package.name.as_str(),
)?
.ok_or_else(|| anyhow::anyhow!("materialized capsule is absent from durable registry"))?;
if verified.snapshot() != snapshot {
anyhow::bail!("materialized capsule snapshot differs from the caller's publication");
}
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(),View on GitHub (pinned to affd8760f4)