astrid-runtime/astrid · error
Distro.lock capsule ' ' has no readable install metadata…
Error message
Distro.lock capsule '{}' has no readable install metadata for target '{}' What it means
While validating Distro.lock entries, the CLI reads the capsule's install metadata (meta.json) at the install target. If meta.json is missing or unreadable, it cannot confirm what was installed and bails with this message.
Solutions
- Rerun init/install to reinstall the capsule and regenerate meta.json.
- Remove the stale install directory for that capsule and reinstall cleanly.
- Check file permissions on the install directory and meta.json.
- If an older tool wrote the metadata, reinstall with the current CLI version.
Example fix
// before rm -rf ~/.astrid/capsules/my-capsule # partial install, no meta.json // after astrid init --distro my-distro # reinstall regenerates meta.json
Defensive patterns
Strategy: validation
Validate before calling
// pre-check before grant reuse
let meta_path = target_dir.join("meta.json");
if !meta_path.exists() {
eprintln!("missing meta.json for {}; reinstall required", target_dir.display());
} Type guard
fn has_meta(dir: &Path) -> bool { dir.join("meta.json").is_file() } Try / catch
match result {
Err(e) if e.to_string().contains("no readable install metadata") => eprintln!("reinstall capsule to regenerate meta.json"),
Err(e) => return Err(e),
Ok(v) => Ok(v),
} Prevention
- Avoid deleting meta.json or cleaning install dirs partially.
- Let the CLI perform installs/upgrades instead of copying files manually.
- Check directory permissions before installs.
- Verify install completion (meta.json present) after upgrades.
When it happens
Trigger: validate_locked_capsules_with_store calls read_meta on the capsule's target directory and receives None — meta.json absent, corrupted, or unreadable.
Common situations: A partial/failed install left the capsule directory without metadata; the user manually deleted or cleaned meta.json; filesystem permissions prevent reading the file; install was done by an older CLI version writing a different layout.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- capsule ' ' release selector declared version , but the…
- capsule ' ' signed ref did not match installed ref
- capsule identity mismatch: expected
- capsule identity mismatch: expected
- capsule version mismatch for
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/5fe28446461031e9.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-cli/src/commands/init_grant.rs:259
"Distro.lock is fresh but capsule '{}' is not installed correctly for '{}'; rerun init after removing the stale lock",
capsule.name, target
)
})?;
let actual = CapsuleId::new(manifest.package.name.clone())?;
if actual != expected {
bail!(
"Distro.lock capsule '{expected}' resolves to installed manifest '{actual}'; refusing to grant stale identity"
);
}
let meta = super::super::capsule::meta::read_meta(&target_dir).ok_or_else(|| {
anyhow::anyhow!(
"Distro.lock capsule '{}' has no readable install metadata for target '{}'",
capsule.name,
target
)
})?;
if manifest.package.version != meta.version {
bail!(
"installed capsule '{}' version disagrees between Capsule.toml ({}) and meta.json ({})",
expected,
manifest.package.version,
meta.version
);
}
if !capsule.version.is_empty() && meta.version != capsule.version {
bail!(
"Distro.lock capsule '{}' expects version {}, but meta.json reports {}",
capsule.name,
capsule.version,
meta.version
);
}
validate_locked_wasm(
home,
&expected,
&manifest,View on GitHub (pinned to affd8760f4)