{"record":{"id":"c88b95443e080227","repo":"astrid-runtime/astrid","slug":"native-process-storage-mount-broker-unavailable","errorCode":null,"errorMessage":"native process storage mount broker unavailable","messagePattern":"native process storage mount broker unavailable","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-kernel/src/lib.rs","lineNumber":1955,"sourceCode":"        .with_astrid_workspace()\n        .with_principal_storage(\n            self.principal_store.clone().ok_or_else(|| {\n                anyhow::anyhow!(\n                    \"native capsule runtime requires the authoritative principal store\"\n                )\n            })?,\n            self.principal_directory.clone(),\n        )\n        .with_workspace_branches(self.workspace_branches.clone().ok_or_else(|| {\n            anyhow::anyhow!(\n                \"canonical Astrid workspace requires the kernel workspace branch service\"\n            )\n        })?)\n        .with_process_storage_mount_broker(\n            self.process_storage_mount_broker\n                .get()\n                .cloned()\n                .ok_or_else(|| anyhow::anyhow!(\"native process storage mount broker unavailable\"))?,\n        )\n        .with_registry(Arc::clone(&self.capsules))\n        .with_session_token(Arc::clone(&self.session_token))\n        .with_allowance_store(Arc::clone(&self.allowance_store))\n        .with_identity_store(Arc::clone(&self.identity_store))\n        .with_profile_cache(Arc::clone(&self.profile_cache))\n        .with_overlay_registry(Arc::clone(&self.overlay_registry))\n        // Thread the live group config so capsule invocation checks observe\n        // runtime group mutations without requiring capsule reloads. Load-time\n        // run-loop decisions take their own explicit snapshot.\n        .with_live_group_config(Arc::clone(&self.groups))\n        // Hand this capsule its operator-approved local-egress allowlist (if\n        // any) so the SSRF airlock can exempt sanctioned loopback/private\n        // endpoints for it. Absent entry = empty = no exemptions.\n        .with_local_egress(\n            self.local_egress\n                .read()\n                .unwrap_or_else(std::sync::PoisonError::into_inner)","sourceCodeStart":1937,"sourceCodeEnd":1973,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-kernel/src/lib.rs#L1937-L1973","documentation":"Thrown when the native runtime builder cannot obtain the process storage mount broker: `self.process_storage_mount_broker.get().cloned()` returns `None`. The broker coordinates mounting process storage for capsules, and the native runtime treats it as mandatory, so assembly fails fast.","triggerScenarios":"Starting the native capsule runtime when the OnceCell `process_storage_mount_broker` was never initialized (lib.rs:1955, `with_process_storage_mount_broker(...)`).","commonSituations":"Kernel constructed without process-storage initialization (e.g. storage layer skipped in embedded/test setups); race or ordering bug where the broker is set only after runtime start; code paths that construct the kernel manually instead of through the standard bootstrap that installs the broker.","solutions":["Initialize the process storage mount broker before starting the native runtime (the setter/OnceCell that populates `process_storage_mount_broker`)","Ensure the standard kernel bootstrap sequence is used so the broker is installed in the right order","If only launching capsules without process storage, use a runtime configuration that does not require the mount broker"],"exampleFix":"// before\nlet kernel = AstridKernel::builder().build();\nkernel.start_native_capsule_runtime().await?; // broker never set\n// after\nkernel.init_process_storage_mount_broker(broker)?;\nkernel.start_native_capsule_runtime().await?;","handlingStrategy":"validation","validationCode":"if kernel.process_storage_mount_broker().is_none() {\n    return Err(anyhow!(\"process storage mount broker must be initialized first\"));\n}","typeGuard":"fn has_mount_broker(kernel: &AstridKernel) -> bool {\n    kernel.process_storage_mount_broker().is_some()\n}","tryCatchPattern":null,"preventionTips":["Initialize process storage before starting the capsule runtime in your bootstrap order","Do not construct the kernel manually in tests; use the shared fixture that installs the broker","Watch initialization order when refactoring async startup (OnceCell must be filled before use)"],"tags":["rust","storage","kernel-startup","capsule-runtime"],"backgroundTag":"missing-required-config","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}