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
3 changes: 3 additions & 0 deletions quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ lands before the cut.
- [Exact timestamps in every binding](/quest/m1/binding-timestamps.md) - bindings carry `{value, scale}` timestamps instead of lossy microseconds
- [JSON window timestamps](/quest/m1/json-window-timestamps.md) - Rust and JS window consumers return each event's frame timestamp like the snapshot and stream consumers
- [JavaScript FETCH](/quest/m1/js-fetch.md) - browser publishers answer IETF FETCH through the JS ranges request surface
- [Subscribing readers never ask TRACK_STATUS](/quest/m1/track-status-race.md) - a reader's subscription lands with its request, and the NOT_SUPPORTED fallback goes away
- [IETF max age](/quest/m1/ietf-max-age.md) - a moq-transport subscriber sets lite's max age through a timestamp-draft SUBSCRIBE parameter
- [IETF fill timeout](/quest/m1/ietf-fill-timeout.md) - native FILL_TIMEOUT bounds upstream waiting on drafts 18-22, alongside local content-age enforcement
- [Browser follows a renamed track](/quest/m1/browser-rename-check.md) - a real browser keeps playing when `@moq/publish` renames a track after a codec change, while size-only changes keep their identity
- [Rust identity enforcement](/quest/m1/catalog-identity-rs.md) - `moq-mux` refuses a redefined rendition, and every Rust publisher mints a new rendition name for a decoder identity change and updates everything else in place
Expand All @@ -96,6 +98,7 @@ lands before the cut.
- [Publish channel count](/quest/m1/publish-audio-channel-count.md) - forcing a channel count on an Audio.Capture stops costing the subscriber gaps of silence, and the media fixture's cold-start audio-tone flake is fixed at its cause
- [Handshake deadline covers admission](/quest/m1/handshake-admission-deadline.md) - `listen.timeout` bounds a connection through auth admission on both listeners, replacing the hardcoded admission timeout
- [Ring SETUP token](/quest/m1/uring-setup-token.md) - the ring forwards a moq-transport SETUP token to the auth decider, as tokio does
- [Restart reset](/quest/m1/stateless-reset-key.md) - a relay restarted with the same `listen.reset_key` stateless-resets its predecessor's connections, so clients reconnect within an RTT instead of the idle timeout
- [Drain cleanup](/quest/m1/drain-cleanup.md) - sessions force-closed at the drain deadline record their lease end and bytes before the relay or CLI exits, while unfinished handshakes stay bounded
- [GOAWAY coverage](/quest/m1/goaway-coverage.md) - every IETF request stream handles GOAWAY, a closed control stream is a violation, and the draft-18 cutoff is honored
- [Container reads drop backfill](/quest/m1/read-backfill.md) - the JS container consumer drops groups below its read cursor like Rust
Expand Down
50 changes: 50 additions & 0 deletions quest/m1/ietf-max-age.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# [S] IETF subscribers set their own max age

## Goal

A moq-transport subscriber bounds how late it is served with a SUBSCRIBE
and REQUEST_UPDATE parameter that carries moq-lite's subscriber max age
exactly: a group expires only once a newer group superseded it, judged on
media time and the hop's wall clock, so the newest group, such as a
long-lived catalog group, is never cut. Without it, the subscriber is served
as today.

## Plan

Decided 2026-10-19 by the maintainer (#5881):

- A new parameter, not the IETF delivery timeouts. OBJECT_DELIVERY_TIMEOUT
resets a stream once an object has waited at the hop, newest group
included: a late joiner's catalog snapshot would be reset and never
delivered. SUBGROUP_DELIVERY_TIMEOUT runs from the FIN. Neither matches
`max_delay`, so keep dropping both and say so in
`doc/concept/standard.md`, replacing its "advisory" paragraph.
- Define it in `drafts/draft-lcurley-moq-timestamp.md`, whose age-based
dropping already allows an application-supplied threshold. Pick a code
point from that draft's space. Validate with `just drafts check`.
- Negotiate it with its own Setup Option, as the hidden draft does for
HIDDEN. Drafts 16 and later close the session on an unknown SUBSCRIBE
parameter, so send the parameter only to a peer that declared the option.
The draft's "require no SETUP negotiation" sentence covers its properties,
not this parameter.
- It maps onto `Subscription::max_delay` on SUBSCRIBE (`serving_subscription`
in `rs/moq-net/src/ietf/publisher.rs`) and REQUEST_UPDATE. Absent keeps
`MAX_SAFE_DELAY_MS`, never `Duration::ZERO`, which means skip at once.
- Both directions, as lite does: our IETF subscribers send their
aggregated `max_delay` upstream, and the relay keeps lite's most-tolerant
aggregation, so one aggressive viewer never tightens another's budget.
- Rust and `js/net`, both publisher and subscriber, at every IETF draft that
carries SUBSCRIBE parameters. Test that a subscriber behind a shaped link
with a short max age is skipped to the live edge, and that a catalog's
newest group survives any budget.

Public API: none. Wire: a new Setup Option and SUBSCRIBE and REQUEST_UPDATE parameter.

## Closes

- [#5881](https://github.com/moq-dev/moq/issues/5881) - IETF subscribers cannot bound delivery lateness

## Related

- [IETF fill timeout](/quest/m1/ietf-fill-timeout.md) - the upstream waiting budget, a different bound
- [Per-stream deadlines](/quest/m2/quic-deadline.md) - would derive per-stream resets from `max_delay`
4 changes: 0 additions & 4 deletions quest/m1/js-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ The JS publisher already answers the TRACK_STATUS a native fetch-only request
asks before its first FETCH, so after that answer the FETCH is all that is
refused today.

Decided 2026-10-13: once this lands, check whether the Rust IETF subscriber's
fallback to SUBSCRIBE on a NOT_SUPPORTED TRACK_STATUS is still needed, and
delete it if no in-tree publisher refuses anymore.

Verify with an in-memory application responder: a browser publisher serves a
native IETF subscriber after a group is evicted or was never cached. Run the
supported-draft matrix and `just test interop --all` through CI.
Expand Down
14 changes: 14 additions & 0 deletions quest/m1/public-model/ingest.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ Rust items (`rs/moq-net/src/model/`), as they stood at b4eab0db1:
must be set before any reader sees the track, so it lives on
`track::Request` (for example a pre-accept `request_start(floor)`), with
the public `start_at` resolving it.
Decided 2026-10-19 by the maintainer (#5862): the same shape must let a
lazily served relay track be accepted with content it already holds, so
no reader observes it accepted but empty and IETF SUBSCRIBE_OK never omits
Largest Location. Accept it idle (the `Feed::Idle` gate `poll_live`
already waits on), let the caller write its retained groups, then go
live. Not a closure: #5862's `accept_with(info, |producer| …)` is
rejected, as callback parameters are. Fix the IETF subscriber's own
TRACK_STATUS `accept` → `set_idle` race with it. Regression test: accept,
replay a retained group on the same task, and SUBSCRIBE_OK carries
Largest Location on a multi-thread runtime over many runs.
- **Idle copy** (`track::Producer::set_idle`, `set_live`, `is_live`,
`idle_newest`, `track::IDLE_LINGER`, `poll_past`; lite subscriber,
`set_idle`, `set_live`, and `poll_past` also IETF). They keep a lingering copy's cache from serving stale groups
Expand Down Expand Up @@ -201,6 +211,10 @@ cover the behavior.

- [One group writer](/quest/m1/public-model/group-writer.md) - the non-Clone writer the owned chunked writer builds on

## Closes

- [#5862](https://github.com/moq-dev/moq/issues/5862) - no way to accept a track::Request with content

## Related

- [Public model after ranges, handover, and the JS tail](/quest/m1/public-model/deferred.md) - the fetch ingest, `mirror`, and `endTrack` items split out of this quest
35 changes: 35 additions & 0 deletions quest/m1/stateless-reset-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# [S] A restarted relay resets its predecessor's connections

## Goal

A relay restarted on the same address with the same configured secret
stateless-resets the connections its predecessor held, so a publisher learns
within one RTT of the relay coming back and a subscriber within one
keep-alive interval, instead of waiting out the QUIC idle timeout. A relay
without the secret keeps today's random per-process key.

## Plan

Decided 2026-10-19 by the maintainer (#5861): land
[#5910](https://github.com/moq-dev/moq/pull/5910), which already builds it.

- The secret is a file named by `[listen] reset_key`
(`--listen-quic-reset-key`, `MOQ_LISTEN_QUIC_RESET_KEY`), not derived from
the TLS key: ACME and certificate rotation would change a derived key
silently.
- HKDF derives both the reset key and the hashed connection ID key from it.
An unsharded, non-LB tokio server hashes connection IDs with a per-process
key too, so a stable reset key alone would drop the old IDs as invalid
before resetting them.
- Cover tokio and io_uring, with the crash-and-restart test #5910 carries.
- #5910 rebases onto [#5878](https://github.com/moq-dev/moq/pull/5878)
(receive leases).
- Don't reuse `cluster.token` or `cluster.lan.secret`: one is a credential,
the other keys the LAN mesh.

Public API: a new relay config field and `moq_quic::EndpointConfig::reset_secret`.
Docs: `doc/bin/relay/`.

## Closes

- [#5861](https://github.com/moq-dev/moq/issues/5861) - a restarted relay can't stateless-reset its predecessor's connections
41 changes: 41 additions & 0 deletions quest/m1/track-status-race.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# [S] A subscribing reader never asks TRACK_STATUS

## Goal

A reader that subscribes to a track served over moq-transport reaches the
publisher as a SUBSCRIBE, never as a TRACK_STATUS, however its subscription
races the request it creates. TRACK_STATUS stays for fetch-only and
query-only demand, and a refused TRACK_STATUS fails that demand loudly.

## Plan

Decided 2026-10-19 by the maintainer (#5954):

- Fix the race at the source. `broadcast::Consumer::resolve_track`
(`rs/moq-net/src/model/broadcast.rs`) makes the request visible before
`Preferences::register` (`model/track/demand.rs`) writes the
subscription, and the front's `Action::Query` (`model/origin.rs`) runs
`lookup.query()` before `copy.subscribe`. Register the subscription
before the request or demand edge is visible, and subscribe the front's
copy with its query. Don't make the IETF subscriber wait or poll for a
subscription.
- Delete the NOT_SUPPORTED fallback in `track_status`
(`rs/moq-net/src/ietf/subscriber.rs`). It was added for the JS publisher,
which answers TRACK_STATUS since #5468, and falling back to SUBSCRIBE for
fetch-only demand brings back the problems TRACK_STATUS avoids (a
finished track refuses it; it races the fetches). This settles the
deferred step in [JavaScript FETCH](/quest/m1/js-fetch.md).
- Don't widen the fallback to undefined codes, as #5954 proposes: that would
hide the peer's bug and ours.
- File an issue upstream for each relay found refusing TRACK_STATUS, or
answering it with an undefined code: moqx is known (#5954, `0xFFFFFFFF`).
The maintainer asked for these on 2026-10-19.
- Regression test: a subscriber's catalog read against a publisher that
refuses every TRACK_STATUS with an undefined code still opens, and the
publisher sees no TRACK_STATUS. It fails today on a multi-thread runtime.

Public API: none. Wire: none.

## Closes

- [#5954](https://github.com/moq-dev/moq/issues/5954) - a TRACK_STATUS refused with any code but NOT_SUPPORTED fails the reader's subscription
2 changes: 2 additions & 0 deletions quest/m1/ts-reliability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ remain with their current quests.
- [Whole-PES import](/quest/m1/ts-reliability/pes-import.md) - private PES travels whole at its source placement, a missing PTS stays missing, and the `pes` framing is deleted
- [Section placement](/quest/m1/ts-reliability/section-placement.md) - sections share the PCR placement clock instead of the video PTS
- [Sequence holes get a time budget](/quest/m1/ts-reliability/hole-budget.md) - a hole gives up on max(wall, pts), so a break marker behind it on a paused track is delivered
- [AUD first](/quest/m1/ts-reliability/aud-first.md) - a keyframe's access unit delimiter stays ahead of the re-injected parameter sets
- [TS source front end](/quest/m1/ts-reliability/source-front-end.md) - cli.md says to pipe a TS source's bytes, and the first PMT logs what each stream became
- [Loss and recovery tests](/quest/m1/ts-reliability/recovery.md) - actual MoQ omissions exercise reacquisition and unaffected tracks

## Related
Expand Down
28 changes: 28 additions & 0 deletions quest/m1/ts-reliability/aud-first.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# [XS] The access unit delimiter stays first

## Goal

When a keyframe's payload starts with an access unit delimiter, every Annex B
writer emits the AUD, then the re-injected parameter sets, then the rest, as
H.264 §7.4.1.2.3 and H.265 §7.4.2.4.4 require. Today `export ts` writes SPS,
PPS, AUD, IDR.

## Plan

Decided 2026-10-19 by the maintainer (#5951):

- Fix both writers: `video_es_payload` in
`rs/moq-mux/src/container/ts/export.rs` and `annexb::from_length_prefixed`
in `rs/moq-mux/src/codec/annexb.rs`. The second also feeds the H.264 and
H.265 elementary exporters, `moq-rtc`, and the `moq-video` decoder, which
all get the right order.
- An AUD is H.264 NAL type 9 or H.265 type 35. A payload without one is
unchanged.
- Regression test: an AUD + IDR keyframe exports as AUD, SPS, PPS, IDR. It
fails today.

Public API: none.

## Closes

- [#5951](https://github.com/moq-dev/moq/issues/5951) - export ts writes keyframe parameter sets ahead of the AUD
33 changes: 33 additions & 0 deletions quest/m1/ts-reliability/source-front-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# [XS] An operator can see what a TS import carries

## Goal

An operator feeding `import ts` from a source that is already a transport
stream pipes its bytes rather than re-muxing it, and can check what the
import kept. The first PMT logs one info line per elementary stream with its
PID, stream type, and what it became: a track, catalog SI, verbatim, or
dropped.

## Plan

Decided 2026-10-19 by the maintainer (#5950):

- `doc/bin/cli.md`'s `import ts` section adds one sentence: `ffmpeg -c copy
-f mpegts` re-muxes and drops PIDs (NIT, TDT/TOT, extra audio, teletext,
SCTE-35) from a TS source, so pipe the bytes instead, for example
`tsp -I ip … -O file - | moq … import ts`, or use `import srt`. Check the
example against `--help`.
- The log lives in `handle_pmt` (`rs/moq-mux/src/container/ts/import.rs`),
once per new elementary stream, beside the existing warn on a dropped
stream type. It lands after [whole-PES import](/quest/m1/ts-reliability/pes-import.md),
which rewrites the same `ensure_stream` arms.

Public API: none. Log output only.

## Required

- [Whole-PES import](/quest/m1/ts-reliability/pes-import.md) - rewrites the stream outcomes this log reports

## Closes

- [#5950](https://github.com/moq-dev/moq/issues/5950) - piping a broadcast TS through ffmpeg -c copy drops most of its PIDs
3 changes: 3 additions & 0 deletions quest/m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ ranked just below deterministic TS legs, which it requires.
- [One port on the io_uring workers](/quest/m2/uring-demux.md) - `moq-uring`'s workers host the UDP demux, so a ring relay keeps WebRTC media and SRT on its QUIC port
- [Synced data playback](/quest/m2/watch-data-sync.md) - js/watch releases JSON and binary payloads on the media playhead, and a slow data track holds media back
- [Watch decode gate](/quest/m2/watch-decode-gate.md) - video lookahead stays encoded until it is near presentation, like audio
- [Drop announce="never"](/quest/m2/publish-announce-never.md) - `@moq/publish` offers only announce modes a watcher can reach
- [Deterministic TS legs](/quest/m2/ts-hitless.md) - two `--sync` legs of one broadcast render every common slot identically, continuity counters included, through complementary loss
- [Deterministic H.265 TS legs](/quest/m2/ts-hitless-h265.md) - H.265's buffering period gets the same group anchor as H.264
- [TS over RTP legs](/quest/m2/ts-rtp-egress.md) - two legs send identical RTP packets, headers included, so an ST 2022-7 receiver can merge them
- [moqsrc A/V sync](/quest/m2/moqsrc-av-sync.md) - a nightly test measures A/V skew from `moqsrc` through clock-synced sinks
- [MP4 export](/quest/m2/mp4-export.md) - `moq export mp4 --output` records crash-safe fragments, then finishes a regular MP4 with moov at the end
Expand Down Expand Up @@ -133,6 +135,7 @@ ranked just below deterministic TS legs, which it requires.
- [QUIC I/O boundary](/quest/m2/quic-io-boundary.md) - moq-uring receives from the buffer ring and transmits into caller-owned buffers with no copy, once a profile says where
- [BBR media study](/quest/m2/quic-bbr-natural-drain.md) - whether bounded drain credit avoids ProbeRTT deadline interference, and where our BBR differs from Google's
- [Realtime uplink congestion control](/quest/m2/quic-realtime/README.md) - native publishers pick `Realtime`, a receive-ts delay-based controller that keeps the uplink queue near empty for teleoperation
- [Probes resume on the peer](/quest/m2/quic-outage-probe.md) - after an outage, the next probe follows the peer's first packet instead of the backed-off timer
- [Keep-alive from the idle timeout](/quest/m2/quic-keep-alive.md) - the keep-alive interval defaults to a fraction of the negotiated idle timeout; an explicit `quic.keep_alive` overrides
- [Socket close](/quest/m2/noq-socket-close.md) - moq-tokio's QUIC endpoint releases its socket on close, so it drops its wrapper
- [TS health stats](/quest/m2/ts-health-stats.md) - the TS counters ride the stats plumbing beside the media counters
Expand Down
28 changes: 28 additions & 0 deletions quest/m2/publish-announce-never.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# [XS] Drop moq-publish's announce="never"

## Goal

`@moq/publish` offers only announce modes that can be watched. A broadcast
that is never announced has no route at the relay, so only a peer that
already shares the intent to publish it could subscribe.

## Plan

Raised 2026-10-19 by the maintainer (#5703): a broadcast that never
announces can only work when client and server pre-share the intent to
publish. In `@moq/publish` it does not even do that: the catalog track is
created on the first announce (`js/publish/src/broadcast.ts`), so "never"
serves nothing.

Decided 2026-10-19 by the maintainer: delete `announce="never"`, keeping
`source` and `always`. It is a breaking change with a `MIGRATE.md` entry in
`js/publish`. A broadcast that should stay unlisted uses a `.`-prefixed
hidden path, which is left out of discovery but still subscribable by name;
document that on the `announce` attribute.

Public API: `@moq/publish`'s `announce` attribute and property.
Also check `demo/web` for uses.

## Closes

- [#5703](https://github.com/moq-dev/moq/issues/5703) - Announce is required to be subscribed by moq-watch
38 changes: 38 additions & 0 deletions quest/m2/quic-outage-probe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# [S] Probes resume when the peer is heard again

## Goal

After an outage, a QUIC sender whose probe timeout has backed off sends its
next probe as soon as it receives a packet from the peer, instead of
waiting out the backed-off timer. A 5 s outage costs about the outage plus
an RTT, not several seconds more, by default and within RFC 9002.

## Plan

Decided 2026-10-19 by the maintainer (#5953):

- Re-arm the probe timer on receipt from the peer while probes are
outstanding. Don't cap the backoff exponent: RFC 9002 §6.2.1 requires it
to double, and an opt-in cap would be a knob for one deployment.
- Declined from #5953: a congestion controller that holds a fixed rate
through random loss, exposing the reorder thresholds, and a named
provisioned-path profile. Random loss is not a quality target
([random-loss audit](/quest/m1/random-loss-audit.md)), and the reorder
evidence came from random netem reorder only. Revisit the thresholds with
a bufferbloat or real-path measurement.
- Test on mocked time: a link that drops everything for 5 s, then returns.
Assert the first post-outage send follows the peer's first packet within
one RTT, and that a sender hearing nothing still backs off.
- `MAX_BACKOFF_EXPONENT` lives in `rs/moq-quic/src/connection/mod.rs`.

Public API: none.

## Closes

- [#5953](https://github.com/moq-dev/moq/issues/5953) - QUIC settings for provisioned contribution paths

## Related

- [Keep-alive from the idle timeout](/quest/m2/quic-keep-alive.md) - the other outage-time knob
- [Per-stream deadlines](/quest/m2/quic-deadline.md) - an early probe ahead of a deadline
- [Restart reset](/quest/m1/stateless-reset-key.md) - the restart half of #5953's item 4
Loading