{"record":{"id":"cd3cd22c1eedc546","repo":"astrid-runtime/astrid","slug":"mcp-gateway-readiness-is-only-supported-on-unix-ho","errorCode":null,"errorMessage":"MCP gateway readiness is only supported on Unix hosts","messagePattern":"MCP gateway readiness is only supported on Unix hosts","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/mcp/mod.rs","lineNumber":82,"sourceCode":"\n    use anyhow::Result;\n\n    pub(crate) async fn run(_principal: Option<&str>) -> Result<ExitCode> {\n        anyhow::bail!(\"MCP gateway is only supported on Unix hosts\")\n    }\n}\nmod grant;\nmod ingress;\n#[cfg(unix)]\nmod lifecycle;\n#[cfg(not(unix))]\nmod lifecycle {\n    use std::process::ExitCode;\n\n    use anyhow::Result;\n\n    pub(crate) async fn ready(_principal: Option<&str>, _format: &str) -> Result<ExitCode> {\n        anyhow::bail!(\"MCP gateway readiness is only supported on Unix hosts\")\n    }\n\n    pub(crate) async fn stop_gateway() -> Result<()> {\n        Ok(())\n    }\n\n    pub(crate) fn gc() -> Result<ExitCode> {\n        anyhow::bail!(\"MCP gateway cleanup is only supported on Unix hosts\")\n    }\n}\nmod mrtr;\n// Parent-death detection reads `getppid()` (Unix-only); the module and its use\n// site are target-gated so the CLI still compiles on non-Unix targets.\n#[cfg(unix)]\nmod parent_death;\nmod readiness;\nmod server;\nmod session_guard;","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/mcp/mod.rs#L64-L100","documentation":"`astrid mcp ready` checks gateway readiness via Unix sockets, so on non-Unix targets a stub lifecycle::ready always fails with this error. Note the non-Unix stop_gateway stub returns Ok(()) — only readiness is refused.","triggerScenarios":"Invoking `astrid mcp ready` (any --format) on Windows or another non-Unix host.","commonSituations":"Health-check scripts run on Windows machines; Windows CI jobs probing a gateway; mixed environments where the CLI runs on the wrong host.","solutions":["Run the readiness check from a Unix host that can reach the gateway socket.","Perform the health check from inside WSL2.","Replace the Windows-hosted check with an HTTP/TCP probe against an exposed endpoint, if available.","Gate readiness polling scripts on the platform (skip on Windows)."],"exampleFix":"// before\nastrid mcp ready --format json   # on Windows\n// after\nwsl astrid mcp ready --format json","handlingStrategy":"fallback","validationCode":"if !cfg!(unix) {\n    eprintln!(\"readiness probe unavailable on this platform; use an alternate health endpoint\");\n}","typeGuard":"fn supports_mcp_ready() -> bool { cfg!(unix) }","tryCatchPattern":"match ready(principal, format).await {\n    Err(e) if e.to_string().contains(\"readiness is only supported on Unix\") =>\n        eprintln!(\"run the readiness check from a Unix host\"),\n    other => other?,\n}","preventionTips":["Run health checks from hosts that share the Unix socket filesystem","Use WSL2 for local checks on Windows","Provide an alternate HTTP health endpoint for non-Unix monitoring","Skip readiness polling in non-Unix scripts"],"tags":["platform","readiness","mcp","unsupported"],"backgroundTag":"unsupported-platform","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}