Skip to content

fix(test): explicit 20s per-test timeout on the oversized-command test (WALL 1 of the e2b drain) - #26

Closed
andrei-hasna wants to merge 1 commit into
mainfrom
A2-00200-hooks-test-timeout
Closed

fix(test): explicit 20s per-test timeout on the oversized-command test (WALL 1 of the e2b drain)#26
andrei-hasna wants to merge 1 commit into
mainfrom
A2-00200-hooks-test-timeout

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

What failed

hooks/codewith-native-common.test.ts > "a command too large to tokenize is decided, not left to the timeout" fails in CI/factory runs. Diagnosed by agent-ceo as WALL 1 (conversations message 683509); tracked as todos A2-00200 (a26bcbf0-bf3f-4db3-a5fa-1840bc190ef7).

Measured failure (bun test on main @ c47fd8b, station01)

(fail) destructive shell guard - rm -rf /* incident regression > a command too large to tokenize is decided, not left to the timeout [5706.95ms]
  ^ this test timed out after 5000ms.

 1078 pass
 1 fail
Ran 1079 tests across 21 files. [147.29s]

The test builds a ~280 MB command string and asserts its own performance bound of toBeLessThan(15000) ms — but declares no per-test timeout, so bun's 5000 ms default kills it before its own assertion can decide. (The brief described the window as ~15 s; the measured run was 5706.95 ms — the mechanism is exactly as diagnosed: asserted window 15 s, runner window 5 s.)

The fix

Pass bun's per-test timeout argument (20000) on this one test only. 20 s sits above the asserted 15 s window plus the 280 MB string construction that happens before the clock starts, so a slow classify still fails the test's own assertion rather than the runner. The suite-wide default is untouched — no other test's timeout changes.

After

 1079 pass
 0 fail
 4059 expect() calls
Ran 1079 tests across 21 files. [147.63s]

Staged secrets scan: clean. Do not merge before adversarial review — a reviewer is dispatched separately.

Refs: todos A2-00200 (a26bcbf0-bf3f-4db3-a5fa-1840bc190ef7), conversations 683509.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

…imeout

The test "a command too large to tokenize is decided, not left to the
timeout" asserts its own performance bound of 15000ms, but declared no
per-test timeout, so bun's 5000ms default killed it before the assertion
could decide (measured: timed out at 5000ms, run took 5706.95ms). This
was WALL 1 killing e2b drain runs (todos A2-00200, conversations 683509).

The fix passes bun's per-test timeout argument (20000ms) on this one
test only: above the asserted 15s window plus the 280MB string
construction that precedes the clock, so a slow classify still fails the
test's own assertion rather than the runner. The suite-wide default is
untouched.

Before: 1078 pass, 1 fail. After: 1079 pass, 0 fail.

Agent: agent-chief-harness
@andrei-hasna

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #25, which fixes the identical test and is already CI-green.

Both PRs were opened 78 seconds apart and both carry this seat's identity in their
commit trailers — #25 Agent: Silvanus, this one Agent: agent-chief-harness. They are
two dispatches under one seat's two registered names, which is the duplication cause
rather than either agent's error.

Why #25 survives, stated so the choice is checkable rather than arbitrary:

Nothing here is a criticism of this change — it is a correct fix for a real defect and it
would have worked. Only one of the two should land.

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