Skip to content

test(launch): the launch stubs are warm before the bounded reach probe (#875) - #912

Open
akleizor wants to merge 1 commit into
mainfrom
hive/875-land
Open

akleizor wants to merge 1 commit into
mainfrom
hive/875-land

Conversation

@akleizor

Copy link
Copy Markdown
Owner

Closes #875

A launch's reach probe gives a gateway five seconds, and curl's own start
sits inside that bound (util/reach.go). macOS validates a freshly written
executable on its first exec; under the load the gate ran at, those scans
queue past the bound, the probe kills the stub before it runs, and a
healthy route is reported as "no answer" (exit 75).
test_launch_model_flag_drives_the_window_not_the_conf_default and
test_launch_reads_its_arrays_under_a_callers_ksh_arrays were the two that
lost that race; both hid it by deleting the test home on the launch's
status.

Both now keep the launch's status and output in the test home and name
them, and the model-flag test prints the MAX_CONTEXT line it read beside
the one it expected. Installing a stub pays its first exec through
warm_curl_stub, outside every bound, with an isolated HOME so
fake_gateway's curl.args record stays the launch's own; setup_home and the
shared curl helpers call it, and the three inline stubs that share this
one call it after their write. The product contract is untouched: a
gateway that really stays silent is still fatal within doctor's five
seconds.

Proven: a stub whose first exec sleeps 6s makes the old path fail with
exit 75 and the new one pass; both tests pass 3 consecutive solo runs; the
full zsh suite passes 341/0 while go test ./... runs alongside at load
average 76.39 on 4 CPUs.

Closes #875

Co-Authored-By: Claude Code noreply@anthropic.com

#875)

A launch's reach probe gives a gateway five seconds, and curl's own start
sits inside that bound (util/reach.go). macOS validates a freshly written
executable on its first exec; under the load the gate ran at, those scans
queue past the bound, the probe kills the stub before it runs, and a
healthy route is reported as "no answer" (exit 75).
test_launch_model_flag_drives_the_window_not_the_conf_default and
test_launch_reads_its_arrays_under_a_callers_ksh_arrays were the two that
lost that race; both hid it by deleting the test home on the launch's
status.

Both now keep the launch's status and output in the test home and name
them, and the model-flag test prints the MAX_CONTEXT line it read beside
the one it expected. Installing a stub pays its first exec through
warm_curl_stub, outside every bound, with an isolated HOME so
fake_gateway's curl.args record stays the launch's own; setup_home and the
shared curl helpers call it, and the three inline stubs that share this
one call it after their write. The product contract is untouched: a
gateway that really stays silent is still fatal within doctor's five
seconds.

Proven: a stub whose first exec sleeps 6s makes the old path fail with
exit 75 and the new one pass; both tests pass 3 consecutive solo runs; the
full zsh suite passes 341/0 while go test ./... runs alongside at load
average 76.39 on 4 CPUs.

Closes #875

Co-Authored-By: Claude Code <noreply@anthropic.com>
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.

test: two launch tests fail under parallel load, pass alone, and one fails without saying why

1 participant