{"record":{"id":"4ee9efb12a8a93c2","repo":"astrid-runtime/astrid","slug":"windows-named-pipe-endpoint-is-absent","errorCode":null,"errorMessage":"Windows named-pipe endpoint is absent","messagePattern":"Windows named-pipe endpoint is absent","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-core/src/local_transport/windows.rs","lineNumber":334,"sourceCode":"    matches!(\n        error.raw_os_error().map(i32::cast_unsigned),\n        Some(ERROR_BROKEN_PIPE | ERROR_NO_DATA | ERROR_PIPE_NOT_CONNECTED)\n    )\n}\n\npub(super) fn split(\n    stream: LocalStream,\n) -> (\n    tokio::io::ReadHalf<LocalStream>,\n    tokio::io::WriteHalf<LocalStream>,\n) {\n    tokio::io::split(stream)\n}\n\npub(super) fn probe(path: &Path) -> io::Result<()> {\n    match endpoint_state(path)? {\n        EndpointState::Available => Ok(()),\n        EndpointState::Absent => Err(io::Error::new(\n            io::ErrorKind::NotFound,\n            \"Windows named-pipe endpoint is absent\",\n        )),\n        EndpointState::BusyOrDenied => Err(io::Error::new(\n            io::ErrorKind::WouldBlock,\n            \"Windows named-pipe endpoint is occupied but unavailable\",\n        )),\n    }\n}\n\npub(super) fn endpoint_is_present(path: &Path) -> io::Result<bool> {\n    Ok(!matches!(endpoint_state(path)?, EndpointState::Absent))\n}\n\npub(super) fn remove_endpoint(path: &Path) -> io::Result<()> {\n    if endpoint_is_present(path)? {\n        return Err(io::Error::new(\n            io::ErrorKind::PermissionDenied,","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-core/src/local_transport/windows.rs#L316-L352","documentation":"probe() checks a Windows named-pipe endpoint's state without connecting; EndpointState::Absent (the pipe name does not exist) is reported as io::ErrorKind::NotFound with this message. It is a non-blocking readiness check telling the caller that no server is currently listening on that pipe name.","triggerScenarios":"Calling probe(path) when no process has created the named pipe (CreateNamedPipe) for the given path, or the server has closed its listener.","commonSituations":"Client probes before the server finished starting; the server process died; the pipe name is misspelled so it never matches the server's name.","solutions":["Ensure the server is running and has created the pipe endpoint before probing; add startup ordering/readiness waiting","Verify the exact pipe path/name matches what the server creates","If the server was expected, restart it and re-probe; treat NotFound as 'wait for server' rather than a fatal client bug"],"exampleFix":"// before\nprobe(&pipe_path)?; // may NotFound if server not up\n// after\nwait_until(|| probe(&pipe_path).is_ok(), Duration::from_secs(10))?;","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"// wait for server readiness instead of failing on first probe\nlet deadline = Instant::now() + Duration::from_secs(10);\nwhile probe(&pipe).is_err() {\n    if Instant::now() > deadline { bail!(\"named-pipe endpoint never appeared\"); }\n    sleep(Duration::from_millis(50)).await;\n}","preventionTips":["Sequence startup so the server creates the pipe before clients probe","Compare the pipe name byte-for-byte against what the server creates","Treat probe NotFound as 'not ready yet' with a bounded wait, not an immediate failure"],"tags":["windows","named-pipes","ipc","io"],"backgroundTag":"file-not-found","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"}