astrid-runtime/astrid · error

capsule authority update is incomplete at

Error message

capsule authority update is incomplete at {}; reinstall the capsule

What it means

Fired by read_installed_authority when an authority receipt exists but is malformed/incomplete (missing required fields such as approved_wasm_hash). Per design, a present-but-corrupt receipt is an error rather than being treated as a legacy install, since corruption must not silently drop the approval ceiling.

Solutions

  1. Reinstall the capsule to regenerate a valid authority receipt
  2. Restore the receipt from backup if available
  3. Do not hand-edit the receipt; corruption indicates a crashed write or tampering
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/astrid-capsule-install/src/authority.rs:177 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/a794f6c933d462f6. Report an issue: GitHub.

Appendix: source

Thrown at crates/astrid-capsule-install/src/authority.rs:177

    pub approved_wasm_hash: Option<String>,
}

/// Read an installed authority receipt.
///
/// A missing receipt denotes an install made before authority receipts were
/// introduced. A present but malformed receipt is an error rather than a
/// legacy install, so corruption cannot silently discard an approval ceiling.
///
/// # Errors
///
/// Returns an error when the receipt cannot be read or decoded.
pub fn read_installed_authority(
    home: &AstridHome,
    target_dir: &Path,
) -> anyhow::Result<Option<InstalledAuthority>> {
    let paths = authority_paths(home, target_dir)?;
    if paths.pending.exists() {
        bail!(
            "capsule authority update is incomplete at {}; reinstall the capsule",
            paths.pending.display()
        );
    }
    let path = paths.active;
    let content = match std::fs::read_to_string(&path) {
        Ok(content) => content,
        Err(error) if error.kind() == std::io::ErrorKind::NotFound => return Ok(None),
        Err(error) => {
            return Err(error)
                .with_context(|| format!("failed to read authority receipt {}", path.display()));
        },
    };
    let receipt = serde_json::from_str(&content)
        .with_context(|| format!("invalid authority receipt {}", path.display()))?;
    Ok(Some(receipt))
}

View on GitHub (pinned to affd8760f4)