astrid-runtime/astrid · error
read durable capsule registry
Error message
read durable capsule registry: {error} What it means
Wraps a failure of `store.capsules().get_snapshot(&owner, capsule_id)`: the durable capsule registry read failed. The owner (Principal UID) and capsule id were valid, but the storage backend could not return the snapshot.
Solutions
- Retry the operation once concurrent installs have finished (lock contention resolves itself)
- Check disk space and file permissions on the registry store under astrid_home
- Inspect the inner astrid_storage error (included via {error}) for the concrete backend cause
- Restore the capsule registry from backup or re-publish the capsule if the store is corrupt
Defensive patterns
Strategy: retry
Try / catch
match store.capsules().get_snapshot(&owner, capsule_id.as_str()) {
Ok(snap) => snap,
Err(e) if is_contention(&e) => retry_with_backoff(3, || store.capsules().get_snapshot(&owner, capsule_id.as_str())),
Err(e) => return Err(anyhow!("read durable capsule registry: {e}")),
} Prevention
- Avoid concurrent installs/publishes for the same principal+capsule
- Monitor disk space and permissions on astrid_home
- Back up the capsule registry store regularly
When it happens
Trigger: Calling the durable-capsule lookup when the principal's capsule registry entry is unreadable: backend I/O error, lock contention, or a storage-layer failure in astrid_storage.
Common situations: Concurrent install/publish racing the read; registry database corrupted or on a full disk; wrong astrid_home so the registry file is absent; permission issues on the registry store after running under a different user.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- audit read failed
- capsule ' ' not found in registry
- destination.as_str()
- Distro.lock capsule ' ' is absent from the daemon registry
- durable capsule conflicts with legacy native content
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/ce58b26d9dfd68fc.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-kernel/src/lib.rs:1542
fn published_capsule_snapshot(
&self,
principal: &PrincipalId,
manifest: &astrid_capsule_types::manifest::CapsuleManifest,
) -> anyhow::Result<Option<astrid_storage::CapsulePackageSnapshot>> {
let Some(store) = self.principal_store.as_ref() else {
return Ok(None);
};
let uid = self
.principal_directory
.uid_for(principal)
.map_err(|error| anyhow::anyhow!("resolve capsule cache owner UID: {error}"))?;
let owner = astrid_storage::StateOwner::Principal(uid);
let capsule_id = astrid_capsule_types::CapsuleId::new(manifest.package.name.clone())
.map_err(|error| anyhow::anyhow!("invalid durable capsule id: {error}"))?;
store
.capsules()
.get_snapshot(&owner, capsule_id.as_str())
.map_err(|error| anyhow::anyhow!("read durable capsule registry: {error}"))
}
/// Derive the only runtime projection path admitted by this snapshot.
#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))]
fn published_cache_target(
&self,
principal: &PrincipalId,
manifest: &astrid_capsule_types::manifest::CapsuleManifest,
snapshot: &astrid_storage::CapsulePackageSnapshot,
) -> anyhow::Result<PathBuf> {
let uid = self
.principal_directory
.uid_for(principal)
.map_err(|error| anyhow::anyhow!("resolve capsule cache owner UID: {error}"))?;
let digest = blake3::hash(&snapshot.package().archive)
.to_hex()
.to_string();
astrid_capsule_install::resolve_cache_target_dir(View on GitHub (pinned to affd8760f4)