You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky test: submit.contract.test.ts refuses the first message on a busy CI runner #450
server/submit.contract.test.ts, "types nothing of a message that waited past its deadline behind another", fails now and then in the "Integration and browser" job, on PRs that do not touch server/:
error: expect(received).toMatchObject(expected)
- "ok": true,
+ "code": "submit_timeout",
+ "id": 1,
+ "message": "the message waited too long behind earlier input; nothing was typed",
at server/submit.contract.test.ts:280
Seen three times in two days, each time gone on a rerun or on the next run:
The test starts a server with submitDeadlineMs: 50 and sends two messages. The second is meant to pass the deadline while it waits behind the first one's gap (SUBMIT_DELAY_MS, 120 ms). The deadline is measured from the moment a message reaches the server to the start of its turn (server/index.ts, Date.now() - arrivedAt > submitDeadlineMs), so the first message has the same 50 ms to get its turn. On a runner that is busy (the integration files run four at a time beside the browser lane) that is not always enough, and message 1 is the one refused.
A fix
Make the two sides of the comparison far apart instead of 50 ms against 120 ms. For example a createServer option for the gap, used only by this test: a gap of about a second and a deadline of a few hundred ms. The first message then has hundreds of ms to start, and the second still waits well past the deadline.
Also seen once each on the same day
In the same job, on #439, which changes none of these:
server/updater.test.ts:327, "hands over to the installed release's own supervisor" (expected 0, received 1)
server/api.contract.test.ts, "rejects input from a non-attached client and signals readiness to the owner"
scripts/chat-size-regression.ts:163, "the picked pane attaches in its own lens" (keep_size undefined on the attach frame)
Activity
fix(update): an update command waits until the supervisor's start is …
test(submit): the deadline test gives the first message 500ms to star…