{"record":{"id":"a6b468a441574bf8","repo":"astrid-runtime/astrid","slug":"distro-lock-capsule-capsule-catalog-entry-is-m","errorCode":null,"errorMessage":"Distro.lock capsule '{capsule}' catalog entry is missing: bin/{locked_hex}.wasm","messagePattern":"Distro\\.lock capsule '(.+?)' catalog entry is missing: bin/(.+?)\\.wasm","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/init_grant.rs","lineNumber":389,"sourceCode":"\n    if !declares_wasm {\n        bail!(\n            \"Distro.lock capsule '{capsule}' does not declare WASM but installed metadata carries a WASM hash\"\n        );\n    }\n    let locked = parse_locked_blake3(capsule, locked_hash)?;\n    let locked_hex = locked.to_hex().to_string();\n    if meta_hash != locked_hex {\n        bail!(\"Distro.lock capsule '{capsule}' hash disagrees with installed metadata\");\n    }\n    let bytes = if let Some(store) = store {\n        let name = astrid_storage::ContentName::new(format!(\"bin/{locked_hex}.wasm\"))?;\n        let descriptor = store\n            .content()\n            .describe(&astrid_storage::StateOwner::System, &name)\n            .map_err(|error| anyhow::anyhow!(error))?\n            .ok_or_else(|| {\n                anyhow::anyhow!(\n                    \"Distro.lock capsule '{capsule}' catalog entry is missing: bin/{locked_hex}.wasm\"\n                )\n            })?;\n        store\n            .content()\n            .read_range(\n                &astrid_storage::StateOwner::System,\n                &name,\n                0,\n                descriptor.logical_bytes(),\n            )\n            .map_err(|error| anyhow::anyhow!(error))?\n            .ok_or_else(|| {\n                anyhow::anyhow!(\n                    \"Distro.lock capsule '{capsule}' catalog entry has no readable bytes: bin/{locked_hex}.wasm\"\n                )\n            })?\n    } else {","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/init_grant.rs#L371-L407","documentation":"When validating a locked capsule's WASM artifact, the storage catalog is asked to `describe` the content object `bin/<locked_hex>.wasm`. The store returns None (no descriptor), meaning the catalog has no entry for the locked WASM content hash. The library treats this as a broken lock because the pinned content is not present in the catalog.","triggerScenarios":"`validate_locked_wasm` calls `store.content().describe(&StateOwner::System, &name)` where name is built from the locked BLAKE3 hex; a None descriptor triggers this error. Occurs when the content was never ingested into the store, the catalog was pruned, or the lock pins a hash from a different environment.","commonSituations":"Content garbage-collected or pruned from the catalog; lock generated on another machine whose blobs were never synced; storage backend misconfigured so the catalog points elsewhere; lock regenerated against a rebuilt WASM so the hex differs from what is stored.","solutions":["Re-ingest/publish the WASM content into the store so `bin/<locked_hex>.wasm` exists in the catalog","Regenerate Distro.lock against the currently published WASM hashes","Verify the storage backend/catalog path configuration matches the environment the lock was made in","Re-sync the distro from its signed source so locked content is fetched into the catalog"],"exampleFix":"# before: hex in lock not present in catalog\n$ astrid init-grant\n# after\n$ astrid distro sync     # fetch locked wasm into catalog\n$ astrid init-grant","handlingStrategy":"validation","validationCode":"fn catalog_has_wasm(store: &Store, locked_hex: &str) -> bool {\n    let name = astrid_storage::ContentName::new(format!(\"bin/{locked_hex}.wasm\")).unwrap();\n    store.content().describe(&astrid_storage::StateOwner::System, &name).map(|d| d.is_some()).unwrap_or(false)\n}","typeGuard":null,"tryCatchPattern":"match res {\n    Err(e) if e.to_string().contains(\"catalog entry is missing\") => reingest_wasm_and_retry(),\n    other => other,\n}","preventionTips":["Keep locks generated from the same store you validate against","Avoid GC/pruning content referenced by active locks","Confirm storage backend config matches the environment that produced the lock","Regenerate the lock after rebuilding WASM artifacts"],"tags":["cli","distro-lock","storage","wasm"],"backgroundTag":"resource-not-found","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}