astrid-runtime/astrid · error
installed authority receipt does not match capsule '{capsule
Error message
installed authority receipt does not match capsule '{capsule_id}' What it means
During install inspection, `inspect_manifest` reads any previously persisted authority receipt for the capsule's target directory and validates it against the capsule being installed. This error is thrown when the on-disk receipt has a schema version other than 1 or its `capsule_id` differs from the capsule id derived from the manifest being installed. The library refuses to silently apply an authority decision recorded for a different capsule or an incompatible receipt format.
Source
Thrown at crates/astrid-capsule-install/src/authority.rs:886
ArtifactProvenance::LocalRuntime { signer, signature }
} else {
ArtifactProvenance::ForeignRuntime { signer, signature }
}
},
};
let capsule_id = CapsuleId::new(manifest.package.name.clone())?;
let target_dir = resolve_target_dir_for_in_workspace(
home,
target_principal,
capsule_id.as_str(),
workspace,
workspace_root,
workspace_layout,
)?;
let approved = match read_installed_authority(home, &target_dir)? {
Some(authority) => {
if authority.schema_version != 1 || authority.capsule_id != capsule_id.as_str() {
bail!("installed authority receipt does not match capsule '{capsule_id}'");
}
Some(authority.approved_capabilities)
},
None => None,
}
.or_else(|| {
astrid_capsule::discovery::load_manifest(&target_dir.join("Capsule.toml"))
.ok()
.map(|installed| installed.capabilities)
})
.unwrap_or_default();
let capability_expansions = manifest.capabilities.expansions_from(&approved);
Ok(InstallInspection {
capsule_id,
version: manifest.package.version,
content_digest,
provenance,
capability_expansions,View on GitHub (pinned to affd8760f4)
Solutions
- Remove or quarantine the stale receipt under the authority receipt directory for that target so a fresh one is written on the next install
- Verify the manifest `package.name` matches the capsule the receipt was issued for; install the correct capsule into the correct target directory
- Upgrade or align the astrid-capsule-install version so receipt schema_version expectations (1) match what is on disk
- Reinstall the capsule from source so a new matching authority decision is recorded
Example fix
// before: reinstalling 'my-capsule' into a dir whose receipt belongs to 'old-capsule'
bail!("installed authority receipt does not match capsule '{capsule_id}'");
// after: clear the mismatched receipt first
// rm <home>/etc/capsule-authority/<hash>.json (or quarantine it)
// then re-run the install so a fresh schema-1 receipt is written Defensive patterns
Strategy: validation
Validate before calling
// Before installing, check any existing receipt matches the capsule and schema
if let Some(receipt) = read_installed_authority(&home, &target_dir)? {
if receipt.schema_version != 1 || receipt.capsule_id != capsule_id {
// quarantine/remove the stale receipt or route to re-approval before installing
}
} Type guard
fn receipt_matches(receipt: &InstalledAuthority, capsule_id: &str) -> bool {
receipt.schema_version == 1 && receipt.capsule_id == capsule_id
} Prevention
- Never reuse an install target directory across differently-named capsules without clearing receipts
- Keep receipt schema expectations in sync with the runtime version you deploy
- Avoid hand-copying receipts between homes or target directories
- After restoring a home from backup, run the leftover-receipt sweep before installing
When it happens
Trigger: Calling `inspect_archive_for_principal_in_workspace` or `inspect_directory_for_principal_in_workspace` when the target directory already contains an installed-authority receipt where `schema_version != 1` or `receipt.capsule_id != <manifest package name>`. Typical causes: a stale receipt left over from a capsule that was renamed, a home directory reused across capsule identities, or a receipt written by an older/newer format version.
Common situations: Renaming or repurposing a capsule while reusing the same install target directory; restoring an Astrid home from a backup or another machine where receipts do not correspond to current manifests; upgrading/downgrading the runtime so the receipt schema changed; hand-editing or copying receipts between targets.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- capsule content changed after authority decision (approved {
- capsule provenance changed after authority decision
- capsule identity or version changed after authority decision
- capsule manifest 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/7e941aec89f3e0fb.
Report an issue: GitHub.