Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions quest/m0/broadcast-epoch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
53 changes: 53 additions & 0 deletions quest/m0/broadcast-epoch/dynamic-epoch.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions quest/m0/ietf-location-filter-22.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
11 changes: 6 additions & 5 deletions quest/m1/archive/flush.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ 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
time, per the repository's mock-time rule. Cover an idle open group, an idle
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()`
5 changes: 5 additions & 0 deletions quest/m1/archive/js-timelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions quest/m1/auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
7 changes: 4 additions & 3 deletions quest/m1/auth/malformed-grant.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 5 additions & 5 deletions quest/m1/auth/violations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down
5 changes: 4 additions & 1 deletion quest/m1/capture-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions quest/m1/ffi-shape/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion quest/m1/ffi-shape/codec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
6 changes: 3 additions & 3 deletions quest/m1/js-startup-hole.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion quest/m1/libmoq-final-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion quest/m1/perf/demand-aggregate.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions quest/m1/plan-watch-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<moq-watch>`, 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
Expand Down
9 changes: 0 additions & 9 deletions quest/m1/quest-flat-lines.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
1 change: 1 addition & 0 deletions quest/m1/quic/fork/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
28 changes: 28 additions & 0 deletions quest/m1/quic/fork/input-validation.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion quest/m1/route-wakes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions quest/m1/track-priority-scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading
Loading