From 5147cd2c782ef2a3b6185435b78dbea64e3afb99 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 7 Nov 2026 21:53:57 -0800 Subject: [PATCH 1/6] quest: the qlog test waits for the writer's release, not the charge Co-Authored-By: Claude Opus 5.5 --- quest/m0/test-flakes-2/qlog-staging-spin.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/quest/m0/test-flakes-2/qlog-staging-spin.md b/quest/m0/test-flakes-2/qlog-staging-spin.md index f8c98e913f5..21c70753be8 100644 --- a/quest/m0/test-flakes-2/qlog-staging-spin.md +++ b/quest/m0/test-flakes-2/qlog-staging-spin.md @@ -12,10 +12,15 @@ Planned 2026-11-07 (maintainer, /quest-complete), a follow-up of [moq-dev/moq#8208](https://github.com/moq-dev/moq/pull/8208). The test (`rs/moq-uring/src/quic/qlog.rs`) spins up to 10,000 -`std::thread::yield_now` calls until `sink.inner.memory` reaches the -expected value, which a background thread sets. On a loaded host the thread -can run late and the spins run out first. Wait on the accounting itself, for -example a condition the sink signals when it charges memory, or a blocking -read of the staged state. Don't raise the spin count. +`std::thread::yield_now` calls until `sink.inner.memory` drops to +`CHUNK + size_of::()`. `Inner::reserve` charges synchronously; the drop +comes from the writer thread releasing the `Msg::Open` charge +(`memory.fetch_sub`) once it handles it. On a loaded host the writer can run +late and the spins run out first. Wait for that release itself, for example +a signal the writer raises after it handles a message. Don't raise the spin +count. + +It has not failed in CI yet, so it stays enabled; quarantine it with +`#[ignore]` and a `sh/gh/test-inventory.allow` entry if it does. Public API: none. Wire: none. From 498723540bf2e864520e169479193a96eba678ca Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 8 Nov 2026 06:57:42 -0800 Subject: [PATCH 2/6] docs(moq-vaapi): the crate compiles empty off Linux Co-Authored-By: Claude Opus 5.5 --- rs/moq-vaapi/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rs/moq-vaapi/README.md b/rs/moq-vaapi/README.md index a27d938ab61..4878bbe6e0d 100644 --- a/rs/moq-vaapi/README.md +++ b/rs/moq-vaapi/README.md @@ -69,7 +69,8 @@ It lived in [moq-dev/vaapi](https://github.com/moq-dev/vaapi) through 0.2.1. - **Loads system libva at runtime on Linux.** The generated `Va` function table loads `libva` / `libva-drm` with `libloading`. Building needs no system libva, and a binary can start without it; opening a display reports a missing driver - or library. The crate also compiles on macOS for development. + or library. Off Linux the crate compiles empty (`#![cfg(target_os = "linux")]`), + so its tests run only on Linux. ## Upstream From 8311b26ceb7ffff88af328052f9fe9a599631ca6 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 8 Nov 2026 07:03:01 -0800 Subject: [PATCH 3/6] quest: plan the widened max-age test's mocked clock Co-Authored-By: Claude Opus 5.5 --- quest/m0/test-flakes-2/README.md | 5 ++++ .../m0/test-flakes-2/widened-max-age-wall.md | 24 +++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 quest/m0/test-flakes-2/widened-max-age-wall.md diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index 926c2707e62..8d09d73af16 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -199,6 +199,10 @@ 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, /quest-complete): `js/net`'s widened max-age +re-drop test, which asserts on a 500 ms wall-clock deadline, from +[moq-dev/moq#8230](https://github.com/moq-dev/moq/pull/8230). + Public API: none. Wire: none. ## Required @@ -206,3 +210,4 @@ 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 widened max-age re-drop test runs on a mocked clock](/quest/m0/test-flakes-2/widened-max-age-wall.md) - the lite-07 re-drop case proves itself on a `Manual` clock, not a 500 ms wall-clock deadline diff --git a/quest/m0/test-flakes-2/widened-max-age-wall.md b/quest/m0/test-flakes-2/widened-max-age-wall.md new file mode 100644 index 00000000000..c64e8dd5f8c --- /dev/null +++ b/quest/m0/test-flakes-2/widened-max-age-wall.md @@ -0,0 +1,24 @@ +# [XS] js/net's widened max-age re-drop test runs on a mocked clock + +## Goal + +`js/net`'s "an update keeping the budget drops the stale groups again on +lite-07" passes on a loaded host. It proves the re-drop on a mocked clock, +not with a wall-clock deadline. + +## Plan + +Planned 2026-11-08 (maintainer, /quest-complete), a follow-up of +[moq-dev/moq#8230](https://github.com/moq-dev/moq/pull/8230), whose +iterate saw it fail there and on unrelated branches, then pass on rerun. + +The test (`js/net/src/lite/widened_max_age.test.ts`) reads `now()` before +finishing the track and asserts the reader's end arrives within 500 ms of +real time, as evidence that the stale groups were dropped again rather than +waited out for the 1.5 s grace. On a loaded host the mock transport's turns +alone can exceed 500 ms. Drive it with the `@moq/clock` `Manual` clock +instead: assert the end arrives before the clock reaches the grace, so a +missing re-drop fails deterministically. Check the file's other cases for +the same wall-clock assert. + +Public API: none. Wire: none. From faf8de79f723c0c3b172a0b6e91b71087328c1df Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 8 Nov 2026 07:27:03 -0800 Subject: [PATCH 4/6] quest: the widened max-age flake is a Cancel reset, not the wall deadline Co-Authored-By: Claude Opus 5.5 --- quest/m0/test-flakes-2/README.md | 6 ++-- .../m0/test-flakes-2/widened-max-age-reset.md | 32 +++++++++++++++++++ .../m0/test-flakes-2/widened-max-age-wall.md | 24 -------------- 3 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 quest/m0/test-flakes-2/widened-max-age-reset.md delete mode 100644 quest/m0/test-flakes-2/widened-max-age-wall.md diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index 8d09d73af16..748c3a04c17 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -200,8 +200,8 @@ 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, /quest-complete): `js/net`'s widened max-age -re-drop test, which asserts on a 500 ms wall-clock deadline, from -[moq-dev/moq#8230](https://github.com/moq-dev/moq/pull/8230). +re-drop test, which failed on [moq-dev/moq#8230](https://github.com/moq-dev/moq/pull/8230) +with a `Cancel` reset from the lite-07 publisher's blocked reply. Public API: none. Wire: none. @@ -210,4 +210,4 @@ 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 widened max-age re-drop test runs on a mocked clock](/quest/m0/test-flakes-2/widened-max-age-wall.md) - the lite-07 re-drop case proves itself on a `Manual` clock, not a 500 ms wall-clock deadline +- [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 lite-07 re-drop case passes under `--rerun-each 200`, its end never lost to a blocked reply's `Cancel` reset diff --git a/quest/m0/test-flakes-2/widened-max-age-reset.md b/quest/m0/test-flakes-2/widened-max-age-reset.md new file mode 100644 index 00000000000..c3d98e6fd0c --- /dev/null +++ b/quest/m0/test-flakes-2/widened-max-age-reset.md @@ -0,0 +1,32 @@ +# [XS] js/net's widened max-age re-drop test ends cleanly, not with a reset + +## Goal + +`js/net`'s "an update keeping the budget drops the stale groups again on +lite-07" passes under `--rerun-each 200`. The reader's track ends cleanly +after the producer finishes, never with a `Cancel` reset. + +## Plan + +Planned 2026-11-08 (maintainer, /quest-complete), a follow-up of +[moq-dev/moq#8230](https://github.com/moq-dev/moq/pull/8230), whose iterate +saw it fail there and on unrelated branches, then pass on rerun. + +The observed failure (8230's `Check`, job 128649627407) took 9.30 ms: +`recvGroup()` rejected with `reset stream: 1` (`StreamCode.Cancel`), thrown +from `js/net/src/lite/publisher.ts`'s `response()`. When the stream ends +while a reply write is blocked on the write budget, `response()` resets the +writable half with `Cancel`. Here the reader's priority-only update sends a +reply while the producer finishes, so the clean end can lose to the reset. +The test's 500 ms elapsed assert never ran. + +[moq-dev/moq#8195](https://github.com/moq-dev/moq/pull/8195), which landed +after that run, changed how lite-07 replies yield on the write budget. First +check whether main still fails under `--rerun-each 200`, and whether the +unrelated-branch failures were the same reset. If main is clean, delete this +quest. Otherwise fix the race in the publisher, so a reply blocked when the +track ends cleanly still lets the end arrive as a FIN, with a test that fails +without the fix. Moving the 500 ms wall-clock assert onto the `Manual` clock is +optional hardening, since that assert has not failed. + +Public API: none. Wire: none. diff --git a/quest/m0/test-flakes-2/widened-max-age-wall.md b/quest/m0/test-flakes-2/widened-max-age-wall.md deleted file mode 100644 index c64e8dd5f8c..00000000000 --- a/quest/m0/test-flakes-2/widened-max-age-wall.md +++ /dev/null @@ -1,24 +0,0 @@ -# [XS] js/net's widened max-age re-drop test runs on a mocked clock - -## Goal - -`js/net`'s "an update keeping the budget drops the stale groups again on -lite-07" passes on a loaded host. It proves the re-drop on a mocked clock, -not with a wall-clock deadline. - -## Plan - -Planned 2026-11-08 (maintainer, /quest-complete), a follow-up of -[moq-dev/moq#8230](https://github.com/moq-dev/moq/pull/8230), whose -iterate saw it fail there and on unrelated branches, then pass on rerun. - -The test (`js/net/src/lite/widened_max_age.test.ts`) reads `now()` before -finishing the track and asserts the reader's end arrives within 500 ms of -real time, as evidence that the stale groups were dropped again rather than -waited out for the 1.5 s grace. On a loaded host the mock transport's turns -alone can exceed 500 ms. Drive it with the `@moq/clock` `Manual` clock -instead: assert the end arrives before the clock reaches the grace, so a -missing re-drop fails deterministically. Check the file's other cases for -the same wall-clock assert. - -Public API: none. Wire: none. From 5f1b467f3aef6af2549a401460e8a5cdc20178a0 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 8 Nov 2026 07:34:00 -0800 Subject: [PATCH 5/6] quest: pin the widened max-age reset with a deterministic test, off the wall clock Co-Authored-By: Claude Opus 5.5 --- quest/m0/test-flakes-2/README.md | 2 +- .../m0/test-flakes-2/widened-max-age-reset.md | 22 +++++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index 748c3a04c17..18293f80852 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -210,4 +210,4 @@ 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 widened max-age re-drop test ends cleanly, not with a reset](/quest/m0/test-flakes-2/widened-max-age-reset.md) - the lite-07 re-drop case passes under `--rerun-each 200`, its end never lost to a blocked reply's `Cancel` reset +- [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) - a reply pending at the track's end yields a clean end, not a `Cancel` reset, and the re-drop check leaves the wall clock diff --git a/quest/m0/test-flakes-2/widened-max-age-reset.md b/quest/m0/test-flakes-2/widened-max-age-reset.md index c3d98e6fd0c..f2a7162e8e0 100644 --- a/quest/m0/test-flakes-2/widened-max-age-reset.md +++ b/quest/m0/test-flakes-2/widened-max-age-reset.md @@ -3,8 +3,9 @@ ## Goal `js/net`'s "an update keeping the budget drops the stale groups again on -lite-07" passes under `--rerun-each 200`. The reader's track ends cleanly -after the producer finishes, never with a `Cancel` reset. +lite-07" cannot flake. A reply still pending when the track finishes ends +the reader's track cleanly, never with a `Cancel` reset, and the re-drop +check does not depend on wall-clock time. ## Plan @@ -21,12 +22,15 @@ reply while the producer finishes, so the clean end can lose to the reset. The test's 500 ms elapsed assert never ran. [moq-dev/moq#8195](https://github.com/moq-dev/moq/pull/8195), which landed -after that run, changed how lite-07 replies yield on the write budget. First -check whether main still fails under `--rerun-each 200`, and whether the -unrelated-branch failures were the same reset. If main is clean, delete this -quest. Otherwise fix the race in the publisher, so a reply blocked when the -track ends cleanly still lets the end arrive as a FIN, with a test that fails -without the fix. Moving the 500 ms wall-clock assert onto the `Manual` clock is -optional hardening, since that assert has not failed. +after that run, changed how lite-07 replies yield on the write budget, so it +may already have cured this. A clean rerun sample cannot show that. Add a +deterministic test that holds a reply pending on the write budget while the +track finishes, and asserts the subscriber sees a clean end, not `Cancel`. If +it passes on main, it lands as the regression test. If it fails, fix the race +in the publisher so the end still arrives as a FIN. + +Also move the test's 500 ms elapsed assert onto the `Manual` clock, or an +event-based check, so a CI pause cannot fail it, while a missing re-drop +(which would wait out the 1.5 s grace) still does. Public API: none. Wire: none. From 1a697dac712fdca4e787bab47a594bf64d7208a8 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 8 Nov 2026 07:42:05 -0800 Subject: [PATCH 6/6] quest: the widened max-age reset is intended; the test waits for the re-drop Co-Authored-By: Claude Opus 5.5 --- quest/m0/test-flakes-2/README.md | 4 +-- .../m0/test-flakes-2/widened-max-age-reset.md | 27 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index 18293f80852..199497632b4 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -201,7 +201,7 @@ test, which spins a fixed count waiting on a background thread, from 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 a `Cancel` reset from the lite-07 publisher's blocked reply. +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. Public API: none. Wire: none. @@ -210,4 +210,4 @@ 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 widened max-age re-drop test ends cleanly, not with a reset](/quest/m0/test-flakes-2/widened-max-age-reset.md) - a reply pending at the track's end yields a clean end, not a `Cancel` reset, and the re-drop check leaves the wall clock +- [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 diff --git a/quest/m0/test-flakes-2/widened-max-age-reset.md b/quest/m0/test-flakes-2/widened-max-age-reset.md index f2a7162e8e0..735a187d4ce 100644 --- a/quest/m0/test-flakes-2/widened-max-age-reset.md +++ b/quest/m0/test-flakes-2/widened-max-age-reset.md @@ -3,9 +3,9 @@ ## Goal `js/net`'s "an update keeping the budget drops the stale groups again on -lite-07" cannot flake. A reply still pending when the track finishes ends -the reader's track cleanly, never with a `Cancel` reset, and the re-drop -check does not depend on wall-clock time. +lite-07" cannot flake. It finishes the track only after the re-drop reply has +reached the subscriber, so the end arrives as a FIN, and it detects a missing +re-drop without a wall-clock deadline. ## Plan @@ -21,16 +21,15 @@ writable half with `Cancel`. Here the reader's priority-only update sends a reply while the producer finishes, so the clean end can lose to the reset. The test's 500 ms elapsed assert never ran. -[moq-dev/moq#8195](https://github.com/moq-dev/moq/pull/8195), which landed -after that run, changed how lite-07 replies yield on the write budget, so it -may already have cured this. A clean rerun sample cannot show that. Add a -deterministic test that holds a reply pending on the write budget while the -track finishes, and asserts the subscriber sees a clean end, not `Cancel`. If -it passes on main, it lands as the regression test. If it fails, fix the race -in the publisher so the end still arrives as a FIN. - -Also move the test's 500 ms elapsed assert onto the `Manual` clock, or an -event-based check, so a CI pause cannot fail it, while a missing re-drop -(which would wait out the 1.5 s grace) still does. +The reset is intended: +[moq-dev/moq#8195](https://github.com/moq-dev/moq/pull/8195) rejected letting a +clean FIN override a pending reply write, since that write could block on flow +control for a peer that has left. So the race is in the test, which finishes +the producer right after `reader.update()` without waiting for the re-drop +reply. Fix the test, not the publisher: wait until the subscriber has received +the re-drop of groups 1 and 2 under the new update, then finish the producer. +That wait also replaces the 500 ms elapsed assert. Bound it on the `Manual` +clock, or by event, so a missing re-drop (which would otherwise wait out the +1.5 s grace) still fails while a CI pause cannot. Public API: none. Wire: none.