astrid-runtime/astrid · error
distro declared capsule '{expected}', but the checked instal
Error message
distro declared capsule '{expected}', but the checked installer reported [{actual}] What it means
validate_batch_install cross-checks what the (checked) installer reported against what the distro declared. If the installer's report lists a different set of installed capsule ids than the expected one, the mismatch is a hard error — this is an internal consistency check protecting the lockfile from recording wrong identities.
Source
Thrown at crates/astrid-cli/src/commands/init.rs:851
skipped: bool,
}
/// Require the checked installer to report one exact identity and an actual
/// version consistent with the distro's released selector.
fn validate_batch_install(
expected: &CapsuleId,
declared_version: &str,
expected_ref: Option<&str>,
outcome: super::capsule::install::BatchInstallOutcome,
) -> anyhow::Result<VerifiedBatchInstall> {
if outcome.installed.len() != 1 {
let actual = outcome
.installed
.iter()
.map(|installed| installed.id.as_str())
.collect::<Vec<_>>()
.join(", ");
bail!(
"distro declared capsule '{expected}', but the checked installer reported [{actual}]"
);
}
let installed = outcome
.installed
.into_iter()
.next()
.expect("length checked");
if installed.id != *expected {
bail!(
"distro declared capsule '{expected}', but the checked installer reported '{}'",
installed.id
);
}
if !declared_version.is_empty() && installed.version != declared_version {
bail!(
"capsule '{expected}' release selector declared version {declared_version}, but the installed manifest reports {}",
installed.versionView on GitHub (pinned to affd8760f4)
Solutions
- Re-run `astrid init` to retry with a fresh, consistent install.
- Verify the installer/checker implementation version matches what the CLI expects.
- Inspect the distro manifest's capsule id versus the installer output to find the identity mismatch.
Defensive patterns
Strategy: try-catch
Try / catch
match validate_batch_install(&outcome, &expected, version) {
Ok(installed) => record(installed),
Err(e) => {
eprintln!("installer report mismatch: {e:#}");
// retry the batch install
}
} Prevention
- Keep the installer/checker version in sync with the CLI.
- Ensure one installer invocation corresponds to exactly one declared capsule.
- Don't modify installer outcome structs between install and validation.
When it happens
Trigger: validate_batch_install receives an InstallOutcome whose `installed` entries' ids join to something other than the expected capsule id — including a report containing multiple capsules when exactly one was expected.
Common situations: A buggy or mismatched installer implementation reporting wrong capsule ids; an installer version change altering report semantics; distro manifest drifted from what the installer actually installed.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- distro declared capsule '{expected}', but the checked instal
- invalid value for {capsule_id}.{key}: expected one of {}, go
- Installation incomplete: {succeeded}/{total} capsule(s) inst
- distro source '{source}' must use @owner/repo, a URL, a loca
- all {total} capsule install(s) failed — not writing Distro.l
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/8ab143ae45cfb4fb.
Report an issue: GitHub.