{"record":{"id":"1cead37507b18d43","repo":"astrid-runtime/astrid","slug":"native-astrid-daemon-startup-is-not-yet-supported","errorCode":null,"errorMessage":"native Astrid daemon startup is not yet supported on this platform","messagePattern":"native Astrid daemon startup is not yet supported on this platform","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-daemon/src/lib.rs","lineNumber":473,"sourceCode":"    Ok(())\n}\n\n/// Report that native daemon startup is unavailable on this platform.\n///\n/// The Windows filesystem and local-transport substrates compile and test\n/// independently, but daemon composition still requires the Unix socket\n/// listener and readiness-file implementation.\n///\n/// # Errors\n///\n/// Always returns an explicit unsupported-platform error.\n#[cfg(not(unix))]\n#[expect(\n    clippy::unused_async,\n    reason = \"the cross-platform daemon entry point remains async even when startup is unsupported\"\n)]\npub async fn run() -> Result<()> {\n    anyhow::bail!(\"native Astrid daemon startup is not yet supported on this platform\")\n}\n\n/// Load `etc/gateway-http.toml`. Returns `Ok(None)` when the file\n/// doesn't exist (single-tenant default).\n#[cfg(unix)]\nasync fn load_gateway_config() -> Result<Option<astrid_gateway::GatewayConfig>> {\n    let home = astrid_core::dirs::AstridHome::resolve()\n        .map_err(|e| anyhow::anyhow!(\"resolve AstridHome: {e}\"))?;\n    let path = home.etc_dir().join(\"gateway-http.toml\");\n    let text = match tokio::fs::read_to_string(&path).await {\n        Ok(b) => b,\n        Err(e) if e.kind() == std::io::ErrorKind::NotFound => return Ok(None),\n        Err(e) => return Err(anyhow::anyhow!(\"read {}: {e}\", path.display())),\n    };\n    let cfg: astrid_gateway::GatewayConfig =\n        toml::from_str(&text).context(\"parse gateway-http.toml\")?;\n    cfg.validate().context(\"validate gateway-http.toml\")?;\n    Ok(Some(cfg))","sourceCodeStart":455,"sourceCodeEnd":491,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-daemon/src/lib.rs#L455-L491","documentation":"Sentinel guard in the non-Unix daemon entry point: daemon composition (Unix socket listener plus readiness file) is not yet wired on this platform, so run() always fails closed instead of starting a partially functional daemon.","triggerScenarios":"Thrown at crates/astrid-daemon/src/lib.rs:473 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run the daemon on a Unix host, where the socket listener and readiness-file substrate are implemented","If embedding, gate daemon startup on #[cfg(unix)] / a platform capability check before calling run()","Track the platform-support work; the Windows filesystem and local-transport layers already compile and test independently"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}