Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion js/net/src/connection/bandwidth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ test("an idle track on a live connection claims nothing", async () => {
}
});

test("a connection samples the transport only while a reservation reads the estimate", async () => {
// Quarantined: flaky under load, see /quest/m0/test-flakes-2/bandwidth-sampling.md
test.skip("a connection samples the transport only while a reservation reads the estimate", async () => {
const clock = new Manual();
const installed = clock.install();
let calls = 0;
Expand Down
7 changes: 5 additions & 2 deletions js/net/src/lite/datagram-tracks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ test("lite-04 refuses datagram tracks at setup", async () => {
}
});

test("lite-07 bounds and prioritizes independent createWritable datagram queues", async () => {
// Quarantined: flaky under load, see /quest/m0/test-flakes-2/datagram-queues.md
test.skip("lite-07 bounds and prioritizes independent createWritable datagram queues", async () => {
const source = new Origin();
const publication = source.route(path, { hidden: true });
const datagrams = publication.broadcast.createDatagrams("audio");
Expand Down Expand Up @@ -469,7 +470,9 @@ 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]) {
test(`${alpn}: a session close right after a datagram track's end keeps the end`, async () => {
// 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 () => {
const source = new Origin();
const publication = source.route(path, { hidden: true });
const datagrams = publication.broadcast.createDatagrams("audio");
Expand Down
9 changes: 9 additions & 0 deletions quest/m0/test-flakes-2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ Added 2026-11-07 (maintainer, /quest-complete): moq-uring's qlog accounting
test, which spins a fixed count waiting on a background thread, from
[moq-dev/moq#8208](https://github.com/moq-dev/moq/pull/8208)'s follow-ups.

Added 2026-11-08 (maintainer): `js/net`'s bandwidth sampling test and lite-07
createWritable datagram queue test, which failed under load. So is the lite-06 case of the
datagram session-close-after-end test, which dropped
[moq-dev/moq#8280](https://github.com/moq-dev/moq/pull/8280) from the merge queue. All are
quarantined with `test.skip` until their children fix them.

Added 2026-11-08 (maintainer, /quest-complete): `js/net`'s widened max-age
re-drop test, which failed on [moq-dev/moq#8230](https://github.com/moq-dev/moq/pull/8230)
with the `Cancel` reset [moq-dev/moq#8195](https://github.com/moq-dev/moq/pull/8195) intends for a reply still pending at the stream's end; the test races its finish against that reply.
Expand All @@ -210,4 +216,7 @@ 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
- [moq-relay's forged-dial test waits for bob's endpoint](/quest/m0/test-flakes-2/forged-dial-announce.md) - `a_forged_dial_never_connects` requests bob's endpoint only after its announce reaches mallory, and its `#[ignore]` is removed
- [moq-uring's qlog accounting test waits on the accounting](/quest/m0/test-flakes-2/qlog-staging-spin.md) - `an_open_trace_accounts_for_staging_and_close` waits for the accounting, not 10,000 spins
- [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
25 changes: 25 additions & 0 deletions quest/m0/test-flakes-2/bandwidth-sampling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# [XS] js/net's bandwidth sampling test holds up under load

## Goal

`js/net/src/connection/bandwidth.test.ts`'s "a connection samples the
transport only while a reservation reads the estimate" passes under load and
runs again.

## Plan

Planned 2026-11-08 (maintainer). It failed under load in three worktrees and
passes on a quiet main. It is quarantined with `test.skip` until this quest
fixes it.

The test counts `getStats` calls over 350 ms of `Manual` clock time and
expects exactly three 100 ms ticks while a reservation reads the estimate, and
none otherwise. Find which step outruns the mocked clock under load: a sample
loop started or stopped on a host task rather than within `advance`, or the
reservation's first read landing after the window opens. Fix it at the cause,
for example by having the test wait on the sampler's start/stop event before
counting, never with a longer window or a retry. Reproduce with
`bun test --rerun-each 200` under a loaded machine first. Then remove the
`test.skip` and delete this quest.

Public API: none. Wire: none.
23 changes: 23 additions & 0 deletions quest/m0/test-flakes-2/datagram-queues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# [XS] js/net's lite-07 datagram queue test holds up under load

## Goal

`js/net/src/lite/datagram-tracks.test.ts`'s "lite-07 bounds and prioritizes
independent createWritable datagram queues" passes under load and runs again.

## Plan

Planned 2026-11-08 (maintainer). The test, from
[moq-dev/moq#7846](https://github.com/moq-dev/moq/pull/7846), failed under load.
It is quarantined with `test.skip` until this quest fixes it.

Suspects: the test asserts `sendStreams.datagrams` has two queues right after
the first `recv`, and that the oversized appends leave sequence 1 as the next
read, both of which depend on the publisher's write side having run before the
assertion. Under load a write-budget yield can reorder that. Wait on the
event the assertion depends on (the queue's creation, the priority's update
reaching the queue), never a longer timeout or a retry. Reproduce with
`bun test --rerun-each 200` under a loaded machine first. Then remove the
`test.skip` and delete this quest.

Public API: none. Wire: none.
26 changes: 26 additions & 0 deletions quest/m0/test-flakes-2/session-close-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# [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.

Public API: none. Wire: none.