From 7f4c7286414f37a7d8cc4bc661e7daf919f4c485 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 7 Oct 2026 17:30:47 -0700 Subject: [PATCH 1/4] quest: plan follow-ups from the 2026-10-07 PR sweep Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 4 ++++ quest/m1/cmaf-inline-followups.md | 21 ++++++++++++++++++++ quest/m1/e2ee/typescript.md | 2 ++ quest/m1/ietf-headless-subgroup.md | 17 ++++++++++++++++ quest/m1/ietf-legacy-updates.md | 31 ++++++++++++++++++++++++++++++ quest/m1/js-session-parity.md | 21 ++++++++++++++++++++ quest/m1/perf/README.md | 1 + quest/m1/perf/front-rescan.md | 17 ++++++++++++++++ quest/m2/README.md | 4 ++++ quest/m2/c-backend-copy.md | 14 ++++++++++++++ quest/m2/js-audio-ranked.md | 12 ++++++++++++ quest/m2/listener-lb-refusals.md | 8 ++++++++ quest/m2/ts-export-catalog.md | 7 +++++++ 13 files changed, 159 insertions(+) create mode 100644 quest/m1/cmaf-inline-followups.md create mode 100644 quest/m1/ietf-headless-subgroup.md create mode 100644 quest/m1/ietf-legacy-updates.md create mode 100644 quest/m1/js-session-parity.md create mode 100644 quest/m1/perf/front-rescan.md create mode 100644 quest/m2/c-backend-copy.md create mode 100644 quest/m2/js-audio-ranked.md create mode 100644 quest/m2/listener-lb-refusals.md create mode 100644 quest/m2/ts-export-catalog.md diff --git a/quest/m1/README.md b/quest/m1/README.md index a7e0a8fc16f..5adfb0c0198 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -174,3 +174,7 @@ blocks. The quests that gated m0 lines moved under them. - [Dart codec parity](/quest/m1/dart-codecs.md) - Dart is the one binding that cannot originate media - [`moq --listen` drain and stats](/quest/m1/cli-serve.md) - a listening CLI session, already admitted through the relay's auth, is counted and drained like a relay's - [#709](/quest/m1/709-automatic-letsencrypt-support.md) - the relay provisions and renews its own ACME certificate through rustls-acme over TLS-ALPN-01, persisted on disk +- [Draft 14-16 updates](/quest/m1/ietf-legacy-updates.md) - Rust and JS apply and answer moq-transport 14-16 request updates without ending or leaking the request +- [JS session parity](/quest/m1/js-session-parity.md) - @moq/net gets per-session caps, the pending-tail hold, and resolved epochs like moq-net +- [Headless subgroup in Rust](/quest/m1/ietf-headless-subgroup.md) - a draft 14-17 subgroup starting mid-group is dropped, not fatal, as in JS +- [In-band CMAF follow-ups](/quest/m1/cmaf-inline-followups.md) - MSF, h264/h265 export, and gst caps handle avc3/hev1 CMAF diff --git a/quest/m1/cmaf-inline-followups.md b/quest/m1/cmaf-inline-followups.md new file mode 100644 index 00000000000..770bad66796 --- /dev/null +++ b/quest/m1/cmaf-inline-followups.md @@ -0,0 +1,21 @@ +# [S] Finish in-band CMAF parameter sets + +## Goal + +Every path that reads an `avc3`/`hev1` CMAF track (parameter sets in the +samples) handles it, now that `moq export fmp4` writes them (#5015) and +import and decode read them (#5037). + +## Plan + +From #5037: + +- MSF: CMAF video from an MSF catalog arrives with no `description` + (`rs/moq-mux/src/catalog/msf/consumer.rs`), so moq-video now refuses it. + Fill `description` from the init segment's sample entry. +- `moq export h264`/`h265` refuse an imported avc3 track with + `MissingParamSets` because its avcC has no SPS/PPS. Accept empty sets for + an in-band track. +- Check moq-gst's `video_caps`: in-band H.265 with no description is labeled + `stream-format=hev1` (length-prefixed), while a Legacy hev1 track is + Annex-B (`byte-stream`). Fix the label if it is wrong. diff --git a/quest/m1/e2ee/typescript.md b/quest/m1/e2ee/typescript.md index 09fa5892e28..5f9625b31d7 100644 --- a/quest/m1/e2ee/typescript.md +++ b/quest/m1/e2ee/typescript.md @@ -8,6 +8,8 @@ the Rust crate name for name, without putting keys or crypto policy in `@moq/net ## Plan +From the Rust fix (#4994): a grouped authentication or identity failure wakes every parked frame, group, and datagram read and releases the track and group demand; dropping the track consumer releases demand even while a group handle is held; a bad datagram stays an event until its key is exhausted. Use the same error and event types. + - Add the package above `@moq/net`. `Credential` accepts a 32-byte secret or a nonextractable HKDF `CryptoKey` with `deriveBits` usage, rejects extractable keys, and never serializes the secret. `credential.path(semantic)` returns the opaque broadcast name and `credential.generation(epoch)` returns a `Generation` with `name()`, `produce()`, `consume()`, and epochs come from the shared `@moq/net` `Epoch`. - Mirror the Rust modules: `Track.Producer`, `Track.Consumer`, `Group.Producer`, `Group.Consumer`, `Datagram.Event`, and a `Failure` whose `code` is the draft's typed set. No catalog helpers, no exported constants beyond the profile limits an application sizes payloads with, no stateless `protect`/`open` with caller-chosen identities, and no test-only methods on public classes. - WebCrypto AES-GCM is async, so each producer and consumer runs a serial pump: one AEAD call in flight, completions in submit order, a bounded waiter queue that throws when full. Depth one keeps frame ordinals equal to the inner `@moq/net` write order without reservation sets; raise it only when a measured capture burst needs it. Propagate backpressure, cancellation, and authentication failure explicitly; never reorder media or fall back to plaintext. diff --git a/quest/m1/ietf-headless-subgroup.md b/quest/m1/ietf-headless-subgroup.md new file mode 100644 index 00000000000..b7c7a707c49 --- /dev/null +++ b/quest/m1/ietf-headless-subgroup.md @@ -0,0 +1,17 @@ +# [S] Rust drops a headless draft 14-17 subgroup + +## Goal + +A Rust moq-net subscriber on moq-transport drafts 14 to 17 that receives a +subgroup stream starting mid-group (a non-zero first object ID, since those +drafts have no FIRST_OBJECT bit) drops that stream and keeps the +subscription, as `@moq/net` does since #5019, instead of failing the group. + +## Plan + +First check whether Rust has the bug: a test that opens a subgroup at object +2 on d14 and d16 and expects the subscription to stay up for the next group. +If it fails, apply #5019's rule: on a draft without the bit, a non-zero first +delta takes the same drop path as a cleared FIRST_OBJECT bit on d18. A gap +after an object was delivered still fails that group. If it passes, delete +this quest. diff --git a/quest/m1/ietf-legacy-updates.md b/quest/m1/ietf-legacy-updates.md new file mode 100644 index 00000000000..4c3a36cc4d5 --- /dev/null +++ b/quest/m1/ietf-legacy-updates.md @@ -0,0 +1,31 @@ +# [M] Apply draft 14-16 request updates in Rust and JS + +## Goal + +On moq-transport drafts 14 to 16, a SUBSCRIBE_UPDATE or REQUEST_UPDATE that +reaches its target request is applied, and answered where the draft requires, +in both Rust and `@moq/net`, without ending the request or leaking it. + +## Plan + +#4961 (Rust) routed updates to their target and taught the d14-16 watchers to +read framed messages: an update applies `subscriber_priority`, d15/16 answer +it with REQUEST_OK or REQUEST_ERROR, and a refused d14 update ends the +subscription with INTERNAL_ERROR. Remaining (maintainer, 2026-10-07, from +#4961 and #5011): + +- JS: #5011 routes updates to their target, but the d14-16 publisher never + reads the subscribe stream again, so an unread update keeps the stream from + reporting closed and a later UNSUBSCRIBE is lost. Read framed messages and + apply updates as Rust now does. Rebase #5011 onto that or fold it in. +- Draft 16: an update aimed at a namespace or fetch request is skipped with + no REQUEST_OK or REQUEST_ERROR; answer it. +- Draft 14: every field is mandatory, so a narrowed start or end group looks + like a repeat and is ignored; decide whether to apply it. + +Test: an update keeps a live subscription open and a later UNSUBSCRIBE still +ends it, on d14, d15 and d16, in both languages. + +## Related + +- [JS group handover](/quest/m1/js-group-handover.md) - JS also lacks Rust's route-failure splice diff --git a/quest/m1/js-session-parity.md b/quest/m1/js-session-parity.md new file mode 100644 index 00000000000..acf119d29e2 --- /dev/null +++ b/quest/m1/js-session-parity.md @@ -0,0 +1,21 @@ +# [M] @moq/net session parity with moq-net + +## Goal + +Three behaviors that landed in Rust on 2026-10-07 hold in `@moq/net` too, so a +JS peer or relay behaves like a Rust one. + +## Plan + +- Per-session caps (#4820): JS has no live announce or subscription caps. + Add them with the same defaults (100,000 and 10,000) and close the session + with TOO_MANY_REQUESTS (0x7) past them, as Rust does. +- Pending tail (#4225): Rust readers of a received track wait for missing + groups below a declared end until the tail settles; JS readers still end at + the end with groups missing (`doc/lib/js/net.md`). Mirror the hold. +- Resolved epoch (#4904, #4967): Rust `broadcast::Consumer::epoch()` and + `broadcast::Info::epoch` carry the epoch of the route a request resolved + through; JS has `Consumer.epoch` from #4904, so check `Info` parity and the + bindings (moq-ffi) surface the same value. + +Test each against the Rust behavior, with mocked time. diff --git a/quest/m1/perf/README.md b/quest/m1/perf/README.md index ae561d506f5..6cf30578fe4 100644 --- a/quest/m1/perf/README.md +++ b/quest/m1/perf/README.md @@ -70,3 +70,4 @@ the rest. - [#3122](/quest/m1/perf/3122-moq-uring-2-5-of-relay-cpu-is-vdso-clock-reads-the-drive.md) - moq-uring: ~2.5% of relay CPU is vdso clock reads; the drive loop and its callers each re-read Instant::now() - [#3199](/quest/m1/perf/3199-moq-uring-remove-sq-indirection-and-per-enter-ring-fd.md) - moq-uring: remove SQ indirection and per-enter ring fd lookup - [Remove moq-uring copies](/quest/m1/perf/uring-copies.md) - egress, stream send and receive, and datagram receive stop copying where the QUIC core already allows it, after the fork +- [Front rescan](/quest/m1/perf/front-rescan.md) - a route swap handles every ready track query per pass, linear in the front's tracks diff --git a/quest/m1/perf/front-rescan.md b/quest/m1/perf/front-rescan.md new file mode 100644 index 00000000000..90d0240e8b5 --- /dev/null +++ b/quest/m1/perf/front-rescan.md @@ -0,0 +1,17 @@ +# [S] One front pass handles every ready track query + +## Goal + +A front's route swap costs time linear in its tracks. `origin/copy_walk` +(#4995) measured it growing roughly with the square of the track count: +186 µs at 32 tracks, 769 µs at 64, 2.16 ms at 128 (one copy each), on track +for about 10 ms at a few hundred. + +## Plan + +In `run_front`'s wait loop (`rs/moq-net/src/model/origin.rs`, around the +query handling), each pass handles one ready track query and then rescans +every track from the start. Handle every ready query in one pass. Measure +with `origin/copy_walk` before and after; the per-copy cost (about 2 µs for +32 extra copies) is out of scope until a profile says otherwise. + diff --git a/quest/m2/README.md b/quest/m2/README.md index 8620daa4ee2..26088b402de 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -118,3 +118,7 @@ waiting on an upstream release waits in [m4](/quest/m4/README.md). - [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 +- [JS audio ranking](/quest/m2/js-audio-ranked.md) - @moq/hang and HLS rank audio renditions like Rust +- [ts::Export catalog stream](/quest/m2/ts-export-catalog.md) - TS export takes (source, catalog) like the other exporters +- [C backend copy](/quest/m2/c-backend-copy.md) - one payload copy out of the C backend, benchmarked +- [Load-balancer refusals](/quest/m2/listener-lb-refusals.md) - refuse ignored or conflicting QUIC load-balancer settings diff --git a/quest/m2/c-backend-copy.md b/quest/m2/c-backend-copy.md new file mode 100644 index 00000000000..3eafc0324f6 --- /dev/null +++ b/quest/m2/c-backend-copy.md @@ -0,0 +1,14 @@ +# [S] One payload copy out of the C backend + +## Goal + +A frame payload crossing moq-ffi's C backend (uniffi-bindgen-cpp fork, +#5007) is copied once, not twice, measured by a benchmark that lands with +the change. + +## Plan + +Find both copies (FFI buffer conversion and the C struct fill), remove one, +and add a benchmark over payload sizes so a regression shows up. Whether to +offer the C backend upstream (LiveKit, NordSecurity) is the maintainer's call +and out of scope. diff --git a/quest/m2/js-audio-ranked.md b/quest/m2/js-audio-ranked.md new file mode 100644 index 00000000000..d4c1f5467e8 --- /dev/null +++ b/quest/m2/js-audio-ranked.md @@ -0,0 +1,12 @@ +# [S] Rank audio renditions in JS and HLS + +## Goal + +`@moq/hang` orders audio renditions the way Rust `hang::catalog::Audio::ranked` +(#4993) does: highest bitrate, then sample rate, then channels, unknown +bitrate last, ties in name order. The HLS exporter orders audio renditions by +that rank instead of by name. + +## Plan + +Mirror `Catalog.ranked` for video (#4988). Name it to match Rust per AGENTS.md. diff --git a/quest/m2/listener-lb-refusals.md b/quest/m2/listener-lb-refusals.md new file mode 100644 index 00000000000..e4f52b048a8 --- /dev/null +++ b/quest/m2/listener-lb-refusals.md @@ -0,0 +1,8 @@ +# [XS] Refuse ignored QUIC load-balancer settings + +## Goal + +`--listen-quic-lb-nonce` without `--listen-quic-lb-id`, set through TOML or +env, stops startup with an error instead of being ignored, and `lb_id` no +longer silently overrides `load_balancer`: setting both is refused. Follows +#5006, which refused the other ignored listener settings. diff --git a/quest/m2/ts-export-catalog.md b/quest/m2/ts-export-catalog.md new file mode 100644 index 00000000000..accd1ebb489 --- /dev/null +++ b/quest/m2/ts-export-catalog.md @@ -0,0 +1,7 @@ +# [S] ts::Export takes a catalog stream + +## Goal + +`ts::Export::new` takes `(source, catalog)` like `flv::Export`, `fmp4::Export`, +and `mkv::Export` (#4987), and `with_catalog_format` moves onto the catalog +stream, with no new public type and no compatibility shim. From e40e436ca93ea5c7f6dedc9455aa540cb13bb744 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 7 Oct 2026 19:13:01 -0700 Subject: [PATCH 2/4] quest: apply the maintainer's 2026-10-08 decisions to the PR-sweep follow-ups --- quest/m1/README.md | 3 ++- quest/m1/datagram-replay-bound.md | 23 +++++++++++++++++++++++ quest/m1/front-deadline-index.md | 6 +++++- quest/m1/ietf-headless-subgroup.md | 4 ++++ quest/m1/js-session-parity.md | 29 ++++++++++++++++++++--------- quest/m1/perf/README.md | 1 - quest/m1/perf/front-rescan.md | 17 ----------------- quest/m2/js-audio-ranked.md | 4 ++++ 8 files changed, 58 insertions(+), 29 deletions(-) create mode 100644 quest/m1/datagram-replay-bound.md delete mode 100644 quest/m1/perf/front-rescan.md diff --git a/quest/m1/README.md b/quest/m1/README.md index b4231e0b96b..8ea3402d0ba 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -182,6 +182,7 @@ blocks. The quests that gated m0 lines moved under them. - [`moq --listen` drain and stats](/quest/m1/cli-serve.md) - a listening CLI session, already admitted through the relay's auth, is counted and drained like a relay's - [#709](/quest/m1/709-automatic-letsencrypt-support.md) - the relay provisions and renews its own ACME certificate through rustls-acme over TLS-ALPN-01, persisted on disk - [Draft 14-16 updates](/quest/m1/ietf-legacy-updates.md) - Rust and JS apply and answer moq-transport 14-16 request updates without ending or leaking the request -- [JS session parity](/quest/m1/js-session-parity.md) - @moq/net gets per-session caps, the pending-tail hold, and resolved epochs like moq-net +- [JS session parity](/quest/m1/js-session-parity.md) - @moq/net gets moq-net's per-session caps, pending-tail hold, and resolved epochs - [Headless subgroup in Rust](/quest/m1/ietf-headless-subgroup.md) - a draft 14-17 subgroup starting mid-group is dropped, not fatal, as in JS - [In-band CMAF follow-ups](/quest/m1/cmaf-inline-followups.md) - MSF, h264/h265 export, and gst caps handle avc3/hev1 CMAF +- [Datagram replay bound](/quest/m1/datagram-replay-bound.md) - a new datagram subscriber starts within its max delay of the newest datagram, not at a minutes-old buffer diff --git a/quest/m1/datagram-replay-bound.md b/quest/m1/datagram-replay-bound.md new file mode 100644 index 00000000000..e46ecb5e110 --- /dev/null +++ b/quest/m1/datagram-replay-bound.md @@ -0,0 +1,23 @@ +# [XS] A new subscriber's datagrams start within its max delay + +## Goal + +A new datagram subscriber starts at the first buffered datagram within the +subscription's `max_delay` of the newest datagram's timestamp, in Rust +moq-net and `@moq/net`. Since #4982 it may otherwise get the whole +64-datagram send buffer (`MAX_DATAGRAMS` in `rs/moq-net/src/model/track.rs` +and `js/net/src/track.ts`), which on a sparse track can be minutes old. +Untimed tracks keep today's behavior. + +## Plan + +Decided by the maintainer (2026-10-08): "fine to serve old datagrams from +the last ~50ms", so the bound is the subscription's own `max_delay` measured +against the newest datagram's timestamp, not wall time. Only where a new +datagram cursor starts changes; delivery after that is unchanged. + +Test with mocked time in both languages: a sparse timed track with old and +recent datagrams buffered gives a new subscriber only those within its +`max_delay` of the newest, and an untimed track still gives the whole buffer. + +Public API: none. Wire: none. diff --git a/quest/m1/front-deadline-index.md b/quest/m1/front-deadline-index.md index 50388b5a361..d24b61383ba 100644 --- a/quest/m1/front-deadline-index.md +++ b/quest/m1/front-deadline-index.md @@ -19,7 +19,11 @@ reacting to one track's event touch only that track. `Parked`/unparked transition, so `next_deadline` is its first entry and the deadline sweep pops only what expired. - Replace the driver's scan-every-track poll with per-track wakes, so an - event on one track polls that track. + event on one track polls that track. This also removes `run_front`'s + quadratic rescan, where each pass handles one ready track query and then + rescans every track: a route swap measured 186 µs at 32 tracks, 769 µs at + 64, and 2.16 ms at 128 (#4995's `origin/copy_walk`), which is this fix's + regression bench. - Keep the front's exhaustive walk test passing, and add a unit test that the index agrees with a full scan across random transitions. - Not in scope: kio's level-only demand, which lets a reader that comes and diff --git a/quest/m1/ietf-headless-subgroup.md b/quest/m1/ietf-headless-subgroup.md index b7c7a707c49..591a561b2c7 100644 --- a/quest/m1/ietf-headless-subgroup.md +++ b/quest/m1/ietf-headless-subgroup.md @@ -15,3 +15,7 @@ If it fails, apply #5019's rule: on a draft without the bit, a non-zero first delta takes the same drop path as a cleared FIRST_OBJECT bit on d18. A gap after an object was delivered still fails that group. If it passes, delete this quest. + +## Related + +- [Gapped IETF object IDs](/quest/m1/ietf-object-gaps.md) - a headless d14-17 subgroup is a quiet drop; only a gap after a delivered object is refused loudly diff --git a/quest/m1/js-session-parity.md b/quest/m1/js-session-parity.md index acf119d29e2..3fc19b855fa 100644 --- a/quest/m1/js-session-parity.md +++ b/quest/m1/js-session-parity.md @@ -2,20 +2,31 @@ ## Goal -Three behaviors that landed in Rust on 2026-10-07 hold in `@moq/net` too, so a -JS peer or relay behaves like a Rust one. +Three Rust moq-net session behaviors hold in `@moq/net` too, so a JS peer or +relay behaves like a Rust one. ## Plan -- Per-session caps (#4820): JS has no live announce or subscription caps. - Add them with the same defaults (100,000 and 10,000) and close the session - with TOO_MANY_REQUESTS (0x7) past them, as Rust does. +- Per-session caps (#4820, still open): once Rust ships live announce and + subscription caps, add them to JS with the same defaults (100,000 and + 10,000 in #4820 today) and close the session with TOO_MANY_REQUESTS (0x7) + past them, as Rust does. JS's own request-ID window is + [JS request window](/quest/m1/js-request-window.md). - Pending tail (#4225): Rust readers of a received track wait for missing groups below a declared end until the tail settles; JS readers still end at the end with groups missing (`doc/lib/js/net.md`). Mirror the hold. -- Resolved epoch (#4904, #4967): Rust `broadcast::Consumer::epoch()` and - `broadcast::Info::epoch` carry the epoch of the route a request resolved - through; JS has `Consumer.epoch` from #4904, so check `Info` parity and the - bindings (moq-ffi) surface the same value. +- Resolved epoch (#4904, still open, and #4967): once Rust + `broadcast::Consumer::epoch()` and `broadcast::Info::epoch` carry the epoch + of the route a request resolved through, check that JS and the bindings + (moq-ffi) surface the same value. Test each against the Rust behavior, with mocked time. + +## Required + +- [Request caps](/quest/m0/request-caps.md) - #4820's per-session caps land in Rust first + +## Related + +- [JS request window](/quest/m1/js-request-window.md) - JS grants request IDs as requests close, the other half of JS request limits +- [Stats epochs](/quest/m0/broadcast-epoch/stats-epoch.md) - #4904, which the resolved-epoch check follows diff --git a/quest/m1/perf/README.md b/quest/m1/perf/README.md index 6cf30578fe4..ae561d506f5 100644 --- a/quest/m1/perf/README.md +++ b/quest/m1/perf/README.md @@ -70,4 +70,3 @@ the rest. - [#3122](/quest/m1/perf/3122-moq-uring-2-5-of-relay-cpu-is-vdso-clock-reads-the-drive.md) - moq-uring: ~2.5% of relay CPU is vdso clock reads; the drive loop and its callers each re-read Instant::now() - [#3199](/quest/m1/perf/3199-moq-uring-remove-sq-indirection-and-per-enter-ring-fd.md) - moq-uring: remove SQ indirection and per-enter ring fd lookup - [Remove moq-uring copies](/quest/m1/perf/uring-copies.md) - egress, stream send and receive, and datagram receive stop copying where the QUIC core already allows it, after the fork -- [Front rescan](/quest/m1/perf/front-rescan.md) - a route swap handles every ready track query per pass, linear in the front's tracks diff --git a/quest/m1/perf/front-rescan.md b/quest/m1/perf/front-rescan.md deleted file mode 100644 index 90d0240e8b5..00000000000 --- a/quest/m1/perf/front-rescan.md +++ /dev/null @@ -1,17 +0,0 @@ -# [S] One front pass handles every ready track query - -## Goal - -A front's route swap costs time linear in its tracks. `origin/copy_walk` -(#4995) measured it growing roughly with the square of the track count: -186 µs at 32 tracks, 769 µs at 64, 2.16 ms at 128 (one copy each), on track -for about 10 ms at a few hundred. - -## Plan - -In `run_front`'s wait loop (`rs/moq-net/src/model/origin.rs`, around the -query handling), each pass handles one ready track query and then rescans -every track from the start. Handle every ready query in one pass. Measure -with `origin/copy_walk` before and after; the per-copy cost (about 2 µs for -32 extra copies) is out of scope until a profile says otherwise. - diff --git a/quest/m2/js-audio-ranked.md b/quest/m2/js-audio-ranked.md index d4c1f5467e8..9825da56d0f 100644 --- a/quest/m2/js-audio-ranked.md +++ b/quest/m2/js-audio-ranked.md @@ -10,3 +10,7 @@ that rank instead of by name. ## Plan Mirror `Catalog.ranked` for video (#4988). Name it to match Rust per AGENTS.md. + +## Required + +- [Audio rendition pick](/quest/m1/audio-ranked.md) - #4993 adds the Rust `Audio::ranked` this mirrors From bcb7e2fe41d6bcdfc8f9b8a215f2af2a0653d500 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 7 Oct 2026 20:11:33 -0700 Subject: [PATCH 3/4] quest: scope the datagram bound to Rust, gate CMAF follow-ups on #5037/#5015, and correct serve_front --- quest/m1/README.md | 2 +- quest/m1/cmaf-inline-followups.md | 12 +++++++++--- quest/m1/datagram-replay-bound.md | 22 ++++++++++++++-------- quest/m1/front-deadline-index.md | 8 ++++---- quest/m1/ietf-legacy-updates.md | 4 ++-- quest/m1/js-session-parity.md | 7 ++++--- 6 files changed, 34 insertions(+), 21 deletions(-) diff --git a/quest/m1/README.md b/quest/m1/README.md index 8ea3402d0ba..66ccf24bf44 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -185,4 +185,4 @@ blocks. The quests that gated m0 lines moved under them. - [JS session parity](/quest/m1/js-session-parity.md) - @moq/net gets moq-net's per-session caps, pending-tail hold, and resolved epochs - [Headless subgroup in Rust](/quest/m1/ietf-headless-subgroup.md) - a draft 14-17 subgroup starting mid-group is dropped, not fatal, as in JS - [In-band CMAF follow-ups](/quest/m1/cmaf-inline-followups.md) - MSF, h264/h265 export, and gst caps handle avc3/hev1 CMAF -- [Datagram replay bound](/quest/m1/datagram-replay-bound.md) - a new datagram subscriber starts within its max delay of the newest datagram, not at a minutes-old buffer +- [Datagram replay bound](/quest/m1/datagram-replay-bound.md) - a new Rust datagram subscriber starts within its max delay of the newest datagram, not at a minutes-old buffer diff --git a/quest/m1/cmaf-inline-followups.md b/quest/m1/cmaf-inline-followups.md index 770bad66796..f23f7a68544 100644 --- a/quest/m1/cmaf-inline-followups.md +++ b/quest/m1/cmaf-inline-followups.md @@ -3,15 +3,16 @@ ## Goal Every path that reads an `avc3`/`hev1` CMAF track (parameter sets in the -samples) handles it, now that `moq export fmp4` writes them (#5015) and -import and decode read them (#5037). +samples) handles it, once `moq export fmp4` writes them (#5015) and import +and decode read them (#5037). ## Plan From #5037: - MSF: CMAF video from an MSF catalog arrives with no `description` - (`rs/moq-mux/src/catalog/msf/consumer.rs`), so moq-video now refuses it. + (`rs/moq-mux/src/catalog/msf/consumer.rs`), so moq-video refuses it after + #5037. Fill `description` from the init segment's sample entry. - `moq export h264`/`h265` refuse an imported avc3 track with `MissingParamSets` because its avcC has no SPS/PPS. Accept empty sets for @@ -19,3 +20,8 @@ From #5037: - Check moq-gst's `video_caps`: in-band H.265 with no description is labeled `stream-format=hev1` (length-prefixed), while a Legacy hev1 track is Annex-B (`byte-stream`). Fix the label if it is wrong. + +## Required + +- [CMAF in-band parameter sets](/quest/m1/cmaf-inline-params.md) - #5037 imports and decodes `avc3`/`hev1` CMAF +- [fMP4 init from the catalog](/quest/m1/fmp4-catalog-init.md) - #5015 writes `avc3`/`hev1` entries from the catalog diff --git a/quest/m1/datagram-replay-bound.md b/quest/m1/datagram-replay-bound.md index e46ecb5e110..f8980f3efb7 100644 --- a/quest/m1/datagram-replay-bound.md +++ b/quest/m1/datagram-replay-bound.md @@ -2,13 +2,17 @@ ## Goal -A new datagram subscriber starts at the first buffered datagram within the -subscription's `max_delay` of the newest datagram's timestamp, in Rust -moq-net and `@moq/net`. Since #4982 it may otherwise get the whole -64-datagram send buffer (`MAX_DATAGRAMS` in `rs/moq-net/src/model/track.rs` -and `js/net/src/track.ts`), which on a sparse track can be minutes old. +A new Rust moq-net datagram subscriber starts at the first buffered datagram +within the subscription's `max_delay` of the highest buffered timestamp +(converted from the track timescale). Since #4982 it may otherwise get the +whole 64-datagram send buffer (`MAX_DATAGRAMS` in +`rs/moq-net/src/model/track.rs`), which on a sparse track can be minutes old. Untimed tracks keep today's behavior. +`@moq/net` already replays nothing to a late subscriber: its 64-entry ring is +per subscriber and fills only after the sink attaches (`js/net/src/track.ts`), +which is within the bound. Keep that, and pin it with a test. + ## Plan Decided by the maintainer (2026-10-08): "fine to serve old datagrams from @@ -16,8 +20,10 @@ the last ~50ms", so the bound is the subscription's own `max_delay` measured against the newest datagram's timestamp, not wall time. Only where a new datagram cursor starts changes; delivery after that is unchanged. -Test with mocked time in both languages: a sparse timed track with old and -recent datagrams buffered gives a new subscriber only those within its -`max_delay` of the newest, and an untimed track still gives the whole buffer. +Test with mocked time in Rust: a sparse timed track with old and recent +datagrams buffered, including one inserted out of order, gives a new +subscriber only those within its `max_delay` of the highest timestamp, and an +untimed track still gives the whole buffer. In JS, a late subscriber gets no +datagram written before it attached, timed or untimed. Public API: none. Wire: none. diff --git a/quest/m1/front-deadline-index.md b/quest/m1/front-deadline-index.md index d24b61383ba..548d7acfa65 100644 --- a/quest/m1/front-deadline-index.md +++ b/quest/m1/front-deadline-index.md @@ -4,7 +4,7 @@ A relay front's per-event cost no longer grows with the number of tracks it holds. Today `front.rs` `next_deadline` scans every track to find the next -linger expiry, and `run_front`'s per-wake poll in `origin.rs` scans every +linger expiry, and `serve_front`'s per-wake poll in `origin.rs` scans every track too, so each event on one track costs O(tracks) and a broadcast that churns track names pays O(tracks²). After this, finding the next expiry and reacting to one track's event touch only that track. @@ -19,9 +19,9 @@ reacting to one track's event touch only that track. `Parked`/unparked transition, so `next_deadline` is its first entry and the deadline sweep pops only what expired. - Replace the driver's scan-every-track poll with per-track wakes, so an - event on one track polls that track. This also removes `run_front`'s - quadratic rescan, where each pass handles one ready track query and then - rescans every track: a route swap measured 186 µs at 32 tracks, 769 µs at + event on one track polls that track. This also removes the quadratic + rescan in `serve_front`'s `kio::wait`, where each pass handles one ready + track query and then rescans every track: a route swap measured 186 µs at 32 tracks, 769 µs at 64, and 2.16 ms at 128 (#4995's `origin/copy_walk`), which is this fix's regression bench. - Keep the front's exhaustive walk test passing, and add a unit test that the diff --git a/quest/m1/ietf-legacy-updates.md b/quest/m1/ietf-legacy-updates.md index 4c3a36cc4d5..2529e0a5857 100644 --- a/quest/m1/ietf-legacy-updates.md +++ b/quest/m1/ietf-legacy-updates.md @@ -18,8 +18,8 @@ subscription with INTERNAL_ERROR. Remaining (maintainer, 2026-10-07, from reads the subscribe stream again, so an unread update keeps the stream from reporting closed and a later UNSUBSCRIBE is lost. Read framed messages and apply updates as Rust now does. Rebase #5011 onto that or fold it in. -- Draft 16: an update aimed at a namespace or fetch request is skipped with - no REQUEST_OK or REQUEST_ERROR; answer it. +- Drafts 15 and 16: an update aimed at a namespace or fetch request is + skipped with no REQUEST_OK or REQUEST_ERROR; answer it. - Draft 14: every field is mandatory, so a narrowed start or end group looks like a repeat and is ignored; decide whether to apply it. diff --git a/quest/m1/js-session-parity.md b/quest/m1/js-session-parity.md index 3fc19b855fa..6685eb0ea29 100644 --- a/quest/m1/js-session-parity.md +++ b/quest/m1/js-session-parity.md @@ -12,9 +12,10 @@ relay behaves like a Rust one. 10,000 in #4820 today) and close the session with TOO_MANY_REQUESTS (0x7) past them, as Rust does. JS's own request-ID window is [JS request window](/quest/m1/js-request-window.md). -- Pending tail (#4225): Rust readers of a received track wait for missing - groups below a declared end until the tail settles; JS readers still end at - the end with groups missing (`doc/lib/js/net.md`). Mirror the hold. +- Pending tail (#4225, still open): once Rust readers of a received track + wait for missing groups below a declared end until the tail settles, mirror + the hold. JS readers still end at the end with groups missing + (`doc/lib/js/net.md`). - Resolved epoch (#4904, still open, and #4967): once Rust `broadcast::Consumer::epoch()` and `broadcast::Info::epoch` carry the epoch of the route a request resolved through, check that JS and the bindings From 59b65f557cdc89b74ee9b830852fe0ceea2c7a81 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 7 Oct 2026 20:12:13 -0700 Subject: [PATCH 4/4] quest(cmaf-inline-followups): #5037 landed; only #5015 remains --- quest/m1/cmaf-inline-followups.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/quest/m1/cmaf-inline-followups.md b/quest/m1/cmaf-inline-followups.md index f23f7a68544..e9990c36bd7 100644 --- a/quest/m1/cmaf-inline-followups.md +++ b/quest/m1/cmaf-inline-followups.md @@ -3,16 +3,16 @@ ## Goal Every path that reads an `avc3`/`hev1` CMAF track (parameter sets in the -samples) handles it, once `moq export fmp4` writes them (#5015) and import -and decode read them (#5037). +samples) handles it, once `moq export fmp4` writes them (#5015). Import and +decode already read them (#5037). ## Plan From #5037: - MSF: CMAF video from an MSF catalog arrives with no `description` - (`rs/moq-mux/src/catalog/msf/consumer.rs`), so moq-video refuses it after - #5037. + (`rs/moq-mux/src/catalog/msf/consumer.rs`), so moq-video now refuses it + (since #5037). Fill `description` from the init segment's sample entry. - `moq export h264`/`h265` refuse an imported avc3 track with `MissingParamSets` because its avcC has no SPS/PPS. Accept empty sets for @@ -23,5 +23,4 @@ From #5037: ## Required -- [CMAF in-band parameter sets](/quest/m1/cmaf-inline-params.md) - #5037 imports and decodes `avc3`/`hev1` CMAF - [fMP4 init from the catalog](/quest/m1/fmp4-catalog-init.md) - #5015 writes `avc3`/`hev1` entries from the catalog