diff --git a/quest/m1/README.md b/quest/m1/README.md index b672249f927..15a74efd2e7 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -182,3 +182,8 @@ 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 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 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 new file mode 100644 index 00000000000..e9990c36bd7 --- /dev/null +++ b/quest/m1/cmaf-inline-followups.md @@ -0,0 +1,26 @@ +# [S] Finish in-band CMAF parameter sets + +## Goal + +Every path that reads an `avc3`/`hev1` CMAF track (parameter sets in the +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 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 + 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. + +## Required + +- [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 new file mode 100644 index 00000000000..f8980f3efb7 --- /dev/null +++ b/quest/m1/datagram-replay-bound.md @@ -0,0 +1,29 @@ +# [XS] A new subscriber's datagrams start within its max delay + +## Goal + +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 +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 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/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/front-deadline-index.md b/quest/m1/front-deadline-index.md index 50388b5a361..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,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 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 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 new file mode 100644 index 00000000000..591a561b2c7 --- /dev/null +++ b/quest/m1/ietf-headless-subgroup.md @@ -0,0 +1,21 @@ +# [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. + +## 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/ietf-legacy-updates.md b/quest/m1/ietf-legacy-updates.md new file mode 100644 index 00000000000..2529e0a5857 --- /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. +- 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. + +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..6685eb0ea29 --- /dev/null +++ b/quest/m1/js-session-parity.md @@ -0,0 +1,33 @@ +# [M] @moq/net session parity with moq-net + +## Goal + +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, 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, 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 + (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/m2/README.md b/quest/m2/README.md index 093d8196a6a..a89e49c192b 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -119,3 +119,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..9825da56d0f --- /dev/null +++ b/quest/m2/js-audio-ranked.md @@ -0,0 +1,16 @@ +# [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. + +## Required + +- [Audio rendition pick](/quest/m1/audio-ranked.md) - #4993 adds the Rust `Audio::ranked` this mirrors 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.