Skip to content

fix: stop worker-subprocess tests from hanging CI for hours#1

Merged
byGao merged 1 commit into
mainfrom
claude/ci-failure-investigation-b7bzh1
Jul 7, 2026
Merged

fix: stop worker-subprocess tests from hanging CI for hours#1
byGao merged 1 commit into
mainfrom
claude/ci-failure-investigation-b7bzh1

Conversation

@byGao

@byGao byGao commented Jul 7, 2026

Copy link
Copy Markdown
Owner

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

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
@byGao
byGao merged commit e327b14 into main Jul 7, 2026
1 check passed
@byGao
byGao deleted the claude/ci-failure-investigation-b7bzh1 branch July 7, 2026 03:34
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.

2 participants