From 5980e127c7a35a0aa5d0326167db5ed6701e92c5 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 21 Oct 2026 22:53:12 -0700 Subject: [PATCH 1/2] quest(m1): plan FETCH_OK whole-group and IETF SUBSCRIBE pause Import moq-dev/moq#6199 and moq-dev/moq#6263 as m1 quests; decline moq-dev/moq#6270 as superseded by refresh. Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 2 ++ quest/m1/ietf-fetch-end-location.md | 44 ++++++++++++++++++++++++++ quest/m1/ietf-subscribe-pause.md | 48 +++++++++++++++++++++++++++++ quest/m1/js-fetch.md | 1 + 4 files changed, 95 insertions(+) create mode 100644 quest/m1/ietf-fetch-end-location.md create mode 100644 quest/m1/ietf-subscribe-pause.md diff --git a/quest/m1/README.md b/quest/m1/README.md index 5e5e87c05b5..a3ba92e4dfe 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -86,6 +86,8 @@ lite-07 stream type here. - [Lazy discovery](/quest/m1/lazy-discovery/README.md) - a `consume` session requests announcements only for prefixes the origin is watching, in JS then Rust; `follow`, `broadcasts`, and the `discovery` option go away - [A public model](/quest/m1/public-model/README.md) - every model item a built-in session reaches is public, unnecessary, or marked deliberately private, so a custom publisher, subscriber, or relay builds from the public model alone - [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 +- [FETCH_OK whole group](/quest/m1/ietf-fetch-end-location.md) - on drafts 14 to 19, FETCH_OK End Object 0 means the whole group in both directions, and a FETCH ending at the maximum group is refused as unsupported +- [Pause an IETF SUBSCRIBE](/quest/m1/ietf-subscribe-pause.md) - Forward=0 pauses a SUBSCRIBE without demand upstream and Forward=1 resumes it, instead of ending it - [JavaScript FETCH](/quest/m1/js-fetch.md) - browser publishers answer IETF FETCH through the JS ranges request surface - [Report relays that refuse TRACK_STATUS](/quest/m1/track-status-race.md) - moqx and any other relay refusing TRACK_STATUS with an undefined code get an upstream report - [IETF fill timeout](/quest/m1/ietf-fill-timeout.md) - native FILL_TIMEOUT bounds upstream waiting on drafts 18-22, alongside local content-age enforcement diff --git a/quest/m1/ietf-fetch-end-location.md b/quest/m1/ietf-fetch-end-location.md new file mode 100644 index 00000000000..5c50828d557 --- /dev/null +++ b/quest/m1/ietf-fetch-end-location.md @@ -0,0 +1,44 @@ +# [S] FETCH_OK End Object 0 is the whole group + +## Goal + +On moq-transport drafts 14 to 19, moq-net reads and writes a FETCH_OK End +Location `{g, 0}` as all of group g, the same way it already writes the FETCH +request. A peer answering our whole-group FETCH with `{g, 0}` is served, not +refused, and a peer reading our answer no longer concludes that group g+1 does +not exist. A FETCH ending at `{2^64-1, 0}` gets the NOT_SUPPORTED that other +multi-group ranges get, on every draft. + +## Plan + +Decided 2026-10-21 (maintainer): fix all three sides in one PR, on behavior +rather than on draft text. The request side already spells the whole group +`{g, 0}`, while FETCH_OK is written and read as exclusive `{g+1, 0}`, so one +message has two readings depending on direction. IETF pairings between our own +released and current builds are out of scope, so no staged rollout. + +- Subscriber (`rs/moq-net/src/ietf/subscriber.rs`, FETCH_OK handling): before + draft 20, End Object 0 means the whole End Group, so `{g, 0}` covers g and + End Of Track sets the final sequence to g+1. Keep accepting `{g+1, 0}`, + which moxygen's relay cache and moqtest send, as covering g. +- Publisher (`rs/moq-net/src/ietf/publisher.rs`, standalone FETCH range): + keep the request's wire form instead of widening `{g, 0}` to `{g+1, 0}`. + That removes the `checked_add(1)` overflow (which also reaches draft 20+ + through the Absolute filter rewrite) and the `end.group - 1` step. +- Publisher FETCH_OK: echo `{g, 0}` for a covered whole group. + +Tests: replace the `{g+1, 0}` pins (`a_standalone_fetch_serves_one_whole_group`, +the `end_location()` helper, and the subscriber's group-fetch and abandon +fixtures) with the whole-group reading, and add a subscriber case for a +`{g+1, 0}` answer and a publisher case for `{u64::MAX, 0}`. Run +`just test interop --all`; moxygen must still interoperate. + +Document the pre-draft-20 FETCH_OK meaning next to the draft-20 line in +`doc/concept/standard.md`. + +Public API: none. Wire: drafts 14 to 19 FETCH_OK End Location changes from +`{g+1, 0}` to `{g, 0}` for a whole group. + +## Closes + +- [#6199](https://github.com/moq-dev/moq/issues/6199) - FETCH_OK End Location Object 0 means the whole group diff --git a/quest/m1/ietf-subscribe-pause.md b/quest/m1/ietf-subscribe-pause.md new file mode 100644 index 00000000000..e510eaedc1b --- /dev/null +++ b/quest/m1/ietf-subscribe-pause.md @@ -0,0 +1,48 @@ +# [M] Pause an IETF SUBSCRIBE + +## Goal + +moq-net's IETF publisher lets a subscriber pause and resume a SUBSCRIBE with +Forward State. REQUEST_UPDATE with Forward=0 stops delivery, answers +REQUEST_OK, and keeps the subscription established. A later Forward=1 resumes +it. An initial SUBSCRIBE with Forward=0 starts paused. While paused, the +subscription holds no upstream demand. A relay that pauses its upstream +subscription with no forwarding subscribers, as moqx does, no longer has its +subscription ended with UPDATE_FAILED. It also no longer pays an unsubscribe +and resubscribe round trip on each resume. + +## Plan + +Decided 2026-10-21 (maintainer): accept Forward=0 both on REQUEST_UPDATE and +on the initial SUBSCRIBE, as one paused state. + +Reuse the pause machinery the SUBSCRIBE_TRACKS answer added for PUBLISH +(#6167): `TrackServe::pausable`, `Served::Paused`, and the paused wait in +`run_publish` (`rs/moq-net/src/ietf/publisher/tracks.rs`). Pausing drops the +`track::Subscriber`, so its demand leaves the upstream aggregate, and resuming +subscribes again from the stored parameters at the live edge. Share that loop +between SUBSCRIBE and PUBLISH serves rather than duplicating it. Today the +SUBSCRIBE serve maps `Served::Paused` to `Ok(())` +(`rs/moq-net/src/ietf/publisher.rs`), and `apply_subscription_update` and the +SUBSCRIBE admission refuse Forward=0. + +A paused SUBSCRIBE still occupies its request slot, so the per-session request +caps bound how many a peer can hold. LOCATION_FILTER and FILL_PARAMETERS on a +SUBSCRIBE update stay refused; only the forward state and the parameters the +shared loop already accepts change. + +Replace `unsupported_subscription_update_fails_the_subscription`'s Forward=0 +case and its wire test with pause and resume tests, including a paused +SUBSCRIBE dropping upstream demand. Update `doc/concept/standard.md`, which +documents the Forward=0 refusal. Run `just test interop --all`. + +Public API: none. Wire: Forward=0 on SUBSCRIBE and on its REQUEST_UPDATE is +served instead of refused. + +## Closes + +- [#6263](https://github.com/moq-dev/moq/issues/6263) - Publisher ends the subscription on REQUEST_UPDATE with Forward=0 + +## Related + +- [Outbound SUBSCRIBE_TRACKS](/quest/m1/archive/subscribe-tracks-outbound.md) - the subscriber side that sends Forward=0 and toggles it diff --git a/quest/m1/js-fetch.md b/quest/m1/js-fetch.md index cd5c5024d02..e9550f1e416 100644 --- a/quest/m1/js-fetch.md +++ b/quest/m1/js-fetch.md @@ -40,6 +40,7 @@ claims that change. ## Required - [JS ranges](/quest/m1/subscribe-ranges/js.md) - the on-demand request surface this dispatches onto +- [FETCH_OK whole group](/quest/m1/ietf-fetch-end-location.md) - the Rust FETCH_OK contract this copies reads End Object 0 as the whole group first ## Related From 2a278aae14a03f4f173d4f3ad46862aee636271e Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 21 Oct 2026 22:59:45 -0700 Subject: [PATCH 2/2] quest(m1): address review on FETCH overflow drafts and paused SUBSCRIBE Co-Authored-By: Claude Opus 5.5 --- quest/m1/ietf-fetch-end-location.md | 3 ++- quest/m1/ietf-subscribe-pause.md | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/quest/m1/ietf-fetch-end-location.md b/quest/m1/ietf-fetch-end-location.md index 5c50828d557..48dcd05265a 100644 --- a/quest/m1/ietf-fetch-end-location.md +++ b/quest/m1/ietf-fetch-end-location.md @@ -7,7 +7,8 @@ Location `{g, 0}` as all of group g, the same way it already writes the FETCH request. A peer answering our whole-group FETCH with `{g, 0}` is served, not refused, and a peer reading our answer no longer concludes that group g+1 does not exist. A FETCH ending at `{2^64-1, 0}` gets the NOT_SUPPORTED that other -multi-group ranges get, on every draft. +multi-group ranges get, on draft 17 and later, the drafts whose encoding can +carry it (14 to 16 cap a varint at `2^62-1`). ## Plan diff --git a/quest/m1/ietf-subscribe-pause.md b/quest/m1/ietf-subscribe-pause.md index e510eaedc1b..319846d446a 100644 --- a/quest/m1/ietf-subscribe-pause.md +++ b/quest/m1/ietf-subscribe-pause.md @@ -26,14 +26,27 @@ SUBSCRIBE serve maps `Served::Paused` to `Ok(())` (`rs/moq-net/src/ietf/publisher.rs`), and `apply_subscription_update` and the SUBSCRIBE admission refuse Forward=0. +Dropping the `track::Subscriber` must not blind the paused state. The PUBLISH +paused wait watches only listing removal, session close, and the auth gate, so +a SUBSCRIBE paused there would never see its track end. Keep a watcher for the +track's end while paused, so a track that ends sends PUBLISH_DONE with +TRACK_ENDED, which the paused-SUBSCRIBE removal in +[outbound SUBSCRIBE_TRACKS](/quest/m1/archive/subscribe-tracks-outbound.md) +relies on. Carry the SUBSCRIBE's grant across the pause too: +`apply_subscription_update` returns `Served::Paused` before it starts +`verify_renewal`, and the paused loop refuses AUTHORIZATION TOKEN. A +REQUEST_UPDATE with both Forward=0 and a token, or a token while paused, must +renew the grant rather than drop the token and later expire the request. + A paused SUBSCRIBE still occupies its request slot, so the per-session request caps bound how many a peer can hold. LOCATION_FILTER and FILL_PARAMETERS on a SUBSCRIBE update stay refused; only the forward state and the parameters the shared loop already accepts change. Replace `unsupported_subscription_update_fails_the_subscription`'s Forward=0 -case and its wire test with pause and resume tests, including a paused -SUBSCRIBE dropping upstream demand. Update `doc/concept/standard.md`, which +case and its wire test with pause and resume tests: a paused SUBSCRIBE drops +upstream demand, a track ending while paused sends TRACK_ENDED, and a combined +pause-and-renew update keeps the request authorized past the old grant. Update `doc/concept/standard.md`, which documents the Forward=0 refusal. Run `just test interop --all`. Public API: none. Wire: Forward=0 on SUBSCRIBE and on its REQUEST_UPDATE is