From 7f47b195004bd415e311d3638514effe63ed3fb0 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 27 Oct 2026 19:37:41 -0700 Subject: [PATCH 1/2] quest: plan the second batch of 2026-10-27 follow-ups Adds the runner VM flake, the settled-copy audit, an HLS viewer starting capture, and replaced producers retiring records; folds review build tips into container-backpressure and stitch-catch-up. Co-Authored-By: Claude Opus 5.5 --- quest/m0/test-flakes-2/README.md | 1 + quest/m0/test-flakes-2/runner-vm.md | 29 ++++++++++++++++++++++ quest/m1/README.md | 2 ++ quest/m1/container-backpressure.md | 3 +++ quest/m1/hls-record-demand.md | 25 +++++++++++++++++++ quest/m1/settled-copies.md | 26 +++++++++++++++++++ quest/m1/ts-reliability/stitch-catch-up.md | 2 +- quest/m2/README.md | 1 + quest/m2/producer-retire.md | 28 +++++++++++++++++++++ 9 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 quest/m0/test-flakes-2/runner-vm.md create mode 100644 quest/m1/hls-record-demand.md create mode 100644 quest/m1/settled-copies.md create mode 100644 quest/m2/producer-retire.md diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index 9c567438d01..3dd14965a32 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -53,3 +53,4 @@ Public API: none. Wire: none. - [IETF22 fallback](/quest/m0/test-flakes-2/ietf22-fallback.md) - an IETF22 browser viewer follows a fallback within the media lane's bound, keeping its session and its audio - [Swapped Rust to JS Opus](/quest/m0/test-flakes-2/swapped-js-opus.md) - the `rust-swapped -> js` interop cell stops timing out under load - [JS host-task yields follow the clock](/quest/m0/test-flakes-2/js-host-yields.md) - `Budget` and `nextTask` yield through the injected clock, so `Manual` tests stop racing them +- [Runner VM test under load](/quest/m0/test-flakes-2/runner-vm.md) - the runner VM check passes when it rebuilds in a merge group, and a failed flake check prints its full log diff --git a/quest/m0/test-flakes-2/runner-vm.md b/quest/m0/test-flakes-2/runner-vm.md new file mode 100644 index 00000000000..1bbb120ccc9 --- /dev/null +++ b/quest/m0/test-flakes-2/runner-vm.md @@ -0,0 +1,29 @@ +# [S] Runner VM test under load + +## Goal + +`checks.x86_64-linux.github-runner-vm` (`nix/runner/test.nix`) passes in +every merge group it runs in, and a failed flake check prints the full log +of the failing derivation so the failing subtest is named. + +## Plan + +Decided 2026-10-28 (maintainer): an m0 flake quest, fixed at its cause. + +- It failed once, in merge-group run + [40609795466](https://github.com/moq-dev/moq/actions/runs/40609795466), + which dropped [moq-dev/moq#6934](https://github.com/moq-dev/moq/pull/6934) + from the queue. The PR did not change the derivation, and it passed when + built locally (10 subtests, about 4 minutes). +- It rarely runs: in 18 earlier merge groups on `nixos-moq-ci` the result was + already in the runner's store (`built=0`). This time it had been collected, + so it rebuilt, probably alongside the heavy `check rs` and `test rs` work. +- `sh/dispatch.sh` runs `nix flake check` without `-L`, so the log kept only + the last 25 lines (QEMU cleanup). First make a failed check print the full + build log (`-L`, or `nix log` on failure), so the next failure names its + subtest. +- Then reproduce under the same contention (rebuild with the store result + removed while a Rust test run loads the host) and fix the subtest at its + cause, not with a longer timeout. + +Public API: none. Wire: none. diff --git a/quest/m1/README.md b/quest/m1/README.md index baba304ab7f..19cd8e755cd 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -166,6 +166,8 @@ surface and zero-copy texture import, land before the cut. - [Segment cuts hold bounded state](/quest/m1/segmenter-cuts.md) - the HLS segmenter keeps one pending cut, so `styp` input without sync samples cannot grow it - [Next Object on a cold Rust copy](/quest/m1/next-object-cold-copy.md) - a join after an upstream group report starts at the first frame received, never skipping - [Container consumers buffer by backpressure](/quest/m1/container-backpressure.md) - Rust and JS container consumers decode ahead only a byte budget, so a hostile publisher cannot grow them +- [Settled copies versus whole groups](/quest/m1/settled-copies.md) - every model check of whether a group is done means either a settled copy or the whole group, as it needs +- [An HLS viewer starts capture](/quest/m1/hls-record-demand.md) - a record-track subscriber counts as demand for its rendition's media - [One moq-ffi build definition](/quest/m1/ffi-build-flags.md) - every binding takes moq-ffi's default features from one place - [A reported drop means the same everywhere](/quest/m1/resume-drop-final.md) - Rust and JS agree whether a group reported dropped can still be served - [moq-clock moves into kio::clock](/quest/m1/kio-clock.md) - moq-clock and its test macro become `kio::clock` and `#[kio::test]` before the cut publishes them diff --git a/quest/m1/container-backpressure.md b/quest/m1/container-backpressure.md index 67a55946011..4f971d84e6d 100644 --- a/quest/m1/container-backpressure.md +++ b/quest/m1/container-backpressure.md @@ -34,6 +34,9 @@ Steps: net groups while it is full, so pressure reaches the net cache and QUIC flow control instead of a refusal. Keep the existing span skip for latency. +- Charge each buffered sample's and group's own overhead to the budget, not + only payload bytes, and keep the oldest group moving even when later groups + fill the budget, so the consumer cannot deadlock on its own lookahead. - Mirror names across Rust and JS. - Test a publisher that packs many frames into one timestamp, and one that opens many groups: memory stays near the budget and playback still skips diff --git a/quest/m1/hls-record-demand.md b/quest/m1/hls-record-demand.md new file mode 100644 index 00000000000..cb2a0f2f3a5 --- /dev/null +++ b/quest/m1/hls-record-demand.md @@ -0,0 +1,25 @@ +# [S] An HLS viewer starts capture + +## Goal + +`moq publish` starts capturing a rendition when its only subscriber is an HLS +export, so an HLS-only viewer gets media. + +## Plan + +Decided 2026-10-28 (maintainer), from +[moq-dev/moq#6937](https://github.com/moq-dev/moq/pull/6937), which made HLS +records on by default: a subscriber to a rendition's record track counts as +demand for that rendition's media. + +- `moq publish` encodes on demand from media-track demand + (`rs/moq-cli/src/publish.rs`), but the HLS export reads a rendition's + records before subscribing to its media, so the record subscriber alone + never starts capture. This was already true with `--hls` before #6937. +- Make record-track demand reach the media's demand where records are + produced (`rs/moq-mux/src/hls.rs`), so every on-demand publisher benefits, + not only the CLI. +- Test an HLS-only viewer against `moq publish`: capture starts and segments + appear. + +Public API: none expected. Wire: none. diff --git a/quest/m1/settled-copies.md b/quest/m1/settled-copies.md new file mode 100644 index 00000000000..f9ba2d0c07e --- /dev/null +++ b/quest/m1/settled-copies.md @@ -0,0 +1,26 @@ +# [S] Settled copies versus whole groups + +## Goal + +Every check in moq-net's model that asks whether a group is done uses the +meaning it needs: a copy whose writer finished (`Handle::is_settled`) or the +whole group reaching its end (`is_finished`). A finished bounded copy is +never mistaken for the whole group, and never kept open as unfinished. + +## Plan + +Decided 2026-10-28 (maintainer), from +[moq-dev/moq#6922](https://github.com/moq-dev/moq/pull/6922): audit every +caller at once instead of fixing them as reviews find them. Three review +rounds on #6922 each fixed one site (track teardown, the track's clean end, +and uncached copies). + +- List every `is_finished`, `is_settled`, `serves_end`, and `cut` caller in + `rs/moq-net/src/model/` and state which meaning each needs. +- `tear_down`'s `open` and `lookup.retain` still use whole-group + `is_finished`. That looks deliberate, since a bounded copy does not serve + the group's end, but confirm it. +- Each wrong caller gets a test that fails before its fix. Callers that are + right need no test. + +Public API: none. Wire: none. diff --git a/quest/m1/ts-reliability/stitch-catch-up.md b/quest/m1/ts-reliability/stitch-catch-up.md index 7451bc2a113..16a459ee73a 100644 --- a/quest/m1/ts-reliability/stitch-catch-up.md +++ b/quest/m1/ts-reliability/stitch-catch-up.md @@ -22,7 +22,7 @@ skip costs nothing extra. start the new program at `--delay`. Keep output monotonic across the program change. - Test repeated switches: latency settles back to `--delay` after each, - rather than accumulating. + rather than accumulating, and output stays in order across every switch. - Also reproduce #6919's priority observation: a mid-stream `Subscriber::update` demotion of the old leg still showed priority 0 on the receive side. Fix it if update propagation is wrong; otherwise diff --git a/quest/m2/README.md b/quest/m2/README.md index 67de43cc562..0bd80c9f335 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -36,6 +36,7 @@ lite-07; bitrate enforcement is not part of this release. - [HLS and DASH browser playback](/quest/m2/hls-player-test.md) - hls.js and dash.js play, reload, switch, and survive reconfiguration nightly - [moq-hls export on kio](/quest/m2/hls-export-kio.md) - export watchers and the init build are owned kio tasks instead of tokio::spawn - [Re-init retires timelines](/quest/m2/reinit-retire.md) - fMP4 and MKV re-inits retire the old timeline, so import state stays bounded +- [Replaced producers retire their records](/quest/m2/producer-retire.md) - encoders and bindings retire a replaced producer's HLS records - [Broadcast fairness](/quest/m2/broadcast-fairness.md) - broadcasts share a cluster link fairly, so one tenant's priority never starves another's - [Peer grant bound](/quest/m2/peer-grant-bound.md) - a peer's AUTH_OK costs near-linear time in its bytes on every input shape, in Rust and in a browser - [Plan: watch worker](/quest/m2/plan-watch-worker.md) - prototype an invisible page worker against app-spawned workers, and land the jank harness that decides diff --git a/quest/m2/producer-retire.md b/quest/m2/producer-retire.md new file mode 100644 index 00000000000..1648076b3f4 --- /dev/null +++ b/quest/m2/producer-retire.md @@ -0,0 +1,28 @@ +# [S] Replaced producers retire their records + +## Goal + +An application that keeps replacing a rendition's producer on one broadcast +does not keep one HLS record track per replacement until the broadcast ends. +moq-video, moq-audio, moq-ffi, and moq-c retire a replaced producer's +records, as the container importers and `moqsink` do since +[moq-dev/moq#6937](https://github.com/moq-dev/moq/pull/6937). + +## Plan + +Decided 2026-10-28 (maintainer): m2, since the churn comes from the local +application, not a network peer. + +- Each of these mints a fresh track name per producer. Call + `moq_mux::catalog::Producer::retire` when a producer is replaced or + dropped mid-broadcast, after its last frame is flushed. +- Keep #6783's rule that a dropped rendition's name can return with its + record numbering continued: only the owner that minted a name retires it. +- Test repeated replacement in each: record tracks stay flat. + +Public API: none expected; the bindings may document that replacing a +producer ends its records. Wire: none. + +## Related + +- [Re-init retires timelines](/quest/m2/reinit-retire.md) - the same bound for fMP4 and MKV re-inits From 3cd9946733fa6426e2f78bda3056f358dce5e592 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 27 Oct 2026 20:11:22 -0700 Subject: [PATCH 2/2] quest: fold review guardrails into record demand and retire Co-Authored-By: Claude Opus 5.5 --- quest/m1/hls-record-demand.md | 3 ++- quest/m2/producer-retire.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/quest/m1/hls-record-demand.md b/quest/m1/hls-record-demand.md index cb2a0f2f3a5..9e64910044c 100644 --- a/quest/m1/hls-record-demand.md +++ b/quest/m1/hls-record-demand.md @@ -18,7 +18,8 @@ demand for that rendition's media. never starts capture. This was already true with `--hls` before #6937. - Make record-track demand reach the media's demand where records are produced (`rs/moq-mux/src/hls.rs`), so every on-demand publisher benefits, - not only the CLI. + not only the CLI. The demand ends when the record track's last subscriber + leaves. - Test an HLS-only viewer against `moq publish`: capture starts and segments appear. diff --git a/quest/m2/producer-retire.md b/quest/m2/producer-retire.md index 1648076b3f4..54c1c28c519 100644 --- a/quest/m2/producer-retire.md +++ b/quest/m2/producer-retire.md @@ -15,7 +15,8 @@ application, not a network peer. - Each of these mints a fresh track name per producer. Call `moq_mux::catalog::Producer::retire` when a producer is replaced or - dropped mid-broadcast, after its last frame is flushed. + dropped mid-broadcast, after its last frame is flushed and its recorder is + released (`retire` errors while the recorder is alive). - Keep #6783's rule that a dropped rendition's name can return with its record numbering continued: only the owner that minted a name retires it. - Test repeated replacement in each: record tracks stay flat.