From e1ad95c4289b848fd1a33f09923c284a7a85bc43 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Mon, 9 Nov 2026 13:28:53 -0800 Subject: [PATCH 1/2] test(js): quarantine the worklet test that times out under load and plan its fix The dev-server test in js/common/worklet.test.ts hit bun's 5 s timeout in a loaded full `just check` on moq-dev/moq#8325. It is skipped until a quest finds the cause; the timeout is not raised. Co-Authored-By: Claude Haiku 5.5 --- js/common/worklet.test.ts | 3 +- quest/m0/test-flakes-2/README.md | 6 +++ quest/m0/test-flakes-2/worklet-dev-server.md | 49 ++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 quest/m0/test-flakes-2/worklet-dev-server.md diff --git a/js/common/worklet.test.ts b/js/common/worklet.test.ts index c8ba6c5d094..4827db8baae 100644 --- a/js/common/worklet.test.ts +++ b/js/common/worklet.test.ts @@ -59,7 +59,8 @@ test("worklet modules load a lazy blob or a hosted script, leaving no child proc }); // A page that calls assets() in dev fetches the same path a build emits, so the dev server serves it. -test("the dev server serves hosted worklets where builds emit them", async () => { +// Quarantined: flaky under load, see /quest/m0/test-flakes-2/worklet-dev-server.md +test.skip("the dev server serves hosted worklets where builds emit them", async () => { const dir = mkdtempSync(join(tmpdir(), "worklet-")); const server = await createServer({ configFile: false, diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index a08e0c3e7ec..9f2634c19c6 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -241,6 +241,11 @@ reader got `Unroutable` after the endpoint closed during [moq-dev/moq#8293](https://github.com/moq-dev/moq/pull/8293)'s loaded `just check`. It is quarantined with `pytest.mark.skip` until its child fixes it. +Added 2026-11-09 (maintainer, `/quest-complete`, under the flaky-test rule): +`js/common/worklet.test.ts`'s dev-server test, which hit bun's 5 s timeout in a +loaded full `just check` on [moq-dev/moq#8325](https://github.com/moq-dev/moq/pull/8325). +It is quarantined with `test.skip` until its child fixes it. + Public API: none. Wire: none. ## Required @@ -250,3 +255,4 @@ Public API: none. Wire: none. - [js/net's lite-07 re-dropped re-offer test holds up under load](/quest/m0/test-flakes-2/redropped-reoffer.md) - update 3 is ordered before the re-offer opens by an event, not a yield count, and its `test.skip` is removed - [js/net's datagram session-close-after-end test holds up under load](/quest/m0/test-flakes-2/datagram-close-end.md) - the abort is ordered after the end by an event the client observes, and its `test.skip` is removed - [moq-rs's Python TCP close test settles on a promised error](/quest/m0/test-flakes-2/tcp-close-unroutable.md) - the reader's error after an endpoint close is one the socket contract promises, and its `pytest.mark.skip` is removed +- [js/common's worklet dev-server test holds up under load](/quest/m0/test-flakes-2/worklet-dev-server.md) - the dev-server test passes on a loaded host, and its `test.skip` is removed diff --git a/quest/m0/test-flakes-2/worklet-dev-server.md b/quest/m0/test-flakes-2/worklet-dev-server.md new file mode 100644 index 00000000000..bbbed6f565f --- /dev/null +++ b/quest/m0/test-flakes-2/worklet-dev-server.md @@ -0,0 +1,49 @@ +# [S] js/common's worklet dev-server test holds up under load + +## Goal + +`js/common/worklet.test.ts`'s "the dev server serves hosted worklets where +builds emit them" passes on a loaded host, and its `test.skip` is removed. The +fix lands at the cause of the timeout, never by raising bun's 5 s test timeout +or adding a retry. + +## Plan + +Decided 2026-11-09 (maintainer, `/quest-complete`), under the repository's +flaky-test rule: quarantine the test and plan a quest. Rejected: leave it +enabled and watch it. + +Evidence: a full `just check` on +[moq-dev/moq#8325](https://github.com/moq-dev/moq/pull/8325)'s branch, with the +host loaded, hit bun's 5 s timeout in `js/common/worklet.test.ts`. The test +passed alone and on a second full run. The log of the failed run was not kept, +so which test timed out is unconfirmed. + +Candidate, unconfirmed: the dev-server test. It is the only one that opens real +sockets, starts a Vite dev server, makes several requests, and awaits +`server.close()` in its `finally`. Alone on 2026-11-09 it took 322 ms, against +208 ms for the lazy-blob test. The file reported 4.98 s for its two tests, +though their bodies took about 0.5 s together. The rest of that time is outside +the test bodies and was not measured, so it is not evidence either way. + +Reproduction attempts, all on 2026-11-09, all passing: + +- `bun test js/common/worklet.test.ts --rerun-each 60` on the already loaded + host: 120 of 120. +- The same with 48 CPU burners and `--rerun-each 150`: 300 of 300. +- The root JS set (`api`, `constructors`, `deps`, `worklet`, `release`, which + bun runs in one process) with 48 burners and `--rerun-each 20`: 640 of 640. + +Suspected, not confirmed: the dev server's setup or `close()` waits on I/O under +load past the 5 s budget; or state from an earlier file in the same bun process +(the root set shares one process) delays this test's timers. Reproduce the +failure first: run the root `bun test` set under a loaded `just check`, and keep +the log with the failing test's name. Then fix the step that outruns the +budget: wait on an event the test can observe, not a longer deadline or a +retry. If the failure is in the shared process rather than the test, fix it +there. + +The earlier round already fixed other `worklet.test.ts` flakes, so this is a new +cause, not a regression of those. + +Public API: none. Wire: none. From d83688ffb77432140a22974bf30d1e5b86a512a0 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Mon, 9 Nov 2026 16:16:24 -0800 Subject: [PATCH 2/2] quest: call the worklet dev-server test a candidate, and unskip it before reproducing The failed log was never kept, so the timed-out test is unconfirmed. A skipped test cannot fail, so the reproduction step first removes its test.skip. Co-Authored-By: Claude Haiku 5.5 --- quest/m0/test-flakes-2/README.md | 5 +++-- quest/m0/test-flakes-2/worklet-dev-server.md | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index 51b4911e7d2..8aefbd5a79e 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -242,8 +242,9 @@ reader got `Unroutable` after the endpoint closed during It is quarantined with `pytest.mark.skip` until its child fixes it. Added 2026-11-09 (maintainer, `/quest-complete`, under the flaky-test rule): -`js/common/worklet.test.ts`'s dev-server test, which hit bun's 5 s timeout in a -loaded full `just check` on [moq-dev/moq#8325](https://github.com/moq-dev/moq/pull/8325). +`js/common/worklet.test.ts`'s dev-server test, a candidate for bun's 5 s timeout +in a loaded full `just check` on [moq-dev/moq#8325](https://github.com/moq-dev/moq/pull/8325). +The failed log was not retained, so the failing test is unconfirmed. It is quarantined with `test.skip` until its child fixes it. Public API: none. Wire: none. diff --git a/quest/m0/test-flakes-2/worklet-dev-server.md b/quest/m0/test-flakes-2/worklet-dev-server.md index bbbed6f565f..cf11dbd6e76 100644 --- a/quest/m0/test-flakes-2/worklet-dev-server.md +++ b/quest/m0/test-flakes-2/worklet-dev-server.md @@ -36,9 +36,10 @@ Reproduction attempts, all on 2026-11-09, all passing: Suspected, not confirmed: the dev server's setup or `close()` waits on I/O under load past the 5 s budget; or state from an earlier file in the same bun process -(the root set shares one process) delays this test's timers. Reproduce the -failure first: run the root `bun test` set under a loaded `just check`, and keep -the log with the failing test's name. Then fix the step that outruns the +(the root set shares one process) delays this test's timers. Temporarily remove +the candidate's `test.skip` locally first, since a skipped test cannot fail. +Reproduce the failure: run the root `bun test` set under a loaded `just check`, +and keep the log with the failing test's name. Then fix the step that outruns the budget: wait on an event the test can observe, not a longer deadline or a retry. If the failure is in the shared process rather than the test, fix it there.