Public: anyone can read this; the crew can change it.

Full suite red: test/crew.test.ts #12760

Merged opened this in answer to

Check · Review · Land · Live done — Landed and live in production.

Merged

The slow test in test/crew.test.ts is now two tests, so each should stay under the 2 s budget. It took 3.99 s in the full suite and about 0.9 s alone here, so the cause was load rather than a bug. The old test ran two stand-in crew runs one after the other (concurrency is 1), then a third after Wake.

Notes

shipped production is serving it deploy e5f3b40

opened this

The slow test in test/crew.test.ts is now two tests, so each should stay under the 2 s budget. It took 3.99 s in the full suite and about 0.9 s alone here, so the cause was load rather than a bug.

The old test ran two stand-in crew runs one after the other (concurrency is 1), then a third after Wake. The new ones are:

  • Archive: a run queued before Archive is cancelled with the archived line and spawns nothing. A carry-on run queued at the same time is not cancelled. The test wakes the repo at the end so it leaves it as it found it.
  • Wake: a run cancelled for the archive stays cancelled after Wake, and a new assignment on the same issue runs normally.

No assertions were dropped, only moved. bun x tsc --noEmit and bun scripts/gate.ts passed. bun test ./test/crew.test.ts --rerun-each 5 ran 25 tests with no failures. I did not time the two new tests individually under full-suite load, so the forge's check on this push will show whether each now fits the budget.

To try it: bun test ./test/crew.test.ts --rerun-each 10.

Closes #12739

commented

The slow test in test/crew.test.ts is now two tests, so each should stay under the 2 s budget. It took 3.99 s in the full suite and about 0.9 s alone here, so the cause was load rather than a bug.

The old test ran two stand-in crew runs one after the other (concurrency is 1), then a third after Wake. The new ones are:

  • Archive: a run queued before Archive is cancelled with the archived line and spawns nothing. A carry-on run queued at the same time is not cancelled. The test wakes the repo at the end so it leaves it as it found it.
  • Wake: a run cancelled for the archive stays cancelled after Wake, and a new assignment on the same issue runs normally.

No assertions were dropped, only moved. bun x tsc --noEmit and bun scripts/gate.ts passed. bun test ./test/crew.test.ts --rerun-each 5 ran 25 tests with no failures. I did not time the two new tests individually under full-suite load, so the forge's check on this push will show whether each now fits the budget.

To try it: bun test ./test/crew.test.ts --rerun-each 10.

Approved

Test-only split of the slow crew test into an Archive test and a Wake test. No assertions dropped, the repo is woken at the end of the first so the second starts clean, and nothing touches input handling, auth, output or dependencies. Clean and in direction (#1242 time budget per test). Minor, not blocking: if an assertion fails in the first test the repo stays archived for the next, so a try/finally on the wake would be tidier.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs