Skip to content

test(scripts): stop fake go stub looping forever - #530

Merged
wstein merged 1 commit into
mainfrom
fix/399-source-install-test-hang
Oct 9, 2026
Merged

wstein merged 1 commit into
mainfrom
fix/399-source-install-test-hang

Conversation

@wstein

@wstein wstein commented Oct 9, 2026

Copy link
Copy Markdown
Owner

The fake go stubs in scripts/install_test.go ended in a shift loop that never terminates for any call without -o (99% CPU, orphaned when the test ended: two such processes ran for 18 h). Both stubs now exit 2 when no -o is found; make runs in its own process group with a 3-minute deadline and a group kill on cancel and in cleanup; a regression test fails on the old stub.

Opus review: CLEAR at 3653290. The reviewer reproduced the orphan (old stub behind a Makefile calling go env GOFLAGS, make killed with -9: child survived with ppid 1), verified process-group handling on macOS (hang in a shell function, in a recipe, and a failing test: all killed, nothing left), caught the old-stub mutation, scanned 43 test files with shell stubs and found no other unbounded loop. Lows noted on #399: go test -timeout shorter than 3 min skips cleanups; the second stub copy has no direct guard; one barrier loop in board_snapshot_test.go is unbounded only if the test panics.

Refs: #399

🤖 Generated with Claude Code

The source-install fake go shifted through an empty argument list
for any subcommand without -o (e.g. go version), spinning at full CPU
and surviving as an orphan. It now exits 2, make runs in its own
process group under a deadline and is killed on cleanup.

Refs: #399
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@wstein

wstein commented Oct 9, 2026

Copy link
Copy Markdown
Owner Author

Opus review CLEAR at 3653290: orphan reproduced (old stub behind a Makefile calling go env GOFLAGS, make killed with -9, child survived with ppid 1), process-group kill verified on macOS for a hang in a shell function, in a recipe and for a failing test, regression test fails on the old stub, 43 test files with shell stubs scanned with no other unbounded loop, go test ./... and make check-ci exit 0. Lows (go test -timeout shorter than 3 min, second stub copy unguarded, one barrier loop in board_snapshot_test.go) go to #399.

Co-Authored-By: Claude Sonnet 5.5 [email protected]

@wstein
wstein marked this pull request as ready for review October 9, 2026 12:41
@wstein
wstein merged commit fb58866 into main Oct 9, 2026
20 of 21 checks passed
@wstein
wstein deleted the fix/399-source-install-test-hang branch October 9, 2026 12:44
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