astrid-runtime/astrid · error

durable capsule {id} has unsupported authority schema {}

Error message

durable capsule {id} has unsupported authority schema {}

What it means

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.

Source

Thrown at crates/astrid-capsule-install/src/storage.rs:261

fn is_hex_digest(value: &str) -> bool {
    value.len() == 64
        && value
            .bytes()
            .all(|byte| byte.is_ascii_digit() || matches!(byte, b'a'..=b'f'))
}

fn verify_package_identity(
    id: &str,
    manifest: &CapsuleManifest,
    metadata: &CapsuleMeta,
    authority: &InstalledAuthority,
    manifest_bytes: &[u8],
    verification: &ArtifactVerification,
    archive_files: &std::collections::BTreeMap<String, Vec<u8>>,
) -> anyhow::Result<()> {
    if authority.schema_version != 1 {
        bail!(
            "durable capsule {id} has unsupported authority schema {}",
            authority.schema_version
        );
    }
    if authority.capsule_id != id || manifest.package.name != id {
        bail!("durable capsule {id} identity differs across archive and authority");
    }
    if authority.version != manifest.package.version || metadata.version != authority.version {
        bail!("durable capsule {id} version differs across package records");
    }
    let manifest_digest = crate::authority::digest_manifest(manifest_bytes);
    if authority.manifest_digest != manifest_digest {
        bail!("durable capsule {id} manifest digest differs from authority receipt");
    }
    if authority.content_digest != verification.content_digest() {
        bail!("durable capsule {id} content digest differs from authority receipt");
    }
    let expected_imports = crate::wit::version_map_to_strings(&manifest.imports, |definition| {

View on GitHub (pinned to affd8760f4)

Solutions

  1. Upgrade the Astrid tooling to the version that wrote the capsule's authority schema (check the recorded schema number against release notes).
  2. Reinstall/republish the capsule with the current tool version so the authority receipt is rewritten with schema_version 1-compatible format.
  3. If the store came from a newer-version backup, either migrate forward the tooling or rebuild the store from sources.
  4. Inspect the authority record to confirm the schema_version value and rule out corruption.

Example fix

// before: authority written by newer tool
authority.schema_version = 2  // older reader bails
// after: align versions
$ astrid upgrade   # then re-read, or republish with a matching version
authority.schema_version = 1
Defensive patterns

Strategy: try-catch

Validate before calling

// check the authority schema before reading the full package
let authority = read_installed_authority(home, id)?;
if authority.schema_version != 1 {
    eprintln!("capsule {} uses authority schema {}; upgrade the tooling", id, authority.schema_version);
}

Type guard

fn is_supported_authority(a: &InstalledAuthority) -> bool {
    a.schema_version == 1
}

Try / catch

match read_verified_durable_package_for_owner(id) {
    Err(e) if e.to_string().contains("unsupported authority schema") => {
        anyhow::bail!("upgrade astrid tooling or republish capsule {id} with a compatible version");
    }
    other => other,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/0a07832b59a4d84d. Report an issue: GitHub.