{"record":{"id":"63dadb26b475cb4f","repo":"astrid-runtime/astrid","slug":"failed-to-load-admitted-home-boot-policy-error","errorCode":null,"errorMessage":"Failed to load admitted-home boot policy: {error:#}","messagePattern":"Failed to load admitted-home boot policy: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"critical","filePath":"crates/astrid-daemon/src/lib.rs","lineNumber":275,"sourceCode":"    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(\n            unified_cfg\n                .as_ref()\n                .into_iter()\n                .flat_map(|config| config.uplinks.iter())\n                .map(|uplink| uplink.plugin.clone()),\n        )\n        .await;\n\n    // Astrid owns its baseline control plane. Start it before loading optional","sourceCodeStart":257,"sourceCodeEnd":293,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-daemon/src/lib.rs#L257-L293","documentation":"After the kernel boots, the daemon reloads configuration from the 'admitted home' (astrid home + workspace layout) to bind boot-time local egress policy. If `Config::load_with_home_and_layout` fails, this error wraps the detailed cause; the daemon refuses to continue because the security policy must be bound before any capsule can load.","triggerScenarios":"Daemon `run()` reaching the post-admission config reload where the config file at the admitted home is missing required fields, malformed TOML, or unreadable.","commonSituations":"Hand-edited config with a typo introduced after admission; a config schema written by a newer/older version of the tool; restrictive file permissions on the astrid home.","solutions":["Inspect the wrapped `{error:#}` chain for the exact parse/validation problem.","Fix or regenerate the config file in the astrid home / workspace root.","Ensure the config matches the current schema for your astrid version.","Check file permissions on the home directory so the config is readable."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// shell\n# pre-flight: ensure admitted-home config parses before launching daemon\nastrid config check --home \"$ASTRID_HOME\" || exit 1","typeGuard":null,"tryCatchPattern":"// rust\nif let Err(e) = daemon::run(args).await {\n    eprintln!(\"{e:#}\"); // full chain reveals which config field/parse step failed\n    std::process::exit(1);\n}","preventionTips":["Validate config edits with a schema/check command before restarting the daemon.","Keep the astrid home readable by the daemon user.","Avoid hand-editing the admitted-home config while a daemon is mid-boot."],"tags":["config","security","startup"],"backgroundTag":"schema-validation-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"}