{"record":{"id":"5f5b8f859abf009c","repo":"astrid-runtime/astrid","slug":"failed-to-boot-kernel-e","errorCode":null,"errorMessage":"Failed to boot Kernel: {e}","messagePattern":"Failed to boot Kernel: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"critical","filePath":"crates/astrid-daemon/src/lib.rs","lineNumber":266,"sourceCode":"\n    // Resolve the capsule host-call concurrency ceilings (CLI > config+env >\n    // host-derived default); the kernel forwards them to every `WasmEngine`.\n    // Done before `args.workspace` is consumed below.\n    let runtime_limits = resolve_capsule_limits(&args, unified_cfg.as_ref());\n\n    // Operator ceilings for the astrid:http host (global; absent `[http]`\n    // config = the host's historical constants). Forwarded to every capsule.\n    let http_limits = resolve_http_limits(unified_cfg.as_ref());\n    let kernel = astrid_kernel::Kernel::new_with_workspace_layout(\n        session_id.clone(),\n        workspace_root,\n        runtime_limits,\n        std::collections::HashMap::new(),\n        http_limits,\n        workspace_layout,\n    )\n    .await\n    .map_err(|e| anyhow::anyhow!(\"Failed to boot Kernel: {e}\"))?;\n\n    // Local egress is security policy at durable-root authority, so read it\n    // only after admission and bind it once before any capsule can load.\n    let admitted_config = astrid_config::Config::load_with_home_and_layout(\n        Some(&kernel.workspace_root),\n        astrid_home.root(),\n        kernel.workspace_layout(),\n    )\n    .map_err(|error| anyhow::anyhow!(\"Failed to load admitted-home boot policy: {error:#}\"))?;\n    kernel\n        .bind_boot_local_egress(admitted_config.config.security.capsule_local_egress)\n        .map_err(|error| anyhow::anyhow!(\"Failed to bind boot policy: {error}\"))?;\n\n    if defer_logging {\n        init_logging(&log_config);\n    }\n    kernel\n        .set_system_capsules(","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-daemon/src/lib.rs#L248-L284","documentation":"The daemon awaits `Kernel::boot(...)` with runtime limits, HTTP limits, and the workspace layout; if booting the kernel fails for any reason, the underlying error is wrapped as 'Failed to boot Kernel'. This is a startup-fatal error: without a booted kernel the daemon cannot serve capsules.","triggerScenarios":"Calling daemon `run()` where the kernel boot future resolves to Err — e.g. invalid runtime_limits, http_limits, or workspace_layout arguments, or internal kernel initialization failure (storage, WasmEngine setup).","commonSituations":"Corrupt or unusable workspace layout; bad host-derived concurrency ceilings from CLI/config/env; an environment where kernel subsystem initialization fails (permissions, missing durable root).","solutions":["Read the chained source error (`{e}`) for the actual kernel boot failure cause.","Verify the workspace root/layout is writable and not corrupted.","Re-check `--capsule-*` limit flags and config/env values feeding resolve_capsule_limits; fix out-of-range values.","Retry after fixing environment issues; if persistent, file a bug with the wrapped source error."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// rust\nmatch daemon::run(args).await {\n    Err(e) => { eprintln!(\"{e:#}\"); /* inspect full chain for kernel boot cause */ std::process::exit(1); }\n    Ok(()) => {}\n}","preventionTips":["Keep the workspace root/durable storage writable and healthy before booting.","Sanity-check capsule limit flags and config values passed via CLI/env.","Monitor the wrapped source error chain — it names the actual failing kernel subsystem."],"tags":["startup","kernel","initialization"],"backgroundTag":"module-init-failed","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"}