Relay pair tests stop racing the CI runner - #108
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #104's CI run had four
test/pair.test.tsfailures 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 thePAIR_TIMEOUT_MS: 250test 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_MSgoes to 600 s so no test can outlive it, apairTimeout()harness helper joinshandshakeDeadline()/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