astrid-runtime/astrid · error
capsule manifest changed after authority decision
Error message
capsule manifest changed after authority decision
What it means
`authority_for_install_source` recomputes the digest of `Capsule.toml` (`digest_manifest`, a domain-separated blake3 hash) and compares it to `approved.manifest_digest`. This error is thrown when the manifest file's bytes changed after the authority decision — even if name/version look the same, any manifest edit (comments, fields, formatting) invalidates the approval.
Source
Thrown at crates/astrid-capsule-install/src/authority.rs:937
if let Some(approved) = approved {
if approved.content_digest != content_digest {
bail!(
"capsule content changed after authority decision (approved {}, found {})",
approved.content_digest,
content_digest
);
}
if approved.signer != signer || approved.signature != signature {
bail!("capsule provenance changed after authority decision");
}
if approved.capsule_id != manifest.package.name
|| approved.version != manifest.package.version
{
bail!("capsule identity or version changed after authority decision");
}
if approved.manifest_digest != manifest_digest {
bail!("capsule manifest changed after authority decision");
}
if approved.approved_capabilities != manifest.capabilities {
bail!("capsule capabilities changed after authority decision");
}
return Ok(approved);
}
// Calling the legacy library install API is itself an operator-authority
// action. User-facing CLI and daemon entry points use explicit decisions;
// this path preserves the existing trusted embedding API while recording
// the same exact content and capability ceiling.
Ok(InstalledAuthority {
schema_version: 1,
source: AuthoritySource::OperatorDistribution,
capsule_id: manifest.package.name.clone(),
version: manifest.package.version.clone(),
content_digest,
manifest_digest,View on GitHub (pinned to affd8760f4)
Solutions
- Re-run the authority approval on the current manifest so a receipt with the new manifest_digest is issued
- Restore Capsule.toml to its exact approved bytes (git checkout the reviewed version) and retry the install
- Check for tools (formatters, build scripts) that touch Capsule.toml and exclude it from automatic rewriting
Example fix
// before
bail!("capsule manifest changed after authority decision");
// after
// git checkout -- Capsule.toml # restore approved bytes
// install_from_local_path_internal(source_dir, Some(approved)) Defensive patterns
Strategy: validation
Validate before calling
// Compare manifest digest against the approved decision before install
let bytes = std::fs::read(source_dir.join("Capsule.toml"))?;
let digest = digest_manifest(&bytes);
assert_eq!(approved.manifest_digest, digest, "Capsule.toml changed since approval"); Type guard
fn manifest_unchanged(approved: &InstalledAuthority, manifest_bytes: &[u8]) -> bool {
approved.manifest_digest == digest_manifest(manifest_bytes)
} Try / catch
match authority_for_install_source(source_dir, &manifest, Some(approved)) {
Err(e) if e.to_string().contains("manifest changed") => restore_manifest_and_retry(),
other => other.map(install),
} Prevention
- Exclude Capsule.toml from formatters/codegen that rewrite files automatically
- Commit the manifest before review and don't touch it until install completes
- Diff manifest bytes (not just semantics) against the approved state
- Re-approve on any manifest edit, even whitespace
When it happens
Trigger: Calling `install_from_local_path_internal` with an approved `InstalledAuthority` whose `manifest_digest` differs from the digest of the current `source_dir/Capsule.toml` — any byte-level modification of the manifest between approval and install.
Common situations: A formatter or codegen tool rewriting Capsule.toml after review; adding/removing a capability or metadata field post-approval; manually editing the manifest (even whitespace) before installing.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- capsule content changed after authority decision (approved {
- capsule identity or version changed after authority decision
- installed authority receipt does not match capsule '{capsule
- capsule provenance changed after authority decision
- capsule capabilities changed after authority decision
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/5ca05bc8c9b0a604.
Report an issue: GitHub.