From c359835f22c3bec2ec175f60d717daea193845a1 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 6 Oct 2026 09:40:48 -0700 Subject: [PATCH 1/6] quest: plan follow-ups from the 2026-10-06 quest run Co-Authored-By: Claude Opus 5.5 --- quest/m0/README.md | 1 + quest/m0/prefix-route-fronts.md | 26 ++++++++++++++++++++++++++ quest/m1/README.md | 7 +++++++ quest/m1/cross-relay-flap-drill.md | 15 +++++++++++++++ quest/m1/flate-stream-budget.md | 15 +++++++++++++++ quest/m1/hang-changelog-04.md | 12 ++++++++++++ quest/m1/js-track-takeover.md | 18 ++++++++++++++++++ quest/m1/refuse-ignored-tls.md | 19 +++++++++++++++++++ quest/m1/track-demand-incremental.md | 22 ++++++++++++++++++++++ quest/m1/uring-tests-under-load.md | 20 ++++++++++++++++++++ quest/m2/README.md | 1 + quest/m2/native-enabled.md | 15 +++++++++++++++ 12 files changed, 171 insertions(+) create mode 100644 quest/m0/prefix-route-fronts.md create mode 100644 quest/m1/cross-relay-flap-drill.md create mode 100644 quest/m1/flate-stream-budget.md create mode 100644 quest/m1/hang-changelog-04.md create mode 100644 quest/m1/js-track-takeover.md create mode 100644 quest/m1/refuse-ignored-tls.md create mode 100644 quest/m1/track-demand-incremental.md create mode 100644 quest/m1/uring-tests-under-load.md create mode 100644 quest/m2/native-enabled.md diff --git a/quest/m0/README.md b/quest/m0/README.md index 412d2f94947..3119d79c5e7 100644 --- a/quest/m0/README.md +++ b/quest/m0/README.md @@ -44,6 +44,7 @@ a published `@moq/watch` break. ## Required - [Request caps](/quest/m0/request-caps.md) - lite message sizes, IETF request IDs, and per-session announces and subscriptions are bounded +- [Prefix route fronts](/quest/m0/prefix-route-fronts.md) - a prefix route cannot be made to mint one front per requested path - [qmux credit](/quest/m0/qmux-credit.md) - qmux returns connection credit for dropped and stopped streams and delivers its close frame, on both lines - [Shared fronts](/quest/m0/shared-fronts.md) - viewer sessions share a front, so fronts scale with peers, not viewers, and viewer churn no longer leaks fronts - [Wildcard](/quest/m0/wildcard/README.md) - a relay resolves subscriptions against advertised prefixes, a service claims the prefix it could serve and refuses the rest instead of enumerating broadcasts, and the browser player treats a covering claim as availability diff --git a/quest/m0/prefix-route-fronts.md b/quest/m0/prefix-route-fronts.md new file mode 100644 index 00000000000..9dd913f89f1 --- /dev/null +++ b/quest/m0/prefix-route-fronts.md @@ -0,0 +1,26 @@ +# [S] Prefix routes mint bounded fronts + +## Goal + +A peer requesting arbitrary paths under a prefix route cannot make an origin +mint one front, driver task, and upstream request per distinct path. The +number of fronts a prefix route can create is bounded, and a request past the +bound is refused rather than queued. + +## Plan + +Found while landing shared fronts (#4922): viewers now share one front per +path, but an optimistic resolve under a prefix route still mints a front for +every distinct requested path while the route stands. That cost is per path, +not per viewer, so a single session can amplify it by naming paths. + +- Decide the bound (per route, per session, or both) and what a refusal looks + like on each wire version; reuse the refusal shapes + [Request caps](/quest/m0/request-caps.md) settles. +- Cover it with a test that requests many distinct covered paths and checks + the front count stays bounded, and extend the origin benchmark with a + distinct-path axis. + +## Related + +- [Request caps](/quest/m0/request-caps.md) - bounds per-session requests; this bounds what one route can mint from them diff --git a/quest/m1/README.md b/quest/m1/README.md index 849bcbd842a..b4e35241b18 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -49,24 +49,30 @@ blocks. The quests that gated m0 lines moved under them. - [Delete the live marker](/quest/m1/announce-live-removal.md) - announce streams yield only route events; the `Live` marker and its hold machinery are gone - [WebTransport close backends](/quest/m1/wt-close-backends.md) - web-transport-noq and -quinn keep the session alive while closing, and iroh's client reads a capsule close - [Enabled flag](/quest/m1/catalog-enabled.md) - one `enabled` rendition flag replaces `stalled` and pausing, and the flapping encoder-lag detector is deleted +- [Hang changelog](/quest/m1/hang-changelog-04.md) - the hang draft lists under -03 only what -03 published - [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - every stream group in a lite subscription arrives or is dropped by name, and lite-07 drops its stream count for it - [#2991](/quest/m1/2991-net-coalesce-dynamic-tracks-and-preserve-sequences-across.md) - one dynamic producer per track name in both languages, with the sequence namespace surviving a replacement - [Subscribe ranges](/quest/m1/subscribe-ranges/README.md) - a lite-07 SUBSCRIBE asks for past and live ranges in either order and replaces FETCH; relays fill misses by range, including over moq-transport - [Live media time](/quest/m1/subscribe-live-time.md) - re-scoped against `set_live`: a lite-07 SUBSCRIBE_OK carries the publisher's current media time only if a reader still needs it - [Cross-relay bursts re-run](/quest/m1/cross-relay-bursts.md) - condition: the #4349 reporter re-runs their A/B/C comparison against current cdn.moq.pro - [Two-relay drill on impaired links](/quest/m1/cross-relay-drill.md) - a bursty small-group track crosses two clustered relays over lossy, delayed, flow-limited QUIC without unanswered FETCHes or `Old` stalls +- [Flapping peer drill](/quest/m1/cross-relay-flap-drill.md) - the cluster burst drill survives a flapping peer link, the regression for 0.15.6 route-flap drops - [Untimed lite-07](/quest/m1/lite-untimed.md) - lite-07 carries an untimed track in both languages; lite-05/06 write send time - [Finalize moq-lite-07](/quest/m1/lite07-finalize.md) - when the maintainer cuts it, lite-07 negotiates as `moq-lite-07` and the next release ships it - [Late lower groups](/quest/m1/lite-late-lower-group.md) - a moq-lite subscriber with a floor receives a group created below the first served one, as moq-transport does - [JSON stream budget](/quest/m1/json-stream-budget.md) - an oversized JSON stream record is refused without ending the log, and a JS subscribe to a gone track answers NotFound +- [Flate stream budget](/quest/m1/flate-stream-budget.md) - a flate stream refuses an oversized append without ending, sharing one DEFLATE bound with json +- [JS track takeover](/quest/m1/js-track-takeover.md) - JS `createTrack` answers a queued request and continues its sequences, as Rust does - [A watch and publish release ships assets()](/quest/m1/assets-release.md) - the release that lets the sites host the worklets - [Dogfood hosted worklets](/quest/m1/dogfood-assets.md) - moq.dev and the moq.pro dashboard host the worklets and call `assets()` after the release - [More tests under load](/quest/m1/test-flakes-2/README.md) - the second round of load-only failures, one quest per flake, fixed at the cause +- [moq-uring tests under load](/quest/m1/uring-tests-under-load.md) - uring tests pass while parallel checks share locked memory - [CI runner stalls](/quest/m1/ci-runner-stalls.md) - the 0.4 to 0.8 s freezes of both interop tracks on CI are attributed from a week of nightlies and fixed or told apart from playback bugs - [Subscriber max-delay](/quest/m1/subscriber-max-delay.md) - subscriber staleness becomes `max_delay`; publisher retention stays `max_age` - [Wire compatibility](/quest/m1/wire-compat.md) - a nightly run tests this checkout against the last published release for tokens, session wire, and catalog/container - [Same-epoch importers](/quest/m1/hop-aligned-import.md) - importers sharing one `--epoch` and fed one stream publish identical groups and timestamps, so failover between a redundant pair survives - [Auth client CA](/quest/m1/relay-auth-client-ca.md) - `auth::Config::validate` and `init` take the client-CA flag, so no caller can skip the check +- [Refuse ignored TLS config](/quest/m1/refuse-ignored-tls.md) - TLS options no listener would use fail at load instead of being ignored - [TS stats module](/quest/m1/ts-stats-module.md) - the TS stats types move under `ts::stats` as `Snapshot` and `Stream`, with an owned `track` - [cpal loads libasound at runtime](/quest/m1/cpal-alsa-runtime.md) - condition: a cpal release whose Linux build carries no load-time libasound requirement - [Audio capture without ALSA link](/quest/m1/capture-alsa-link.md) - moq-audio capture and playback build on Linux without linking libasound @@ -145,6 +151,7 @@ blocks. The quests that gated m0 lines moved under them. - [One max_age meaning](/quest/m1/cache-max-age.md) - a swept benchmark decides whether the track cache ages groups out on wall time without a write, then Rust and js/net both implement it - [Frame slot charge](/quest/m1/frame-slot-charge.md) - a group's frame slots past the first four count against the cache pool, including capacity a released group keeps - [Front deadlines](/quest/m1/front-deadline-index.md) - a front's per-event cost stops growing with its track count: an expiry index and per-track wakes, proven by a churn benchmark +- [Incremental track demand](/quest/m1/track-demand-incremental.md) - a subscribe or leave costs the same at one reader or ten thousand - [Listener deadlines](/quest/m1/listener-deadlines.md) - io_uring, HTTP/2, and the internal listener bound slow handshakes and headers, and iroh honors `quic.keep_alive` - [Papercuts](/quest/m1/papercuts.md) - JS refuses to serve a broadcast it did not produce, and a uring test stops sleeping - [Front parking](/quest/m1/origin-front-parks.md) - an unroutable request waits on a front instead of re-asking on every route-table move diff --git a/quest/m1/cross-relay-flap-drill.md b/quest/m1/cross-relay-flap-drill.md new file mode 100644 index 00000000000..500cfbafe5c --- /dev/null +++ b/quest/m1/cross-relay-flap-drill.md @@ -0,0 +1,15 @@ +# [S] Cluster drill with a flapping peer link + +## Goal + +The two-relay burst drill also runs with the peer link flapping mid-burst, +and every group still arrives or fails by name within its bound. This is the +regression for the route-flap drops the 0.15.6 tree showed in #4349, which +current `main` no longer reproduces in a mock. + +## Plan + +Extend `bursts_cross_a_cluster` (#4920, `rs/moq-relay/tests/drills.rs`) rather +than adding a harness: flap the shaped peer link during a burst, keep strict +grading, and add a drill mutation proving the flap is graded. A moq-transport +peer link variant is optional; add it only if it is cheap here. diff --git a/quest/m1/flate-stream-budget.md b/quest/m1/flate-stream-budget.md new file mode 100644 index 00000000000..6a628a8bc4d --- /dev/null +++ b/quest/m1/flate-stream-budget.md @@ -0,0 +1,15 @@ +# [S] A flate stream refuses an oversized append without ending + +## Goal + +`moq-flate` and `@moq/flate` `stream` mode refuse an append that cannot fit +the group budget with `GroupTooLarge` and leave the log intact, compressed or +not, as JSON streams do after #4911. + +## Plan + +Flate's stream mode rides one group, like JSON's, so it has the same hole. +Move the DEFLATE worst-case bound (`deflateBound`, private in each json +package after #4911) into the flate packages and have json reuse it, so the +bound and its tests live in one place per language. Mirror #4911's tests in +both compression modes. diff --git a/quest/m1/hang-changelog-04.md b/quest/m1/hang-changelog-04.md new file mode 100644 index 00000000000..b112ddd4cef --- /dev/null +++ b/quest/m1/hang-changelog-04.md @@ -0,0 +1,12 @@ +# [XS] Hang draft changelog matches what -03 published + +## Goal + +The `drafts/draft-lcurley-moq-hang.md` changelog lists under -03 only what the +published -03 contains. Entries that landed after -03 was published (delay, +group starts, namespaced keys) move to the -04 section #4915 opens. + +## Plan + +Compare against the published -03 on the datatracker. Land after #4915. Run +`just drafts check`. diff --git a/quest/m1/js-track-takeover.md b/quest/m1/js-track-takeover.md new file mode 100644 index 00000000000..ff0840f8aa3 --- /dev/null +++ b/quest/m1/js-track-takeover.md @@ -0,0 +1,18 @@ +# [S] JS createTrack takes over a queued request + +## Goal + +In `@moq/net`, `createTrack` and `insertTrack` on a name with a queued or +pending request answer that request and continue the name's group and +datagram sequences, as Rust's `create_track` does, instead of throwing +`duplicate track`. The per-name sequence map stays bounded. + +## Plan + +Decided 2026-10-06 while settling #4929: that PR coalesces JS publishing-side +subscriptions per name and accepts the `duplicate track` throw for now; this +quest brings JS to parity. The per-name sequence map only grows on accepted +requests and is never pruned; bound it the way #4929 bounds Rust's (drop +names that never wrote and that no track holds). + +Public API: behavior change in `@moq/net` only. diff --git a/quest/m1/refuse-ignored-tls.md b/quest/m1/refuse-ignored-tls.md new file mode 100644 index 00000000000..8918d2562a3 --- /dev/null +++ b/quest/m1/refuse-ignored-tls.md @@ -0,0 +1,19 @@ +# [S] TLS settings that would be ignored are refused at load + +## Goal + +A relay or `moq` CLI config that sets a TLS option the configured listeners +would never use fails at load with an error naming the option, instead of +starting and silently ignoring it. Known cases: `tls.peers` on a server with +no QUIC listener, and `web.https.root` without `web.https.listen`. + +## Plan + +Same class of bug as the listener client CA that #4912 now refuses in +`moq_tokio::Server::build`. Audit the other TLS and listener options for +settings that only take effect on a listener that may not exist, and refuse +each where the config is assembled. TOML cannot express clap's `requires`, so +the check belongs in validation, not in the flag definitions. + +Public API: none. Behavior: configs that relied on an ignored option now fail +to start, so note it in `doc/setup/upgrade.md`. diff --git a/quest/m1/track-demand-incremental.md b/quest/m1/track-demand-incremental.md new file mode 100644 index 00000000000..7a5ae5f3eb8 --- /dev/null +++ b/quest/m1/track-demand-incremental.md @@ -0,0 +1,22 @@ +# [M] Track demand updates in constant time + +## Goal + +A subscribe or leave on a track costs the same whether the track has one +reader or ten thousand. Today every change re-sums demand over all of a +track's readers. + +## Plan + +Shared fronts (#4922) put every viewer of a path on one track, which exposed +the cost: `origin/viewer_join/1000v_1b` went from 18 us to 158 us while churn +and memory improved. The aggregate (subscription ranges, max delay, priority, +whatever the subscription carries) needs to update incrementally, or be +structured so the common case (a reader joining or leaving with a dominated +subscription) does not walk the others. + +- Benchmark swept over readers per track and tracks, using the + `rs/moq-net/benches/viewers.rs` target #4922 adds. +- Check the JS model for the same pattern and mirror the fix if it applies. +- Coordinate with [Subscribe ranges](/quest/m1/subscribe-ranges/model.md), + which changes what the aggregate is; whichever lands second adapts. diff --git a/quest/m1/uring-tests-under-load.md b/quest/m1/uring-tests-under-load.md new file mode 100644 index 00000000000..dff96567494 --- /dev/null +++ b/quest/m1/uring-tests-under-load.md @@ -0,0 +1,20 @@ +# [S] moq-uring tests pass under parallel load + +## Goal + +`just check` passes while several checks run on one machine. Today moq-uring +tests fail when concurrent runs exhaust the user's shared `RLIMIT_MEMLOCK` +(8 MiB by default), and `deadline_fires_at_park`, +`dropped_worker_rejects_operations`, and `remote_wake_unparks` have failed under +heavy load and passed alone. + +## Plan + +Seen repeatedly during the 2026-10-06 parallel quest run. Fix at the cause, +never with a retry or longer timeout: + +- Locked memory: find what each test ring locks and whether tests can share + or shrink rings; failing that, decide whether the dev shell should raise the + limit, or the tests should detect the limit and fail with a clear message. +- The worker tests: check them for wall-clock dependencies and move them to + mocked time or event assertions. diff --git a/quest/m2/README.md b/quest/m2/README.md index 6d071d88ae0..df679e1e1a8 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -117,3 +117,4 @@ waiting on an upstream release waits in [m4](/quest/m4/README.md). - [Malformed moq-transport input](/quest/m2/ietf-malformed-close.md) - malformed draft-18 and draft-21 control input closes the session with the draft's code, or PROTOCOL_VIOLATION where a code is a real burden and the fallback is recorded in `doc/concept/standard.md`, in moq-net and js/net - [moq-transport request codes](/quest/m2/ietf-request-codes.md) - Range Filters (INVALID_FILTER), reserved namespaces, and RENDEZVOUS_TIMEOUT get the draft's answer, or a recorded fallback code, and the deliberate deviations are documented - [Leftover worklet types](/quest/m2/worklet-leftovers.md) - `@moq/hang` drops its unused `@types/audioworklet` dependency, and moq-boy stops including the shared worklet declaration +- [Native enabled](/quest/m2/native-enabled.md) - native players and the ffi/C paths never select a disabled rendition diff --git a/quest/m2/native-enabled.md b/quest/m2/native-enabled.md new file mode 100644 index 00000000000..2930507b66c --- /dev/null +++ b/quest/m2/native-enabled.md @@ -0,0 +1,15 @@ +# [M] Native consumers skip disabled renditions + +## Goal + +Native consumers (moq-cli play, moq-gst, the moq-ffi and C convenience paths, +and audio selection generally) never select a rendition with +`enabled: false`, as `@moq/watch` does after #4915. + +## Plan + +#4915 makes `hang::catalog::Video::ranked()` sort disabled renditions last, so +transcode, rtc egress, rtmp, and FLV export prefer an enabled one. These +consumers select without it. Route their selection through one ranked helper +for video and audio rather than adding a check at each site. A C +`moq_consume_audio_enabled` getter rides along if a C consumer needs it. From 708231aa9af6e4ef5c9ec2389d263232285c14b1 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 6 Oct 2026 09:52:09 -0700 Subject: [PATCH 2/6] quest: abandon request-linger A linger in the session subscriber also holds client subscriptions open after the app drops them, which costs bandwidth on every rendition switch, and no relay churn has been measured that would justify it. Co-Authored-By: Claude Opus 5.5 --- quest/m1/request-linger.md | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 quest/m1/request-linger.md diff --git a/quest/m1/request-linger.md b/quest/m1/request-linger.md deleted file mode 100644 index 3d89ba3276a..00000000000 --- a/quest/m1/request-linger.md +++ /dev/null @@ -1,27 +0,0 @@ -# [M] Upstream requests linger past their demand - -## Goal - -An upstream FETCH or SUBSCRIBE outlives the last reader wanting it by a short -linger, so a request issued and abandoned in quick succession (a reader that -re-subscribes, seeks, or blips) does not churn upstream. A reader returning -within the linger rides the request already in flight. - -## Plan - -Decided in planning (2026-10-03, from [#4741](https://github.com/moq-dev/moq/pull/4741)): - -- **Both request types.** The session's upstream SUBSCRIBE, today canceled the - moment the last subscriber leaves, and FETCH, today cut short (all the way - upstream) once no fetcher waits and no reader holds its group. -- **Demand decides, per request type, unsplit.** A FETCH is canceled once its - demand stays unused through the linger. A subscription's groups ignore group - demand: a front's reader still gives up a stale group a fetcher happens to - hold, as a relay's subscription would. Group demand is not split into fetch - and subscription halves. -- **A short fixed window**, around a second: enough to absorb a re-subscribe or - a seek, far below the front's 30 s cache linger. A constant, measured during - the quest. -- Watches demand through the `demand()` handles. The last `fetch_group` - caller leaving withdraws its fetch at once, so a reader returning within the - linger starts a fresh request; the linger has to defer that withdrawal too. From 537d81cd85096719a4d8de28ce0b23aca379cd4a Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 6 Oct 2026 09:52:33 -0700 Subject: [PATCH 3/6] quest: drop request-linger from the m1 list Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/quest/m1/README.md b/quest/m1/README.md index b4e35241b18..514c40a9d8d 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -40,7 +40,6 @@ blocks. The quests that gated m0 lines moved under them. - [Cluster routing](/quest/m1/cluster-routing/README.md) - any node routes toward a broadcast's origin over CDN and P2P links alike, with per-origin routes and path-less announces - [One route cost](/quest/m1/route-cost.md) - Warm and Cold collapse to one static route cost - [Track tail interop](/quest/m1/track-tail-interop.md) - a Rust publisher ending a track with a group in flight is read to its end by the JS subscriber, and the reverse, in `just test interop` -- [Request linger](/quest/m1/request-linger.md) - an upstream FETCH or SUBSCRIBE outlives its last reader by a short linger, so quick re-requests don't churn upstream - [Flat questlines](/quest/m1/quest-flat-lines.md) - moq pins the current quest CLI, lands its questline branches on main, and retires them - [moq-bot may push workflow changes](/quest/m1/bot-workflows-permission.md) - condition: the maintainer grants moq-bot's GitHub App the `workflows` permission, so back-merges carrying workflow changes go through - [Binding audio delay](/quest/m1/binding-surface.md) - moq-ffi and every wrapper configure and observe audio playout delay From 1f0cf3e68858eff8075a35dd1052e14683a8d293 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 6 Oct 2026 10:16:27 -0700 Subject: [PATCH 4/6] quest: plan the media audio-tone flake Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 1 + quest/m1/media-audio-tone.md | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 quest/m1/media-audio-tone.md diff --git a/quest/m1/README.md b/quest/m1/README.md index 514c40a9d8d..e6bf94e3d4b 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -66,6 +66,7 @@ blocks. The quests that gated m0 lines moved under them. - [Dogfood hosted worklets](/quest/m1/dogfood-assets.md) - moq.dev and the moq.pro dashboard host the worklets and call `assets()` after the release - [More tests under load](/quest/m1/test-flakes-2/README.md) - the second round of load-only failures, one quest per flake, fixed at the cause - [moq-uring tests under load](/quest/m1/uring-tests-under-load.md) - uring tests pass while parallel checks share locked memory +- [Media audio-tone check](/quest/m1/media-audio-tone.md) - the media lane's audio-tone check passes under load, fixed at its cause - [CI runner stalls](/quest/m1/ci-runner-stalls.md) - the 0.4 to 0.8 s freezes of both interop tracks on CI are attributed from a week of nightlies and fixed or told apart from playback bugs - [Subscriber max-delay](/quest/m1/subscriber-max-delay.md) - subscriber staleness becomes `max_delay`; publisher retention stays `max_age` - [Wire compatibility](/quest/m1/wire-compat.md) - a nightly run tests this checkout against the last published release for tokens, session wire, and catalog/container diff --git a/quest/m1/media-audio-tone.md b/quest/m1/media-audio-tone.md new file mode 100644 index 00000000000..08d13760dff --- /dev/null +++ b/quest/m1/media-audio-tone.md @@ -0,0 +1,15 @@ +# [S] Media audio-tone check holds under load + +## Goal + +The `just test media` audio-tone check passes under load, fixed at its cause. +It has failed with 72 of 81 samples audible, in #4719's runs and again in the +2026-10-06 late-join loops, and passed on rerun. + +## Plan + +First decide whether the missing samples are real playback (a stall, +underrun, or late start the check correctly catches) or how the check samples +the tone. Reproduce it looped under synthetic CPU load (approved by the +maintainer for these runs) before changing anything, and don't widen the +window without a reason. From c902fb249efcc36996300d38f65a9bdcaa80e62c Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 6 Oct 2026 10:27:37 -0700 Subject: [PATCH 5/6] docs(quest): clarify follow-up scope and prerequisites Co-Authored-By: GPT-6 --- quest/m0/prefix-route-fronts.md | 5 +++-- quest/m1/cross-relay-flap-drill.md | 4 ++++ quest/m1/flate-stream-budget.md | 21 +++++++++++++----- quest/m1/hang-changelog-04.md | 15 +++++++++---- quest/m1/js-track-takeover.md | 22 ++++++++++++++----- quest/m1/media-audio-tone.md | 14 +++++++++--- quest/m1/refuse-ignored-tls.md | 2 +- quest/m1/track-demand-incremental.md | 15 +++++++++---- quest/m1/uring-tests-under-load.md | 33 ++++++++++++++++++---------- quest/m2/native-enabled.md | 22 ++++++++++++++----- 10 files changed, 111 insertions(+), 42 deletions(-) diff --git a/quest/m0/prefix-route-fronts.md b/quest/m0/prefix-route-fronts.md index 9dd913f89f1..ce5a40f6341 100644 --- a/quest/m0/prefix-route-fronts.md +++ b/quest/m0/prefix-route-fronts.md @@ -21,6 +21,7 @@ not per viewer, so a single session can amplify it by naming paths. the front count stays bounded, and extend the origin benchmark with a distinct-path axis. -## Related +## Required -- [Request caps](/quest/m0/request-caps.md) - bounds per-session requests; this bounds what one route can mint from them +- [Request caps](/quest/m0/request-caps.md) - settles the refusal shapes reused here +- [Shared fronts](/quest/m0/shared-fronts.md) - #4922 provides the per-path front model diff --git a/quest/m1/cross-relay-flap-drill.md b/quest/m1/cross-relay-flap-drill.md index 500cfbafe5c..daec66debd9 100644 --- a/quest/m1/cross-relay-flap-drill.md +++ b/quest/m1/cross-relay-flap-drill.md @@ -13,3 +13,7 @@ Extend `bursts_cross_a_cluster` (#4920, `rs/moq-relay/tests/drills.rs`) rather than adding a harness: flap the shaped peer link during a burst, keep strict grading, and add a drill mutation proving the flap is graded. A moq-transport peer link variant is optional; add it only if it is cheap here. + +## Required + +- [Two-relay drill](/quest/m1/cross-relay-drill.md) - #4920 provides bursts_cross_a_cluster and its shaped peer link diff --git a/quest/m1/flate-stream-budget.md b/quest/m1/flate-stream-budget.md index 6a628a8bc4d..a995296db0a 100644 --- a/quest/m1/flate-stream-budget.md +++ b/quest/m1/flate-stream-budget.md @@ -4,12 +4,23 @@ `moq-flate` and `@moq/flate` `stream` mode refuse an append that cannot fit the group budget with `GroupTooLarge` and leave the log intact, compressed or -not, as JSON streams do after #4911. +not, as JSON streams do after #4911. A payload beyond the decoder's frame +size limit is also refused before encoding without ending the log. ## Plan Flate's stream mode rides one group, like JSON's, so it has the same hole. -Move the DEFLATE worst-case bound (`deflateBound`, private in each json -package after #4911) into the flate packages and have json reuse it, so the -bound and its tests live in one place per language. Mirror #4911's tests in -both compression modes. +Move the DEFLATE worst-case bound (`deflateBound` / `deflate_bound`) from json +into flate and have json reuse it, so the bound and its tests live in one +place per language. Rust's helper is private; JS's is exported from its +encoder module, so expose only what json needs from flate. + +Check both limits before mutating the compression window. A refusal leaves +prior records readable and allows a later fitting append; a failed write +after encoding still aborts, as JSON does. Mirror #4911's tests in both +compression modes, including the decoder-size refusal, and document the +budget and refusal behavior in the flate library docs. + +## Required + +- [JSON stream budget](/quest/m1/json-stream-budget.md) - #4911 provides the preflight budget model and DEFLATE bound diff --git a/quest/m1/hang-changelog-04.md b/quest/m1/hang-changelog-04.md index b112ddd4cef..476085ce53d 100644 --- a/quest/m1/hang-changelog-04.md +++ b/quest/m1/hang-changelog-04.md @@ -3,10 +3,17 @@ ## Goal The `drafts/draft-lcurley-moq-hang.md` changelog lists under -03 only what the -published -03 contains. Entries that landed after -03 was published (delay, -group starts, namespaced keys) move to the -04 section #4915 opens. +published -03 contains. Entries that landed after publication move to the +existing -04 section. ## Plan -Compare against the published -03 on the datatracker. Land after #4915. Run -`just drafts check`. +Compare every -03 entry against the published +[draft-lcurley-moq-hang-03](https://www.ietf.org/archive/id/draft-lcurley-moq-hang-03.txt), +including its body and changelog; do not rely on an illustrative list of late +entries. The root `clock` section already shipped in -03 and stays there. +Run `just drafts check`. This corrects attribution, not the format. + +## Required + +- [Enabled flag](/quest/m1/catalog-enabled.md) - land after #4915's draft changelog edit to avoid conflicting changes diff --git a/quest/m1/js-track-takeover.md b/quest/m1/js-track-takeover.md index ff0840f8aa3..80ce587a3b7 100644 --- a/quest/m1/js-track-takeover.md +++ b/quest/m1/js-track-takeover.md @@ -5,14 +5,26 @@ In `@moq/net`, `createTrack` and `insertTrack` on a name with a queued or pending request answer that request and continue the name's group and datagram sequences, as Rust's `create_track` does, instead of throwing -`duplicate track`. The per-name sequence map stays bounded. +`duplicate track`. The per-name sequence map stays bounded without forgetting +sequences that were written within the broadcast. ## Plan Decided 2026-10-06 while settling #4929: that PR coalesces JS publishing-side subscriptions per name and accepts the `duplicate track` throw for now; this -quest brings JS to parity. The per-name sequence map only grows on accepted -requests and is never pruned; bound it the way #4929 bounds Rust's (drop -names that never wrote and that no track holds). +quest brings JS to parity. Drop unused entries only when no track holds them +and they never saw a write. Written sequence state survives until the +broadcast ends: evicting it and restarting under the same name would reuse +content identities and stall resumed readers. -Public API: behavior change in `@moq/net` only. +Bound admission of additional names if retaining their sequence state would +exceed the map's bound; settle the refusal surface during implementation. +Starting sequences over requires a new broadcast. Test queued-request +takeover, explicit sequence advancement, replacement continuity, and bounded +name admission. Update the JS net docs for the behavior change. + +Public API: behavior change in `@moq/net` only. Wire: none. + +## Required + +- [Dynamic track identity](/quest/m1/2991-net-coalesce-dynamic-tracks-and-preserve-sequences-across.md) - #4929 provides coalesced requests and the shared sequence namespace diff --git a/quest/m1/media-audio-tone.md b/quest/m1/media-audio-tone.md index 08d13760dff..ef951c58283 100644 --- a/quest/m1/media-audio-tone.md +++ b/quest/m1/media-audio-tone.md @@ -3,8 +3,8 @@ ## Goal The `just test media` audio-tone check passes under load, fixed at its cause. -It has failed with 72 of 81 samples audible, in #4719's runs and again in the -2026-10-06 late-join loops, and passed on rerun. +It failed with 66 of 75 samples audible in #4719's runs and 72 of 81 in +the 2026-10-06 late-join loops (#4914), and passed on rerun. ## Plan @@ -12,4 +12,12 @@ First decide whether the missing samples are real playback (a stall, underrun, or late start the check correctly catches) or how the check samples the tone. Reproduce it looped under synthetic CPU load (approved by the maintainer for these runs) before changing anything, and don't widen the -window without a reason. +window or lower the agreement threshold to hide the symptom. Keep this +standalone because its root cause is independent of the late-join regression; +apply the load-flake questline's cause-first rules and include it in the final +loaded check. + +## Related + +- [More tests under load](/quest/m1/test-flakes-2/README.md) - shares the loaded-check validation +- [Media late join](/quest/m1/test-flakes-2/media-late-join.md) - shares the media fixture, but tracks a separate failure diff --git a/quest/m1/refuse-ignored-tls.md b/quest/m1/refuse-ignored-tls.md index 8918d2562a3..addd24303df 100644 --- a/quest/m1/refuse-ignored-tls.md +++ b/quest/m1/refuse-ignored-tls.md @@ -9,7 +9,7 @@ no QUIC listener, and `web.https.root` without `web.https.listen`. ## Plan -Same class of bug as the listener client CA that #4912 now refuses in +Same class of bug as the listener client CA that #4912 proposes refusing in `moq_tokio::Server::build`. Audit the other TLS and listener options for settings that only take effect on a listener that may not exist, and refuse each where the config is assembled. TOML cannot express clap's `requires`, so diff --git a/quest/m1/track-demand-incremental.md b/quest/m1/track-demand-incremental.md index 7a5ae5f3eb8..3b0e371eef2 100644 --- a/quest/m1/track-demand-incremental.md +++ b/quest/m1/track-demand-incremental.md @@ -11,12 +11,19 @@ track's readers. Shared fronts (#4922) put every viewer of a path on one track, which exposed the cost: `origin/viewer_join/1000v_1b` went from 18 us to 158 us while churn and memory improved. The aggregate (subscription ranges, max delay, priority, -whatever the subscription carries) needs to update incrementally, or be -structured so the common case (a reader joining or leaving with a dominated -subscription) does not walk the others. +whatever the subscription carries) must update with bounded work independent +of reader count on every subscribe and leave, including when the departing +reader supplied an aggregate extreme. Optimizing only dominated readers does +not meet this goal. If the aggregate makes that bound infeasible, bring back +the measured tradeoff for a maintainer decision before narrowing the goal. -- Benchmark swept over readers per track and tracks, using the +- Benchmark joins and leaves, including aggregate-extreme departures, swept + over readers per track and tracks, using the `rs/moq-net/benches/viewers.rs` target #4922 adds. - Check the JS model for the same pattern and mirror the fix if it applies. - Coordinate with [Subscribe ranges](/quest/m1/subscribe-ranges/model.md), which changes what the aggregate is; whichever lands second adapts. + +## Required + +- [Shared fronts](/quest/m0/shared-fronts.md) - #4922 provides the shared track fan-out and viewer benchmark diff --git a/quest/m1/uring-tests-under-load.md b/quest/m1/uring-tests-under-load.md index dff96567494..b03aefd7a4b 100644 --- a/quest/m1/uring-tests-under-load.md +++ b/quest/m1/uring-tests-under-load.md @@ -2,19 +2,28 @@ ## Goal -`just check` passes while several checks run on one machine. Today moq-uring -tests fail when concurrent runs exhaust the user's shared `RLIMIT_MEMLOCK` -(8 MiB by default), and `deadline_fires_at_park`, -`dropped_worker_rejects_operations`, and `remote_wake_unparks` have failed under -heavy load and passed alone. +`just check` passes while several checks run on one machine. During the +2026-10-06 parallel quest run, moq-uring tests failed while concurrent runs +shared an 8 MiB `RLIMIT_MEMLOCK`, and `deadline_fires_at_park` and +`dropped_worker_rejects_operations` failed under heavy load and passed alone. ## Plan -Seen repeatedly during the 2026-10-06 parallel quest run. Fix at the cause, -never with a retry or longer timeout: +Fix at the cause, never with a retry or longer timeout: -- Locked memory: find what each test ring locks and whether tests can share - or shrink rings; failing that, decide whether the dev shell should raise the - limit, or the tests should detect the limit and fail with a clear message. -- The worker tests: check them for wall-clock dependencies and move them to - mocked time or event assertions. +- Locked memory: measure what each test ring locks and whether tests can share + or shrink rings. If configuration must change, make the supported dev-shell + and CI setup actually allow the tests to pass under parallel load. + `Error::ring` already reports `RLIMIT_MEMLOCK` on ENOMEM; check that this + reaches the failing tests. A clearer failure alone does not meet the goal. +- The worker tests: check the two named tests for wall-clock dependencies and + move them to mocked time or event assertions. `remote_wake_unparks` belongs + to [Papercuts](/quest/m1/papercuts.md), not this quest. +- Keep this resource-sharing follow-up standalone: it has no shared fixture + with the current children of the load-flake questline. Run the affected + tests during parallel checks and wire any new coverage into CI. + +## Related + +- [Papercuts](/quest/m1/papercuts.md) - owns the remote worker wake assertion +- [More tests under load](/quest/m1/test-flakes-2/README.md) - the same cause-first rules and final loaded check apply here diff --git a/quest/m2/native-enabled.md b/quest/m2/native-enabled.md index 2930507b66c..2741fc1eb35 100644 --- a/quest/m2/native-enabled.md +++ b/quest/m2/native-enabled.md @@ -4,12 +4,22 @@ Native consumers (moq-cli play, moq-gst, the moq-ffi and C convenience paths, and audio selection generally) never select a rendition with -`enabled: false`, as `@moq/watch` does after #4915. +`enabled: false`, as `@moq/watch` does after #4915. If every supported +rendition is disabled, select none until an enabled rendition appears. ## Plan -#4915 makes `hang::catalog::Video::ranked()` sort disabled renditions last, so -transcode, rtc egress, rtmp, and FLV export prefer an enabled one. These -consumers select without it. Route their selection through one ranked helper -for video and audio rather than adding a check at each site. A C -`moq_consume_audio_enabled` getter rides along if a C consumer needs it. +PR #4915's `hang::catalog::Video::ranked()` orders by enabled status before +picture area and bitrate; it still yields disabled entries. Ranking alone +cannot enforce this goal when every rendition is disabled. Share eligible +rendition selection for video and audio rather than repeating checks at each +consumer. Preserve the existing quality ordering among enabled renditions. +Test mixed and all-disabled catalogs, plus disable/re-enable transitions. + +A C `moq_consume_audio_enabled` getter is added only if a C consumer needs it; +any FFI/C API change updates all wrappers and their docs in the same PR. +Update native consumer docs for the selection behavior. + +## Required + +- [Enabled flag](/quest/m1/catalog-enabled.md) - #4915 provides enabled fields and enabled-first video ranking From 352c120f015a3d5192038c4178e14261ab68a2a6 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 6 Oct 2026 12:02:25 -0700 Subject: [PATCH 6/6] quest: fold incremental track demand into demand-aggregate Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 1 - quest/m1/perf/demand-aggregate.md | 6 ++++-- quest/m1/track-demand-incremental.md | 29 ---------------------------- 3 files changed, 4 insertions(+), 32 deletions(-) delete mode 100644 quest/m1/track-demand-incremental.md diff --git a/quest/m1/README.md b/quest/m1/README.md index c22c986bcf3..0a44964597a 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -149,7 +149,6 @@ blocks. The quests that gated m0 lines moved under them. - [One max_age meaning](/quest/m1/cache-max-age.md) - a swept benchmark decides whether the track cache ages groups out on wall time without a write, then Rust and js/net both implement it - [Frame slot charge](/quest/m1/frame-slot-charge.md) - a group's frame slots past the first four count against the cache pool, including capacity a released group keeps - [Front deadlines](/quest/m1/front-deadline-index.md) - a front's per-event cost stops growing with its track count: an expiry index and per-track wakes, proven by a churn benchmark -- [Incremental track demand](/quest/m1/track-demand-incremental.md) - a subscribe or leave costs the same at one reader or ten thousand - [Listener deadlines](/quest/m1/listener-deadlines.md) - io_uring, HTTP/2, and the internal listener bound slow handshakes and headers, and iroh honors `quic.keep_alive` - [Papercuts](/quest/m1/papercuts.md) - JS refuses to serve a broadcast it did not produce, and a uring test stops sleeping - [Front parking](/quest/m1/origin-front-parks.md) - an unroutable request waits on a front instead of re-asking on every route-table move diff --git a/quest/m1/perf/demand-aggregate.md b/quest/m1/perf/demand-aggregate.md index 1d0bf6d0ee3..58e7b4c57ea 100644 --- a/quest/m1/perf/demand-aggregate.md +++ b/quest/m1/perf/demand-aggregate.md @@ -30,8 +30,9 @@ readers, so `js/net/src/track.ts` keeps its fold. - Bench first, in `rs/moq-net/benches/track.rs` (decided 2026-10-06): make `track_subscriber_join` and `track_subscriber_churn` measure per-operation cost swept over the readers already on the track (1, 100, 1k, 10k), and add a - preference-update sweep over the same axis. `viewers.rs` `viewer_join` is - the end-to-end check. + preference-update sweep over the same axis, including a leave by the reader + that holds a field's extreme. `viewers.rs` `viewer_join` is the end-to-end + check. - A unit test checks the counted aggregate against a full fold across random subscribe, update, and drop sequences. @@ -40,3 +41,4 @@ Public API: none expected. Wire: none. ## Related - [Front deadlines](/quest/m1/front-deadline-index.md) - the per-track half of a front's cost; this is the per-reader half +- [Subscribe ranges](/quest/m1/subscribe-ranges/model.md) - changes what the aggregate holds; whichever lands second adapts diff --git a/quest/m1/track-demand-incremental.md b/quest/m1/track-demand-incremental.md deleted file mode 100644 index 0890538ed79..00000000000 --- a/quest/m1/track-demand-incremental.md +++ /dev/null @@ -1,29 +0,0 @@ -# [M] Track demand updates in constant time - -## Goal - -A subscribe or leave on a track costs the same whether the track has one -reader or ten thousand. Today every change re-sums demand over all of a -track's readers. - -## Plan - -Shared fronts (#4922, merged) put every viewer of a path on one track, which -exposed the cost: `origin/viewer_join/1000v_1b` went from 18 us to 158 us while churn -and memory improved. The aggregate (subscription ranges, max delay, priority, -whatever the subscription carries) must update with bounded work independent -of reader count on every subscribe and leave, including when the departing -reader supplied an aggregate extreme. Optimizing only dominated readers does -not meet this goal. If the aggregate makes that bound infeasible, bring back -the measured tradeoff for a maintainer decision before narrowing the goal. - -- Benchmark joins and leaves, including aggregate-extreme departures, swept - over readers per track and tracks, using the - `rs/moq-net/benches/viewers.rs` target #4922 added. -- Check the JS model for the same pattern and mirror the fix if it applies. -- Coordinate with [Subscribe ranges](/quest/m1/subscribe-ranges/model.md), - which changes what the aggregate is; whichever lands second adapts. - -## Related - -- [Demand aggregate](/quest/m1/perf/demand-aggregate.md) - overlaps this goal; #4922 added it with Rust-only and counted-map decisions