fix: stop worker-subprocess tests from hanging CI for hours#1
Merged
Conversation
test_ac03_fork_time_travel_with_override assumed run_finished arrives before the final state_snapshot; 2bea33b swapped that order (state_snapshot now emitted first so RunRecorder captures finalState) without updating this test. The second _read_until(proc, "state_snapshot") then waited forever for an event that already went by, and proc.stdout.readline() has no timeout — one stuck assertion hung the whole pytest run, and with it the CI job, for hours (until GitHub's default 6h job timeout, twice, on unrelated docs-only commits). Fix the event-order assumption, and add tests/_worker_io.readline_timeout() (a thread+queue based read, since select() on the raw fd is fooled by TextIOWrapper's internal buffering) so any future protocol mismatch fails the affected test in seconds instead of stalling CI for hours. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012TFhXRCg399uZ3UrqgW61b
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.
test_ac03_fork_time_travel_with_override assumed run_finished arrives before the
final state_snapshot; 2bea33b swapped that order (state_snapshot now emitted
first so RunRecorder captures finalState) without updating this test. The second
_read_until(proc, "state_snapshot") then waited forever for an event that already
went by, and proc.stdout.readline() has no timeout — one stuck assertion hung the
whole pytest run, and with it the CI job, for hours (until GitHub's default 6h
job timeout, twice, on unrelated docs-only commits).
Fix the event-order assumption, and add tests/_worker_io.readline_timeout() (a
thread+queue based read, since select() on the raw fd is fooled by TextIOWrapper's
internal buffering) so any future protocol mismatch fails the affected test in
seconds instead of stalling CI for hours.
Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_012TFhXRCg399uZ3UrqgW61b