mirror of
https://github.com/stablyai/orca.git
synced 2026-10-23 08:03:39 +00:00
Round-two review of the STA-1756 fix found three real holes: Probe-then-remove was two SSH round-trips, wide enough for another client to bind the path in between — the removal would then unlink a live owner's socket, the same displacement this change exists to prevent. Probe and unlink now happen in one host command, and the unlink is guarded by the dev/ino the probe saw, the same recheck the relay uses for its own stale-socket cleanup. ECONNREFUSED alone is not proof of absence: a live Unix listener whose accept backlog is momentarily full refuses connections too (verified — 199 of 200 simultaneous connects to a live listener with backlog 1). The release now prefers lsof, which proves an owner is *there* (never absence, since a denied lsof says nothing), and otherwise retries the connect three times before concluding. Reset — the action the new error tells users to take — removed the socket even when it found no owner to kill, or when the kill was refused. On a host with neither lsof nor pgrep that stranded exactly the relay it was asked to stop. It now re-checks after signalling and reports failure instead of unlinking. Also drops a citation to a doc that is not on main; the liveness vocabulary lives in src/shared/pty-liveness-verdict.ts. The live-daemon oracle now runs in its own CI job that builds the relay first, since the sharded test lane never builds out/relay and silently skipped it. It also covers the no-lsof host, and no longer kills a daemon before it can dispose its PTYs.