Skip to content

test(runners): two tests no longer race a fast or a loaded runner - #47

Merged
sleep3r merged 2 commits into
mainfrom
fix/runner-drain-test-race
Oct 14, 2026
Merged

sleep3r merged 2 commits into
mainfrom
fix/runner-drain-test-race

Conversation

@sleep3r

@sleep3r sleep3r commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The release PR's CI (#45) failed once on a drain lets a held hidden-test run finish… (tests/runner-agent-lifecycle.test.mts): ENOENT … attempts/<id>/inputs/test.csv. The same test passed in #46's CI, on macOS and in a Linux node:22 run. A flake hunt on a Linux VM (the feature's 46 suites, six at once, three rounds) then caught a second one: an upload refused in the middle of its body is answered… (tests/remote-runners-doors.test.mts) took 1.6–1.7 s against a 1.5 s bound in three of six runs.

What

  • The drain test: the stand-in run ended at once, so on a fast runner the agent could settle it and remove its tree between the test's wait for the run and its read of the run's /data. The run now waits for that read (seam.next = 'wait', then seam.release()), as the sync test's run already does.
  • The upload test: what it means is that home does not drain a body it refuses before reading. It now counts the chunks sent before the answer (24 of 1024 locally; the sockets' buffers hold a few megabytes, a drained body all 64) and keeps a 10 s bound against an answer that waits for a timeout.

Nothing outside the tests changes.

…den test

The stand-in run ended at once, so on a fast runner the agent could
settle it and remove its tree between the wait for the run and the read
of its /data: ENOENT on test.csv in the release PR's CI. The run now
waits for the read, as the sync test's run does.
…conds

"Answered before the sixty-four megabytes were sent" was a 1.5 s bound,
and six suites at once on one VM stretched it to 1.6–1.7 s in three runs
of six. What the test means is that home does not drain the body: it
now counts the chunks sent before the answer (24 of 1024 here; a socket's
buffers hold a few megabytes, a drained body all of them) and keeps a
10 s bound against an answer that waits for a timeout.
@sleep3r sleep3r changed the title test(runners): the drain test holds its run until it has read the hidden test test(runners): two tests no longer race a fast or a loaded runner Oct 14, 2026
@sleep3r
sleep3r merged commit 71e5929 into main Oct 14, 2026
7 of 8 checks passed
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