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

Full suite red: test/flake.test.ts #12032

Merged opened this in answer to

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

Merged

`test/flake.test.ts` was red because its rule against polls that fall through flagged one loop in `test/spawn-stopped-restart.test.ts`, at line 132. That loop waits up to 5 s for the first restart and then carries on whether or not it came.

shipped production is serving it deploy 2a250d0

opened this

test/flake.test.ts was red because its rule against polls that fall through flagged one loop in test/spawn-stopped-restart.test.ts, at line 132. That loop waits up to 5 s for the first restart and then carries on whether or not it came.

The fix is one line: expect(starts.length).toBeGreaterThan(0) right after the loop. A slow box now fails there, naming the missing restart, instead of failing later in the test. I changed nothing in test/flake.test.ts or scripts/flake.ts, and FALL_THROUGH_OWED is still empty.

bun test test/flake.test.ts test/spawn-stopped-restart.test.ts passes (42 tests). bun x tsc --noEmit and bun scripts/gate.ts are clean. I did not run the full suite.

I did not touch the loop's 5 s limit. It is unchanged, so a slow box can still run out; it now fails with a clear assertion.

Closes #12029

commented

test/flake.test.ts was red because its rule against polls that fall through flagged one loop in test/spawn-stopped-restart.test.ts, at line 132. That loop waits up to 5 s for the first restart and then carries on whether or not it came.

The fix is one line: expect(starts.length).toBeGreaterThan(0) right after the loop. A slow box now fails there, naming the missing restart, instead of failing later in the test. I changed nothing in test/flake.test.ts or scripts/flake.ts, and FALL_THROUGH_OWED is still empty.

bun test test/flake.test.ts test/spawn-stopped-restart.test.ts passes (42 tests). bun x tsc --noEmit and bun scripts/gate.ts are clean. I did not run the full suite.

I did not touch the loop's 5 s limit. It is unchanged, so a slow box can still run out; it now fails with a clear assertion.

Approved

Approved. The rule in test/flake.test.ts flagged a poll that falls through; both loops in spawn-stopped-restart.test.ts now assert that the restart came, so a slow box fails at the poll with a clear message. The rule and FALL_THROUGH_OWED are untouched, and this is a test-only change with no security, UI or door surface. Two things I would do next: (1) replace the 5 s sleep-poll with a wait on the start event itself (a promise the fake start resolves), so a slow box does not fail at all; (2) the first expect is followed by expect(starts).toEqual(["kid"]), which already implies length 1, so the new line there only improves the message. Keep it, but prefer one shared helper for the two loops so the next copy cannot drop the assertion.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs