Skip to content

test(worker): assert the timeout contract instead of driver log timing - #45

Merged
alphastorm merged 1 commit into
mainfrom
test/agent-browser-timeout-flake
Nov 14, 2026
Merged

alphastorm merged 1 commit into
mainfrom
test/agent-browser-timeout-flake

Conversation

@alphastorm

Copy link
Copy Markdown
Owner

Defect

extensions/oracle/worker/agent-browser-helpers.test.mjs › "hung command has a bounded typed timeout" required exactly two logged driver calls. The fake driver logs a call when its stdin ends, and the runner kills the hung snapshot -i after 200 ms. On a loaded host that process is often killed before Node has started and logged it, so only the status probe appears (1 !== 2). It failed once in a full verify:oracle run during the archive work (#41).

Fix

The test now asserts the runner's contract instead of the fake's log timing:

  • the timed-out command is logged at most once, so it is never replayed;
  • exactly one --json stream status probe follows the timeout.

The typed-error and elapsed-time assertions are unchanged.

Verification

  • 48 runs of only this test, 24 at a time on a host already at load average ~11: the old assertion failed 40 of 48, all on the call count; the new test failed 0 of 48 (load average ~13).
  • The whole file passes (12/12), and npm run verify:oracle passes.

The hung-command test required two logged driver calls, but the fake logs a call only when its stdin ends, and on a loaded host the 200 ms timeout kills the hung command before that (40 of 48 concurrent runs failed). It now asserts that the command is never replayed and that exactly one status probe follows the timeout.
@alphastorm
alphastorm merged commit 99b6db1 into main Nov 14, 2026
1 check passed
@alphastorm
alphastorm deleted the test/agent-browser-timeout-flake branch November 14, 2026 01:30
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