diff --git a/quest/m0/broadcast-epoch/README.md b/quest/m0/broadcast-epoch/README.md index 3e5c5e72293..db156144115 100644 --- a/quest/m0/broadcast-epoch/README.md +++ b/quest/m0/broadcast-epoch/README.md @@ -91,3 +91,4 @@ newest epoch falls back to a still-live older one. - [Bindings](/quest/m0/broadcast-epoch/bindings.md) - moq-ffi and every wrapper expose the epoch and let a publisher announce one - [Stats epochs](/quest/m0/broadcast-epoch/stats-epoch.md) - moq-stats publishes each group announcement under its own epoch, so neither a restarted node nor a returning idle group stalls its viewers - [Stats totals and prefix tracks](/quest/m0/broadcast-epoch/stats-split.md) - the same release retires the per-path stats maps for totals and on-demand prefix tracks (decided 2026-10-05) +- [Dynamic epoch update](/quest/m0/broadcast-epoch/dynamic-epoch.md) - an epoch change through `Dynamic::update` announces a `Restart` downstream, so subscribers drop the old copy and resubscribe, while the origin keeps serving diff --git a/quest/m0/broadcast-epoch/dynamic-epoch.md b/quest/m0/broadcast-epoch/dynamic-epoch.md new file mode 100644 index 00000000000..f8c79c6372f --- /dev/null +++ b/quest/m0/broadcast-epoch/dynamic-epoch.md @@ -0,0 +1,53 @@ +# [S] An epoch update re-keys a dynamic claim + +## Goal + +`Dynamic::update` (Rust) and `Dynamic.update` (JS) may change the route's +epoch, or add or clear it. The change is a source change downstream, under +the same rule as any other: announce consumers see a `Restart`, every +downstream subscriber (relays included) drops its copy of the old epoch and +resubscribes. Only an identical epoch splices, so no old-epoch group reaches +a new-epoch subscriber. The update invalidates this claim's old-epoch copies; +it does not override route selection. A re-request still resolves the +winning route, which ranks the newest epoch first and none last, so after A +to none, or A to an older B, another route still advertising A keeps +winning. The origin's own served broadcasts and pending requests carry over, +since two epochs may carry the same content; a handler that wants fresh +content under the new epoch closes its old broadcast itself. + +Non-goals: the epoch a claim-served answer carries +([#5010](https://github.com/moq-dev/moq/pull/5010)'s claim-epochs plan), and +same-epoch repricing, which keeps every handle and stays an `Update`. + +## Plan + +Found by the final-head audit of +[#4942](https://github.com/moq-dev/moq/pull/4942): an A to B update keeps +serving A's cached broadcast from the origin (`rs/moq-net/src/model/origin.rs` +`Dynamic::update` through `AnnounceProducer::update`), while its doc promises +the served broadcasts end. The JS `Dynamic.update` doc (`js/net/src/origin.ts`) +only says another epoch names another publisher instance. + +Decided 2026-10-07: carrying the served and pending state over is correct, +because an epoch is a cache identity, not a content guarantee. Rejected: +refusing an epoch change in `update` (forces drop and re-claim for no +benefit), and ending served broadcasts on an epoch change (more model code, +and the handler can already do it). + +Aligned 2026-10-08 with [Restart](/quest/m0/broadcast-epoch/restart.md), which +replaced the hard switch: downstream subscriptions are not ended by the +model; the `Restart` tells them to drop the old copy and resubscribe. + +- Rewrite both docs to the contract above. +- Regress in Rust and JS: an update A to B, A to none, and none to B delivers + `Restart` to an announce consumer and through a relay, the relay retires its + old-epoch copy for new requests, and a re-request is served under the new + epoch without any cached group from the old one. With a second route still + at A, A to none leaves re-requests on that route, by normal route + selection. If downstream already does this, the quest is the + docs and tests; otherwise fix the gap at its source. +- Keep the same-epoch repricing case in the same test, proving handles survive. + +## Required + +- [Restart](/quest/m0/broadcast-epoch/restart.md) - the `Restart` event and the no-splice rule this update reuses diff --git a/quest/m0/ietf-location-filter-22.md b/quest/m0/ietf-location-filter-22.md index 041d41e639c..b73345a4695 100644 --- a/quest/m0/ietf-location-filter-22.md +++ b/quest/m0/ietf-location-filter-22.md @@ -28,6 +28,10 @@ Decided 2026-10-06: Where: +- Rust: `rs/moq-net/src/ietf/version.rs`'s + `draft21_and_draft22_match_draft20_on_the_wire` pins draft-22 to draft-20's + bytes and calls draft-22 editorial; narrow it to draft-21 (or exclude + LOCATION_FILTER) and fix the comment. - Rust: `rs/moq-net/src/ietf/filter.rs`, `Param for Filter` and the FILL_PARAMETERS scope in `Param for Fill`. Every 0x21 use goes through `Param for Filter`. diff --git a/quest/m1/archive/flush.md b/quest/m1/archive/flush.md index 7c795d91f48..1ae9a232690 100644 --- a/quest/m1/archive/flush.md +++ b/quest/m1/archive/flush.md @@ -27,9 +27,10 @@ Decided: `tokio::time` (moq-net's runtime `Timer` went away in #4437). - Manual flush is per track: `Control::flush(name)` on the writer, beside the broadcast-wide `cut`, and `Recorder::flush()` on a timeline. -- JS mirrors it: `@moq/hang`'s `Timeline.Recorder` gets the same idle - deadline and a `flush()`, so Rust and JS timelines stay one API. Without it, - an idle browser track keeps today's unbounded behavior (Codex on #4301). +- Rust only (decided 2026-10-07): JS publishes no timeline yet, so its idle + deadline and `flush()` belong to + [JS per-track timelines](/quest/m1/archive/js-timelines.md), and this quest + does not wait on the port. - The bound covers closing a record, not upload latency: a slow object-store PUT still delays the durable commit, which the writer already serializes. - Tests inject `now` into the segmenter and run the writer on paused tokio @@ -37,6 +38,6 @@ Decided: track after a finished group, a manual flush mid-group, and a publisher whose timestamps run ahead of or behind the wall clock. -## Required +## Related -- [JS per-track timelines](/quest/m1/archive/js-timelines.md) - the JS `Timeline.Recorder` this extends; the Rust per-track segmenter and writer are already on `main` (#4034) +- [JS per-track timelines](/quest/m1/archive/js-timelines.md) - carries the JS idle deadline and `flush()` diff --git a/quest/m1/archive/js-timelines.md b/quest/m1/archive/js-timelines.md index 9e9bbbc7f55..001ef443cf6 100644 --- a/quest/m1/archive/js-timelines.md +++ b/quest/m1/archive/js-timelines.md @@ -18,6 +18,11 @@ legacy container report its groups again. Cover the same cut rules and a static catalog outliving other tracks' records, and check the records against Rust output in the interop suite. +The JS `Timeline.Recorder` also gets the idle deadline and `flush()` that +[Idle tracks](/quest/m1/archive/flush.md) decides for Rust, so an idle browser +track's record closes within the same bound (Codex on #4301; moved here +2026-10-07 so the Rust flush does not wait on this port). + ## Required - [Timelines declare their segment duration](/quest/m1/archive/declared-duration.md) - the final `timelines` entry shape to port, so JS ports it once diff --git a/quest/m1/auth/README.md b/quest/m1/auth/README.md index d81105229d8..590759740de 100644 --- a/quest/m1/auth/README.md +++ b/quest/m1/auth/README.md @@ -16,7 +16,7 @@ This questline adds an AUTH exchange to both wires: one stream per token, a grant per token, the union of every accepted token as the session's scope, and a loud failure when a publish can never be honored. It ends with the credential able to travel in band, while the URL keeps working for every peer -that predates the stream. Hop-bound peer grants for direct sessions belong to +that predates the stream. Node-bound peer grants for direct sessions belong to [P2P](/quest/m3/p2p/peer-grant.md), their only consumer. ## Plan @@ -117,5 +117,5 @@ published version in place, so AUTH and its stream code land in ## Related -- [Peer grants](/quest/m3/p2p/peer-grant.md) - P2P's hop-bound credential, +- [Peer grants](/quest/m3/p2p/peer-grant.md) - P2P's node-bound credential, built on this line's relay tokens diff --git a/quest/m1/auth/malformed-grant.md b/quest/m1/auth/malformed-grant.md index 6f9bfa3910f..92ec72ddcc6 100644 --- a/quest/m1/auth/malformed-grant.md +++ b/quest/m1/auth/malformed-grant.md @@ -51,10 +51,11 @@ out-of-range `Expires`, and assert that the session closes with PROTOCOL_VIOLATION. If a shared vector is easy, add them to the interop suite as well, since both sides must agree. -The auth line branch also plans AUTH violations -(`quest/m1/auth/violations.md`), a wider sweep of every AUTH read path that -lists this lite decode gap. Whichever lands second drops the overlap. +This quest owns the lite AUTH_OK decode gap; the wider +[AUTH violations](/quest/m1/auth/violations.md) sweep covers every other AUTH +read path (decided 2026-10-07, folding the overlap #4868 planned). ## Related +- [AUTH violations](/quest/m1/auth/violations.md) - the sweep of every other AUTH read path - [In-band auth](/quest/m1/auth/README.md) - the line this blocks diff --git a/quest/m1/auth/violations.md b/quest/m1/auth/violations.md index 481af71115b..28ab20f7695 100644 --- a/quest/m1/auth/violations.md +++ b/quest/m1/auth/violations.md @@ -5,8 +5,9 @@ Every AUTH stream message that the lite or IETF drafts call a PROTOCOL_VIOLATION closes the session in Rust and `@moq/net` alike, instead of ending only its token. Examples: an AUTH_ERROR code past `u32`, an -out-of-range AUTH_OK expiry, or an AUTH, AUTH_OK, or AUTH_ERROR that fails to -decode, such as a bad pattern or length. +out-of-range IETF AUTH_OK expiry, or an AUTH or AUTH_ERROR that fails to +decode. The lite AUTH_OK pattern and `Expires` decode gap belongs to +[Malformed grant](/quest/m1/auth/malformed-grant.md). ## Plan @@ -16,9 +17,8 @@ on an explicit `ProtocolViolation` in Rust lite. These gaps remain: - JS reports the exact oversized code but doesn't close the session. Let the JS connection close on an `AuthSession` protocol violation. - An out-of-range IETF AUTH_OK expiry still ends only its token. -- An AUTH_OK or AUTH_ERROR that fails to decode ends only the token, like - every other lite stream, although the draft calls a bad pattern a - PROTOCOL_VIOLATION. +- An AUTH_ERROR that fails to decode ends only the token, like every other + lite stream. - On the acceptor side, a presenter's AUTH that fails to decode only aborts its stream (Rust lite `AuthServe`, JS `#runBidis`), so a peer can repeat malformed AUTH streams without closing the session. diff --git a/quest/m1/capture-default.md b/quest/m1/capture-default.md index 123e7271e8f..a651dc5c3b5 100644 --- a/quest/m1/capture-default.md +++ b/quest/m1/capture-default.md @@ -11,7 +11,10 @@ relay, the language bindings) keep building without it. ## Plan Decided in planning (09-29), after capture-control (#4545) found that -pre-merge `just check` never runs moq-video's `capture` tests: +pre-merge `just check` never ran moq-video's `capture` tests. `sh/rs/select.sh` +now runs `just rs capture-test` when moq-video or moq-audio changes, so this +is gate cleanup, not a coverage fix (reframed 2026-10-07): one default build +replaces the special branch. - **Default-on, keep the flag.** Removing the flag was rejected: consumers that don't want device stacks would pay for them. diff --git a/quest/m1/ffi-shape/README.md b/quest/m1/ffi-shape/README.md index a128aed7caa..55c032df411 100644 --- a/quest/m1/ffi-shape/README.md +++ b/quest/m1/ffi-shape/README.md @@ -58,6 +58,10 @@ work no child does: each language's module, linked from every binding page. - The bindings section of the following release's upgrade page: old call to new call per language. +- `MoqGroupRequest` gains `demand()` in moq-ffi and every wrapper, matching + Rust's `group::Request::demand`, so a group server can see when nobody + still wants the group (decided in #4868; the bullet was lost when #4946 + removed `net.md`). - `just test interop --all` green on the finished line. ## Required diff --git a/quest/m1/ffi-shape/codec.md b/quest/m1/ffi-shape/codec.md index 513ce7c78ed..023c4087bfc 100644 --- a/quest/m1/ffi-shape/codec.md +++ b/quest/m1/ffi-shape/codec.md @@ -27,7 +27,7 @@ variant additively instead of breaking `gop` a second time. Go gets no uniffi default, so its zero value must read as keyframe mode. The audio and video frame and decoder-output records carry microsecond fields -(`timestamp_us`, `max_age_us`, `frame_duration_us`); in Python and Go they +(`timestamp_us`, `max_delay_us`, `frame_duration_us`); in Python and Go they should become owned `timedelta` / `time.Duration` records like net's. Public API: breaking in every binding. Wire: none. diff --git a/quest/m1/js-startup-hole.md b/quest/m1/js-startup-hole.md index 159cfb94e0f..309bab92185 100644 --- a/quest/m1/js-startup-hole.md +++ b/quest/m1/js-startup-hole.md @@ -6,14 +6,14 @@ frames as soon as it arrives, whatever died before it. Today, if the first group dies before a frame is read and the next arriving group is not adjacent (16 reset, then 18), `next()` delivers nothing until a later group lets -`#checkMaxAge` skip, which can cost a whole group (2.5 s of video) before the +`#checkMaxDelay` skip, which can cost a whole group (2.5 s of video) before the first picture after a reattach. ## Plan Root cause (verified 2026-10-06): a hole only exists relative to presented content, but `next()`'s promotion guard in -`js/hang/src/container/consumer.ts` needs `maxAge === 0` or a defined +`js/hang/src/container/consumer.ts` needs `maxDelay === 0` or a defined `#presentedEnd` to promote a head that is not contiguous with `#active`. Two paths reach it with nothing presented: @@ -31,7 +31,7 @@ discontinuity, matching the "start with the first group" policy. Open for the implementer: which field means "nothing presented". `#presentedEnd` can stay undefined after frames were delivered when -`#checkMaxAge` drops the delivered group without `#recordPresented`; +`#checkMaxDelay` drops the delivered group without `#recordPresented`; `#deliveredGroup === undefined` may be the sounder predicate. Tests: both paths above, as bun tests with mocked or flushed time, deliver diff --git a/quest/m1/libmoq-final-release.md b/quest/m1/libmoq-final-release.md index e9118158428..fb89d3a5c38 100644 --- a/quest/m1/libmoq-final-release.md +++ b/quest/m1/libmoq-final-release.md @@ -6,7 +6,7 @@ The newest `libmoq` on crates.io is the code-free stub that `main`'s `rs/libmoq` holds, whose README points at `moq-c`. Since #4738 publishing runs only from `release`, so the condition clears at the next `main`-to-`release` cut, which must take `main`'s stub for `rs/libmoq` at a version above -0.6.12. `main`'s stub is at 0.6.11, which crates.io already holds as a full +0.6.12. `main`'s stub is at 0.6.12, which crates.io already holds as a full crate, so the cut bumps it or the stub never publishes. This quest tracks a condition outside the repository. When it holds, delete diff --git a/quest/m1/perf/demand-aggregate.md b/quest/m1/perf/demand-aggregate.md index 58e7b4c57ea..7f0b2c7f2e6 100644 --- a/quest/m1/perf/demand-aggregate.md +++ b/quest/m1/perf/demand-aggregate.md @@ -15,7 +15,7 @@ readers, so `js/net/src/track.ts` keeps its fold. ## Plan - Shared state, no message passing (decided 2026-10-06). `Subscriptions` - becomes per-field counted ordered maps for `priority`, `max_age`, `start`, + becomes per-field counted ordered maps for `priority`, `max_delay`, `start`, and `end`, with a count for the `None` arm (no floor, unbounded) that absorbs `start` and `end`. Subscribe, update, and drop mutate it directly under the lock: remove the subscriber's old contribution, add the new one. Each diff --git a/quest/m1/plan-watch-worker.md b/quest/m1/plan-watch-worker.md index cdfef618171..fac83c9f9c6 100644 --- a/quest/m1/plan-watch-worker.md +++ b/quest/m1/plan-watch-worker.md @@ -64,8 +64,8 @@ browser harness pieces instead of starting another. The rewritten implementation quest names the chosen model, the public handle shape of `Player` and ``, what happens to the composable classes, -the worker bundling (the publish capture worker's `?worker&inline` is the -precedent; like it, the worker loads through `?worklet`, a lazy blob plus a +the worker bundling (the publish capture worker's `?worklet` import in +`js/publish/src/video/processor.ts` is the precedent: a lazy blob plus a hostable file under the package's `assets()` base), and the follow-up quest for moving publish onto the same worker if the handle model wins. That follow-up wires the capture worklet to the encoder worker with a diff --git a/quest/m1/quest-flat-lines.md b/quest/m1/quest-flat-lines.md index c7d4c3a71d7..e6387c96505 100644 --- a/quest/m1/quest-flat-lines.md +++ b/quest/m1/quest-flat-lines.md @@ -67,19 +67,10 @@ Remaining: - #4519 ffi-shape waits on [Bindings](/quest/m0/broadcast-epoch/bindings.md). - #4133 qos waits on [Lag across a splice](/quest/m1/qos/lag-splice.md). - When it merges `main`, the merge drops `lag-splice.md`'s Related link to - the line's finished `final-lag-sample.md`. - Child PRs still based on a line merge into it first, or GitHub closes them with the branch: #4675 (auth/request-token) needs the updated auth line merged in. #4645 (tstd/delay) now targets `main`; #4732 and #4863 landed. -- Retiring the auth branch reconciles `quest/m1/auth/` with `main`'s copy - (decided 2026-10-05). Drop the children the branch finished or moved (lite, - interop, unauthorized, auth-ok-preflight, error-codes, narrowing, peer-grant, - moq-transport), keep the branch's new ones (wip-version, not-supported, - violations, js-fetch-watch), and fold violations' lite decode gap into - [malformed grant](/quest/m1/auth/malformed-grant.md). The branch's - wip-version quest moves its lite-06 wire text to `moq-lite-07-wip`. Done when `flake.nix` pins the new quest, no `quest/*README` branch remains, and `quest check` passes. diff --git a/quest/m1/quic/fork/README.md b/quest/m1/quic/fork/README.md index c2faa6a021a..182af652f5b 100644 --- a/quest/m1/quic/fork/README.md +++ b/quest/m1/quic/fork/README.md @@ -61,6 +61,7 @@ is either ported by a child quest or recorded as not applicable in the ## Required - [Switch](/quest/m1/quic/fork/switch.md) - quinn's async layer and `web-transport-moq` join moq-tokio, both runtimes run on `moq-quic`, `moq-noq*` is gone, and relay memory matches `moq-noq` +- [Input validation](/quest/m1/quic/fork/input-validation.md) - a never-issued CID retirement and a repeated transport parameter close the connection ## Related diff --git a/quest/m1/quic/fork/input-validation.md b/quest/m1/quic/fork/input-validation.md new file mode 100644 index 00000000000..76de17831cc --- /dev/null +++ b/quest/m1/quic/fork/input-validation.md @@ -0,0 +1,28 @@ +# [XS] Refuse malformed QUIC control input + +## Goal + +`moq-quic` closes the connection on two inputs its quinn import accepts: + +- RETIRE_CONNECTION_ID for the first sequence never issued + (`sequence == issued` in `rs/moq-quic/src/connection/cid_state.rs` + `on_cid_retirement`, since `issued` is a count). RFC 9000 section 19.16 + requires PROTOCOL_VIOLATION. +- A repeated `grease_quic_bit` or `min_ack_delay` transport parameter + (`rs/moq-quic/src/transport_parameters.rs`), which every other known + parameter already refuses as malformed. RFC 9000 section 7.4 only says + SHOULD, but this repo refuses malformed input. + +Valid peers see no change. + +## Plan + +Found by the final-head audit of +[#4879](https://github.com/moq-dev/moq/pull/4879), whose body noted both; +upstream quinn has the same code. Decided 2026-10-07: one quest for both, +under the fork line but not blocking [the switch](/quest/m1/quic/fork/switch.md), +since the fixes are local to the parser and CID state. + +Inline regressions: retiring a valid and an already-retired sequence, the +first never-issued sequence before and after issuing new CIDs, and single +versus duplicate parameters. Offering the fix upstream is optional. diff --git a/quest/m1/route-wakes.md b/quest/m1/route-wakes.md index b573b29c11d..cab6b19085f 100644 --- a/quest/m1/route-wakes.md +++ b/quest/m1/route-wakes.md @@ -63,7 +63,7 @@ Verification: `origin/pool_churn` leaves flat in served paths at every pool width it already sweeps, and a unit test that counts `select` calls per route change: zero for an unrelated route's leave, only the won paths on a join, and a parked waiter retrying when a deeper advertise-only claim over a -served root is withdrawn. Keep `pool_resolve` unchanged. +served root is withdrawn. Public API: none. Wire: none. diff --git a/quest/m1/track-priority-scope.md b/quest/m1/track-priority-scope.md index 5f67831fa0a..a6820a319d4 100644 --- a/quest/m1/track-priority-scope.md +++ b/quest/m1/track-priority-scope.md @@ -22,8 +22,8 @@ Where the model stands today, all in `rs/moq-net`: packs track priority and the group's position within its own subscription into one send order (`js/net/src/lite/priority.ts`), so two tracks at equal priority interleave rather than one draining first. -- Group order within a track follows the subscription's `order` (newest first - by default; see [Subscribe ranges](/quest/m1/subscribe-ranges/README.md)). +- Group order within a track is fixed newest first today; a subscription-chosen + order arrives with [Subscribe ranges](/quest/m1/subscribe-ranges/README.md). - A relay forwards the max of its downstream subscriber priorities upstream (`model/subscription.rs`, `lite/subscriber.rs`), never the publisher's track priority, so one viewer asking for 255 raises that track above every other diff --git a/quest/m1/ts-passthrough.md b/quest/m1/ts-passthrough.md index 6a3aa3b5605..ea9def1ac48 100644 --- a/quest/m1/ts-passthrough.md +++ b/quest/m1/ts-passthrough.md @@ -42,6 +42,14 @@ Decided (2026-10-01), from a discussion with t0ms: inside a group. A source that never sets the random-access indicator falls back to a group every N PCRs (N to be fixed in the PR, with a group spanning at most 1 s of PCR time). Pacing stays on the PCR PID throughout. +- A flagged PCR discontinuity that rewinds is a restart, as + [TS restart](/quest/m0/broadcast-epoch/ts-restart.md) decides for the + demultiplexed lane: the passthrough broadcast finishes cleanly and the rest + of the input continues as a new broadcast at the same path under a fresh + epoch, so object timestamps never go backwards within one broadcast. A + flagged forward jump starts a group, and an unflagged rewind is fatal + (decided 2026-10-07 in the final-head audit of #4670, which had a backward + flag start a group in place). - `randomAccess` is true only while the PAT lists a single program with at most one video PID, and every group has started at a `random_access_indicator`. The first group that starts without one (a @@ -96,9 +104,10 @@ fixture with the PCR on its audio PID starts groups at video random access points only. PCR discovery finds a PCR PID that differs from the PMT PID, with the PMT section split across packets. Two exporters fed the same objects with different arrival skew emit identical bytes; when only one misses a deadline, -its output is the other's less that object's packets. A dropped object is -counted, and the rest still go out on time. Rerun the #4613 netem rig (10% -loss, 120 s) against it. +its output is the other's less that object's packets. A flagged backward PCR +discontinuity publishes two broadcasts, and the same rewind unflagged errors. +A dropped object is counted, and the rest still go out on time. Rerun the +#4613 netem rig (10% loss, 120 s) against it. Update `doc/bin/cli.md` for both flags, `doc/concept` for the section, and the draft's comparison section to say this repository now publishes both @@ -109,6 +118,7 @@ hang catalog gains an `m2ts` root section; additive. ## Required +- [TS restart](/quest/m0/broadcast-epoch/ts-restart.md) - the restart-under-a-new-epoch path a backward PCR discontinuity reuses - [Fixed-delay release](/quest/m1/tstd/delay.md) - the release stage this reuses, with its clock recovery (#4645) ## Related diff --git a/quest/m2/README.md b/quest/m2/README.md index 093d8196a6a..947bcefd3b6 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -67,6 +67,7 @@ waiting on an upstream release waits in [m4](/quest/m4/README.md). - [Catalog colour model](/quest/m2/color-catalog.md) - the catalog describes a rendition's colour and HDR properties once a renderer consumes them - [Archive S3 wire proof](/quest/m2/archive-s3.md) - the archive proof also runs through the S3 client against an in-process S3-compatible server - [Archive recovery listing](/quest/m2/archive-recovery-listing.md) - a resumed DVR lists what changed since its checkpoint, not every stored group +- [DASH rendition URLs](/quest/m2/dash-rendition-uri.md) - DASH init and segment URLs percent-encode the rendition name, so a name with a slash resolves to its own rendition - [Relay io_uring packages](/quest/m2/relay-io-uring-package.md) - Linux relay packages ship io_uring once the ring is on par with tokio - [iOS capture](/quest/m2/mobile-capture-ios.md) - Rust captures the camera and screen on iOS - [Android capture](/quest/m2/mobile-capture-android.md) - Rust captures through NDK/JNI on Android, reusing the existing codecs diff --git a/quest/m2/dash-rendition-uri.md b/quest/m2/dash-rendition-uri.md new file mode 100644 index 00000000000..e2504f5465e --- /dev/null +++ b/quest/m2/dash-rendition-uri.md @@ -0,0 +1,22 @@ +# [XS] Percent-encode DASH rendition URLs + +## Goal + +The MPD's `initialization` and `media` URLs carry each rendition name as one +percent-encoded path segment, as the HLS master playlist already does, so a +name containing `/`, `?`, `#`, `%`, or `$` resolves to its own rendition. Today +`video/1080p` under broadcast `live` routes to broadcast `live/video`, +rendition `1080p`. + +## Plan + +Found by the final-head audit of +[#4034](https://github.com/moq-dev/moq/pull/4034); the bug predates it. +Decided 2026-10-07: m2, since first-party publishers name renditions like +`video0`, though the catalog allows slashes. + +In `rs/moq-hls/src/export/mpd.rs` `render_representation`, encode the name +with the HLS renderer's `PATH_SEGMENT` set (`rs/moq-hls/src/export/master.rs`), +shared rather than copied, then XML-escape the finished URL. The +`Representation` `id` stays as is. Regress the names above through rendering +and `Route::parse` in `rs/moq-hls/src/server/routes.rs`. diff --git a/quest/m2/transport-adapter-dedup.md b/quest/m2/transport-adapter-dedup.md index 794fe073865..39f0dbc1d36 100644 --- a/quest/m2/transport-adapter-dedup.md +++ b/quest/m2/transport-adapter-dedup.md @@ -2,15 +2,14 @@ ## Goal -The poll transport adapter exists once. #4709 proposes copying the same +The poll transport adapter exists once. #4709 copied the same ~310-line adapter into `rs/moq-ffi`, `rs/moq-uring` and `rs/moq-wasm` (`src/transport/adapter.rs`), and moq-tokio repeats its error and stats wrappers. The 64 KiB cap on moq-net's default `poll_read_buf` has a unit test. ## Plan -Blocked until transport seam (#4709) lands; confirm the landed adapter -shape first. The transport-seam quest ruled out a new shared adapter crate. +Start from the adapter #4709 landed. The transport-seam quest ruled out a new shared adapter crate. Revisit that here: share one copy from an existing crate (for example moq-net behind a feature, or one backend re-exporting it to the others), or record why the copies stay. Add the `poll_read_buf` cap test either way. diff --git a/quest/m3/p2p/README.md b/quest/m3/p2p/README.md index 944581c613e..c3f71aaa6bd 100644 --- a/quest/m3/p2p/README.md +++ b/quest/m3/p2p/README.md @@ -128,7 +128,7 @@ WASM build, so the browser side stays TypeScript. ## Required - [Data channel transport](/quest/m3/p2p/transport.md) - `@moq/p2p` speaks qmux over one ordered RTCDataChannel behind the WebTransport shape `@moq/net` consumes -- [Peer grants](/quest/m3/p2p/peer-grant.md) - the relay issues a hop-bound, asymmetrically signed grant a browser can verify; HS256 keys issue none +- [Peer grants](/quest/m3/p2p/peer-grant.md) - the relay issues a node-bound, asymmetrically signed grant a browser can verify; HS256 keys issue none - [Signaling and policy](/quest/m3/p2p/signal.md) - opted-in peers find each other under the prefix, the application picks who to dial, and the roster-size gate decides whether STUN is used - [Native data channel transport](/quest/m3/p2p/webrtc.md) - `moq-tokio` holds a moq-net session with a browser over str0m with a full ICE agent - [moq-cli joins](/quest/m3/p2p/cli.md) - `--p2p` publishes a roster entry with its iroh endpoint, dials iroh between native peers, and serves browsers as a transit hop diff --git a/quest/m3/p2p/peer-grant.md b/quest/m3/p2p/peer-grant.md index e10b0bf65bd..45326b270db 100644 --- a/quest/m3/p2p/peer-grant.md +++ b/quest/m3/p2p/peer-grant.md @@ -2,7 +2,7 @@ ## Goal -The relay issues each session a short-lived, hop-bound grant that another +The relay issues each session a short-lived, node-bound grant that another client can verify without learning a signing key. A browser presents that grant on a direct session and serves only the paths it names. HMAC keys never leave the relay: a peer grant is signed with an asymmetric key @@ -15,8 +15,8 @@ nothing on a direct connection. `moq_auth::Claims` stays the bearer token the relay verifies. A peer grant is a separate type (`moq_auth::PeerGrant`) so presenting one as `?jwt=` fails verification rather than widening a relay session. It carries the -session's publish and subscribe patterns, the origin hop id, a presenter -public key (`cnf`), `iat`, and a short `exp`. A hop id is public on the +session's publish and subscribe patterns, the origin's route-layer node id (the roster id, since lite-07 drops the hop list), a presenter +public key (`cnf`), `iat`, and a short `exp`. A node id is public on the roster, so a copied JWT is not enough: the presenter proves possession of the matching private key on the direct AUTH stream. A roster peer that received someone else's grant cannot replay it. @@ -34,13 +34,13 @@ AUTH_KEYS and AUTH_PEER may repeat for refresh and key rotation. The lite draft and both language codecs gain AUTH_CNF, AUTH_KEYS, AUTH_PEER, and AUTH_POP; `just drafts check` passes. Reissue before expiry; the client replaces the grant on each live peer session with `auth().add` and drops -the old one. A hop-id or key change mints a new grant; the old hop id is +the old one. A node-id or key change mints a new grant; the old node id is dead. Verification on a direct session: the opener writes `AUTH { Token (b) }` with the JWT, then `AUTH_POP { Signature (b) }` over the JWT and the -receiver's hop id. The receiver verifies the relay signature against the -JWKS from its own AUTH_KEYS, checks `exp`, matches hop id and `cnf` +receiver's node id. The receiver verifies the relay signature against the +JWKS from its own AUTH_KEYS, checks `exp`, matches node id and `cnf` against the roster, and verifies AUTH_POP with `cnf`. The origin then serves only the granted paths. A missing, expired, HMAC-signed, or unproven grant is not a grant. @@ -52,7 +52,7 @@ rather than the auth line (decided in the 2026-09-30 audit). Docs: `doc/bin/relay/auth.md` states that peer grants need an asymmetric key, that HS256 operators get none, and that the public JWKS is not a secret. Tests: ES256 round trip; an HS256-only relay issues nothing; a -peer grant fails `Claims` verification; a hop mismatch is refused; a +peer grant fails `Claims` verification; a node-id mismatch is refused; a JWT presented without AUTH_POP is refused; a grant copied onto another session without the private key is refused; a refreshed grant replaces the old one without dropping the session. diff --git a/quest/m3/p2p/signal.md b/quest/m3/p2p/signal.md index 98211a01604..3fe0896ab52 100644 --- a/quest/m3/p2p/signal.md +++ b/quest/m3/p2p/signal.md @@ -68,9 +68,9 @@ scoped like a relay session, but the relay token itself never crosses it: a `moq_auth` JWT is a bearer credential with no audience or proof of possession, so a peer that received one could replay it against the relay. Instead the relay issues each session a peer grant, a relay-signed statement -of that session's path scopes bound to its hop id, its presenter public key, +of that session's path scopes bound to its node id, its presenter public key, and short-lived, which the peer presents in band with a proof of possession; -the other side verifies the relay's signature, the hop id and key against +the other side verifies the relay's signature, the node id and key against the roster, and AUTH_POP, then serves only the granted paths. Issuance, asymmetric keys, JWKS, PoP, and refresh live in [Peer grants](/quest/m3/p2p/peer-grant.md): HMAC keys cannot be given to @@ -81,4 +81,4 @@ there is no equal-scope shortcut. ## Required - [Data channel transport](/quest/m3/p2p/transport.md) -- [Peer grants](/quest/m3/p2p/peer-grant.md) - the hop-bound, asymmetrically signed credential a direct session presents; HS256 keys issue none +- [Peer grants](/quest/m3/p2p/peer-grant.md) - the node-bound, asymmetrically signed credential a direct session presents; HS256 keys issue none