Skip to content

Relay pair tests stop racing the CI runner - #108

Merged
karngyan merged 1 commit into
mainfrom
relay-pair-timeout
Aug 19, 2026
Merged

Relay pair tests stop racing the CI runner#108
karngyan merged 1 commit into
mainfrom
relay-pair-timeout

Conversation

@karngyan

Copy link
Copy Markdown
Contributor

PR #104's CI run had four test/pair.test.ts failures at once: 504 "daemon did not answer" where 200/429/204 were expected. Root cause, reproduced locally by shrinking the deadline: the tests' fake daemon must answer within the PAIR_TIMEOUT_MS: 250 test binding, and a stalled runner collected on that bet (the failing run shows a 14-second gap around the failures; nothing reproduces locally at 250 ms).

The handshake and idle deadlines were already rebound long after identical flakes — the config comment documents that history. This applies the same rule to the last short-bound deadline: ambient PAIR_TIMEOUT_MS goes to 600 s so no test can outlive it, a pairTimeout() harness helper joins handshakeDeadline()/idleTimeout(), and the one test about the 504 binds its own 250 ms before dialing. Full relay suite green three consecutive runs.

🤖 Generated with Claude Code

Four pair tests 504ed in one CI run when a stalled runner stretched a
daemon answer past the 250 ms PAIR_TIMEOUT_MS test binding. The
handshake and idle deadlines already learned this lesson — bind long
ambient so no test can outlive the deadline, and let the tests that
are about the deadline bind their own short one. The pairing deadline
now follows the same rule via a pairTimeout() harness helper, used by
the one test that asserts the 504.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@karngyan
karngyan merged commit 26af3f9 into main Aug 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant