astrid-runtime/astrid · error
native Astrid daemon startup is not yet supported on this…
Error message
native Astrid daemon startup is not yet supported on this platform
What it means
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.
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/astrid-daemon/src/lib.rs:473 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/1cead37507b18d43.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-daemon/src/lib.rs:473
Ok(())
}
/// Report that native daemon startup is unavailable on this platform.
///
/// The Windows filesystem and local-transport substrates compile and test
/// independently, but daemon composition still requires the Unix socket
/// listener and readiness-file implementation.
///
/// # Errors
///
/// Always returns an explicit unsupported-platform error.
#[cfg(not(unix))]
#[expect(
clippy::unused_async,
reason = "the cross-platform daemon entry point remains async even when startup is unsupported"
)]
pub async fn run() -> Result<()> {
anyhow::bail!("native Astrid daemon startup is not yet supported on this platform")
}
/// Load `etc/gateway-http.toml`. Returns `Ok(None)` when the file
/// doesn't exist (single-tenant default).
#[cfg(unix)]
async fn load_gateway_config() -> Result<Option<astrid_gateway::GatewayConfig>> {
let home = astrid_core::dirs::AstridHome::resolve()
.map_err(|e| anyhow::anyhow!("resolve AstridHome: {e}"))?;
let path = home.etc_dir().join("gateway-http.toml");
let text = match tokio::fs::read_to_string(&path).await {
Ok(b) => b,
Err(e) if e.kind() == std::io::ErrorKind::NotFound => return Ok(None),
Err(e) => return Err(anyhow::anyhow!("read {}: {e}", path.display())),
};
let cfg: astrid_gateway::GatewayConfig =
toml::from_str(&text).context("parse gateway-http.toml")?;
cfg.validate().context("validate gateway-http.toml")?;
Ok(Some(cfg))View on GitHub (pinned to affd8760f4)