Repository navigation
golive: un-flake rehearse's "server dying mid R4" test - #1181
Merged
Merged
Conversation
The stub's __fork-report SIGKILLed the server and returned at once. A kill
is only queued: on a busy runner the server was still exiting when
rehearse polled it right after the report, so poll() said "running" and
the test saw no failure ("Failed not raised", seen on main).
The stub now returns only once the server is a zombie or gone, as a
server that died during the checks is. Under single-core contention the
test failed 5 of 20 runs before and 0 of 20 after.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner
Author
|
lens: code · reviewer: Claude Opus 5.5 (lens sub-agent) · read at: 26c25c5 blocker: none What I checked
State question. Runs again: each test has its own temp root, and the wait only reads 🤖 Generated with Claude Code |
scuttletoby
added a commit
that referenced
this pull request
Nov 28, 2026
The stub's __fork-report SIGKILLed the server and returned at once. A kill
is only queued: on a busy runner the server was still exiting when
rehearse polled it right after the report, so poll() said "running" and
the test saw no failure ("Failed not raised", seen on main).
The stub now returns only once the server is a zombie or gone, as a
server that died during the checks is. Under single-core contention the
test failed 5 of 20 runs before and 0 of 20 after.
Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
The flake
fork-kit/golive/tests/rehearse.test.pyRehearse.test_a_server_dying_mid_r4_failsfailed on main (Fork tests run 46087858969, "Fork kit tests 1") withAssertionError: Failed not raised. That commit changed nothing underfork-kit/golive/.Root cause
In
dieInReportmode the stub t3's__fork-reportsends SIGKILL to the server and returns immediately.rehearse.pythen callsserver.poll()right after reading the report. A kill is only queued. On a busy runner the server can still be exiting at that point, sopoll()returnsNone, rehearse sees a live server, and no R4 problem is raised.Fix (test fixture only)
The stub now returns only after the killed server is a zombie or gone (it reads
/proc/<pid>/stat, with a 30 s cap). That matches what the test means: "a server that died during the checks".rehearse.pyis unchanged.Proof
I ran the single test 20 times, pinned to one core with 3 busy loops on that core:
The whole file passes locally: 100 tests, ~57 s. Its runtime is unchanged, so
.github/fork-ci-tests.txtneeds no update. I also ran the schema, upstream-files and seam checks locally, and all three pass.🤖 Generated with Claude Code