Skip to content

ci(windows): remaining RPC named-pipes job flake variants (host-ensure concurrent-start SIGTERM, lifecycle hostAlive probe) #1290

Description

@code-yeongyu

Summary

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.

Fixed at the root (2026-09-02)

Still open

  1. 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.
  2. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions