From 4218f3f846650dafe03584591f4586158b49d21d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 8 Nov 2026 13:04:57 -0800 Subject: [PATCH 1/3] chore(quest): claim quest/m0/test-flakes-2/session-close-end.md Quest-Claim: ece51a09725e6d7b From a3b70774bed0aa766d3059c33acd8c6871103102 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 8 Nov 2026 13:21:18 -0800 Subject: [PATCH 2/3] quest: record the lite-06 session-close investigation (no repro) Co-Authored-By: Claude Opus 5.5 --- quest/m0/test-flakes-2/session-close-end.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/quest/m0/test-flakes-2/session-close-end.md b/quest/m0/test-flakes-2/session-close-end.md index eb06f97bdde..45afc486ac4 100644 --- a/quest/m0/test-flakes-2/session-close-end.md +++ b/quest/m0/test-flakes-2/session-close-end.md @@ -23,4 +23,18 @@ that event, never a longer drain, timeout, or retry. Reproduce with `bun test --rerun-each 200` under a loaded machine first. Then remove the skip and delete this quest. +Investigated 2026-11-08 (no repro): on `main` and on the failing queue's base +`12e41a369e`, with Bun 1.4.2 as in CI, 24 parallel copies of +`--rerun-each 300` of the lite-06 case (7,200 runs each), 640 loaded runs of +the whole file, and 12 parallel full `js/net` suites all passed. Instrumenting +`@moq/clock`'s host `task()` showed the case runs in one host task: only the +two `AuthSession` decision yields and the subscriber's `#datagramsRouted` +yield are pending at `client.abort()`, and the publisher's post-update +`yieldNow()` is not. Forcing a host task before `reader.info()`, the priority +wait, `finish()`, or the abort still passed. In the CI log the lite-06 stream +track failed (`subscribe error`, no `subscribe close`), so its responses or +`#settleTail` were unsettled, not the datagram routing. Since load cannot +reorder microtasks, the remaining suspects read real time: `Budget` (stubbed +only after `connect` resolves), and `now()` in `group.ts`/`cache.ts`. + Public API: none. Wire: none. From 035b0bedc720bf81ecc59db2823b8ea0cb7a318d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 8 Nov 2026 17:50:35 -0800 Subject: [PATCH 3/3] test(js/net): re-enable lite-06 session-close case, drop its quest Co-Authored-By: Claude Opus 5.5 --- js/net/src/lite/datagram-tracks.test.ts | 4 +-- quest/m0/test-flakes-2/README.md | 1 - quest/m0/test-flakes-2/session-close-end.md | 40 --------------------- 3 files changed, 1 insertion(+), 44 deletions(-) delete mode 100644 quest/m0/test-flakes-2/session-close-end.md diff --git a/js/net/src/lite/datagram-tracks.test.ts b/js/net/src/lite/datagram-tracks.test.ts index a21a543b307..d328bc85b19 100644 --- a/js/net/src/lite/datagram-tracks.test.ts +++ b/js/net/src/lite/datagram-tracks.test.ts @@ -470,9 +470,7 @@ for (const alpn of [ALPN_05, ALPN_06, ALPN_07_WIP]) { // A track's end waits a host task for the datagrams received with it. A session close in // between finishes the track rather than cutting it off: the publisher already ended it. for (const alpn of [ALPN_05, ALPN_06, ALPN_07_WIP]) { - // Quarantined: lite-06 fails under load (quest/m0/test-flakes-2/session-close-end.md). - const run = alpn === ALPN_06 ? test.skip : test; - run(`${alpn}: a session close right after a datagram track's end keeps the end`, async () => { + test(`${alpn}: a session close right after a datagram track's end keeps the end`, async () => { const source = new Origin(); const publication = source.route(path, { hidden: true }); const datagrams = publication.broadcast.createDatagrams("audio"); diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index 3c9d08b8011..ccf94801acd 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -226,6 +226,5 @@ Public API: none. Wire: none. - [Fallback playback](/quest/m0/test-flakes-2/ietf22-fallback.md) - a browser viewer follows a fallback within the media lane's bound without dropping its session - [js/net's bandwidth sampling test holds up under load](/quest/m0/test-flakes-2/bandwidth-sampling.md) - the sampling test counts ticks without racing the mocked clock, and its `test.skip` is removed - [js/net's lite-07 datagram queue test holds up under load](/quest/m0/test-flakes-2/datagram-queues.md) - the createWritable queue test waits on the writes it asserts, and its `test.skip` is removed -- [js/net's lite-06 session-close test keeps the end under load](/quest/m0/test-flakes-2/session-close-end.md) - a session close right after a datagram track's end returns the end, not a `remote error: 0`, and its lite-06 skip is removed - [js/net's widened max-age re-drop test ends cleanly, not with a reset](/quest/m0/test-flakes-2/widened-max-age-reset.md) - the test finishes the track only after the re-drop reply arrives, so the end is a FIN, and drops its wall-clock assert - [bench/relay.test.py's stream-transport test gets a port free for TCP and UDP](/quest/m0/test-flakes-2/relay-port-pair.md) - the test binds TCP and UDP to one number free in both, so parallel checks can't collide with it diff --git a/quest/m0/test-flakes-2/session-close-end.md b/quest/m0/test-flakes-2/session-close-end.md deleted file mode 100644 index 45afc486ac4..00000000000 --- a/quest/m0/test-flakes-2/session-close-end.md +++ /dev/null @@ -1,40 +0,0 @@ -# [S] js/net's lite-06 session-close test keeps the end under load - -## Goal - -`js/net/src/lite/datagram-tracks.test.ts`'s "moq-lite-06: a session close right -after a datagram track's end keeps the end" passes under load and runs again. - -## Plan - -Planned 2026-11-08 (maintainer). The lite-06 case failed in the merge queue, -dropping [moq-dev/moq#8280](https://github.com/moq-dev/moq/pull/8280) -([job](https://github.com/moq-dev/moq/actions/runs/42489349640/job/128758087035)): -`reader.recv()` rejected with `Session: remote error: 0` from `closeError` -(`js/net/src/error.ts`) instead of returning the end. The lite-05 and lite-07 -cases still run; the lite-06 case is quarantined with `test.skip`. - -Suspects: the test drains 10,000 microtasks and assumes the end reached the -reader by then. Find which lite-06 step (SUBSCRIBE_FINISH, the FIN, or the -track's host-task wait for its datagrams) can still be pending when -`client.abort()` lands, and whether the library or the test is wrong: the -comment above the test says a close after the end must keep the end. Wait on -that event, never a longer drain, timeout, or retry. Reproduce with -`bun test --rerun-each 200` under a loaded machine first. Then remove the skip -and delete this quest. - -Investigated 2026-11-08 (no repro): on `main` and on the failing queue's base -`12e41a369e`, with Bun 1.4.2 as in CI, 24 parallel copies of -`--rerun-each 300` of the lite-06 case (7,200 runs each), 640 loaded runs of -the whole file, and 12 parallel full `js/net` suites all passed. Instrumenting -`@moq/clock`'s host `task()` showed the case runs in one host task: only the -two `AuthSession` decision yields and the subscriber's `#datagramsRouted` -yield are pending at `client.abort()`, and the publisher's post-update -`yieldNow()` is not. Forcing a host task before `reader.info()`, the priority -wait, `finish()`, or the abort still passed. In the CI log the lite-06 stream -track failed (`subscribe error`, no `subscribe close`), so its responses or -`#settleTail` were unsettled, not the datagram routing. Since load cannot -reorder microtasks, the remaining suspects read real time: `Budget` (stubbed -only after `connect` resolves), and `now()` in `group.ts`/`cache.ts`. - -Public API: none. Wire: none.