{"record":{"id":"0a07832b59a4d84d","repo":"astrid-runtime/astrid","slug":"durable-capsule-id-has-unsupported-authority-sch","errorCode":null,"errorMessage":"durable capsule {id} has unsupported authority schema {}","messagePattern":"durable capsule (.+?) has unsupported authority schema (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-capsule-install/src/storage.rs","lineNumber":261,"sourceCode":"\nfn is_hex_digest(value: &str) -> bool {\n    value.len() == 64\n        && value\n            .bytes()\n            .all(|byte| byte.is_ascii_digit() || matches!(byte, b'a'..=b'f'))\n}\n\nfn verify_package_identity(\n    id: &str,\n    manifest: &CapsuleManifest,\n    metadata: &CapsuleMeta,\n    authority: &InstalledAuthority,\n    manifest_bytes: &[u8],\n    verification: &ArtifactVerification,\n    archive_files: &std::collections::BTreeMap<String, Vec<u8>>,\n) -> anyhow::Result<()> {\n    if authority.schema_version != 1 {\n        bail!(\n            \"durable capsule {id} has unsupported authority schema {}\",\n            authority.schema_version\n        );\n    }\n    if authority.capsule_id != id || manifest.package.name != id {\n        bail!(\"durable capsule {id} identity differs across archive and authority\");\n    }\n    if authority.version != manifest.package.version || metadata.version != authority.version {\n        bail!(\"durable capsule {id} version differs across package records\");\n    }\n    let manifest_digest = crate::authority::digest_manifest(manifest_bytes);\n    if authority.manifest_digest != manifest_digest {\n        bail!(\"durable capsule {id} manifest digest differs from authority receipt\");\n    }\n    if authority.content_digest != verification.content_digest() {\n        bail!(\"durable capsule {id} content digest differs from authority receipt\");\n    }\n    let expected_imports = crate::wit::version_map_to_strings(&manifest.imports, |definition| {","sourceCodeStart":243,"sourceCodeEnd":279,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-capsule-install/src/storage.rs#L243-L279","documentation":"verify_package_identity checks the InstalledAuthority receipt of a durable capsule. The authority record's schema_version must be exactly 1 — the only format this library understands. Reading a durable package whose authority was written by a newer (or corrupt) writer with a different schema version fails here rather than misinterpreting the record.","triggerScenarios":"read_verified_durable_package_for_owner (and the test durable_metadata_cross_binding_rejects_manifest_and_archive_mismatches) on a capsule whose InstalledAuthority.schema_version != 1 — i.e. an authority receipt produced by a newer tool version or corrupted storage.","commonSituations":"Mixing Astrid versions: a store written by a newer release read by an older binary; hand-editing or tampering with the authority record; storage restored from a future-version backup; corruption flipping the version field.","solutions":["Upgrade the Astrid tooling to the version that wrote the capsule's authority schema (check the recorded schema number against release notes).","Reinstall/republish the capsule with the current tool version so the authority receipt is rewritten with schema_version 1-compatible format.","If the store came from a newer-version backup, either migrate forward the tooling or rebuild the store from sources.","Inspect the authority record to confirm the schema_version value and rule out corruption."],"exampleFix":"// before: authority written by newer tool\nauthority.schema_version = 2  // older reader bails\n// after: align versions\n$ astrid upgrade   # then re-read, or republish with a matching version\nauthority.schema_version = 1","handlingStrategy":"try-catch","validationCode":"// check the authority schema before reading the full package\nlet authority = read_installed_authority(home, id)?;\nif authority.schema_version != 1 {\n    eprintln!(\"capsule {} uses authority schema {}; upgrade the tooling\", id, authority.schema_version);\n}","typeGuard":"fn is_supported_authority(a: &InstalledAuthority) -> bool {\n    a.schema_version == 1\n}","tryCatchPattern":"match read_verified_durable_package_for_owner(id) {\n    Err(e) if e.to_string().contains(\"unsupported authority schema\") => {\n        anyhow::bail!(\"upgrade astrid tooling or republish capsule {id} with a compatible version\");\n    }\n    other => other,\n}","preventionTips":["Keep Astrid tooling versions aligned across machines that share a store","Do not restore durable stores from backups made by newer versions without migrating the tooling first","Never hand-edit authority receipts; republish instead","Pin the tool version in CI so writers and readers agree on schema"],"tags":["versioning","schema","compatibility","metadata"],"backgroundTag":"unsupported-enum-value","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}