You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RPC named pipes (Windows) CI job (runs test/rpc-host-ensure.test.ts and test/rpc-host-lifecycle.test.ts on windows-latest) fails intermittently with several independent variants. Two were fixed at the root today; two remain and are tracked here so they are not mistaken for regressions in unrelated PRs.
rpc-host-ensure.test.ts > serializes concurrent starts for one socket across agent directories -> Error: RPC socket host exited with code null (SIGTERM) before answering get_protocol_info, followed by ENOTEMPTY ... rmdir senpi-host-ensure-cross-agent-race-* in cleanup. Seen: run 33602751743 attempt 1 (PR fix(rpc): scope multi-session socket events to attached connections #1277), run 33615244048 attempt 2 job 100202119649 (PR fix(rpc): scope multi-session socket events to attached connections #1277 at 44c7414, which does not touch host-ensure). The second caller ends up spawning (its existing-host probe did not reuse the first caller's fixture host) and its spawned host is SIGTERM'd before readiness - candidate causes: the 10 s existing-host probe timing out on the runner and stopManagedHost terminating the live fixture, or pidfile identity confusion between the two agent dirs.
rpc-host-lifecycle.test.ts > does not exit while a turn is active even with no connections; exits after the turn settles -> expect(await hostAlive(entry.pidFile)).toBe(true) false at line 201. Seen: run 33602751743 attempt 2 job 100164143208 and run 33615244048 attempt 1 job 100199445430 (both PR fix(rpc): scope multi-session socket events to attached connections #1277; the same file passes on macOS/Linux with the same tree). hostAlive goes through the 1 s PowerShell CIM identity probe (readProcessStartTime) with no retry, so a slow probe reads as "host gone"; production callers got retry in 1640d9b, this test helper did not.
Suggested next steps
Variant 2: give the test's hostAlive the same bounded retry the production probe has (or reuse waitForStartTime), and capture supervisor stderr on failure to distinguish a real exit from a probe timeout.
Variant 1: log which branch ensureHostLocked took for the second caller (reuse / stop+spawn) and the probe timing; on Windows consider lengthening EXISTING_HOST_PROBE_TIMEOUT_MS or serializing the fixture's readiness with the lock release.
Summary
The
RPC named pipes (Windows)CI job (runstest/rpc-host-ensure.test.tsandtest/rpc-host-lifecycle.test.tson windows-latest) fails intermittently with several independent variants. Two were fixed at the root today; two remain and are tracked here so they are not mistaken for regressions in unrelated PRs.Fixed at the root (2026-09-02)
serializes concurrent starts for one socket across agent directories->Error: database is locked: ensure-lock wait (10 s) shorter than the holder's critical section.starts a fresh host transparently on the next ensure after an idle exit->Stop-Processon an already idle-exited pid /ENOENT host.pid: teardown and pidfile read raced the 600 ms idle exit.Still open
rpc-host-ensure.test.ts > serializes concurrent starts for one socket across agent directories->Error: RPC socket host exited with code null (SIGTERM) before answering get_protocol_info, followed byENOTEMPTY ... rmdir senpi-host-ensure-cross-agent-race-*in cleanup. Seen: run 33602751743 attempt 1 (PR fix(rpc): scope multi-session socket events to attached connections #1277), run 33615244048 attempt 2 job 100202119649 (PR fix(rpc): scope multi-session socket events to attached connections #1277 at 44c7414, which does not touch host-ensure). The second caller ends up spawning (its existing-host probe did not reuse the first caller's fixture host) and its spawned host is SIGTERM'd before readiness - candidate causes: the 10 s existing-host probe timing out on the runner andstopManagedHostterminating the live fixture, or pidfile identity confusion between the two agent dirs.rpc-host-lifecycle.test.ts > does not exit while a turn is active even with no connections; exits after the turn settles->expect(await hostAlive(entry.pidFile)).toBe(true)false at line 201. Seen: run 33602751743 attempt 2 job 100164143208 and run 33615244048 attempt 1 job 100199445430 (both PR fix(rpc): scope multi-session socket events to attached connections #1277; the same file passes on macOS/Linux with the same tree).hostAlivegoes through the 1 s PowerShell CIM identity probe (readProcessStartTime) with no retry, so a slow probe reads as "host gone"; production callers got retry in 1640d9b, this test helper did not.Suggested next steps
hostAlivethe same bounded retry the production probe has (or reusewaitForStartTime), and capture supervisor stderr on failure to distinguish a real exit from a probe timeout.ensureHostLockedtook for the second caller (reuse / stop+spawn) and the probe timing; on Windows consider lengtheningEXISTING_HOST_PROBE_TIMEOUT_MSor serializing the fixture's readiness with the lock release.