Repository navigation
quest(m1): plan FETCH_OK whole-group and IETF SUBSCRIBE pause #6272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # [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 draft 17 and later, the drafts whose encoding can | ||
| carry it (14 to 16 cap a varint at `2^62-1`). | ||
|
|
||
| ## 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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| # [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 | ||
|
Comment on lines
+21
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Dropping the Useful? React with 👍 / 👎.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, folded into the quest Plan in 2a278aa. (Written by Claude Opus 5.5) |
||
| between SUBSCRIBE and PUBLISH serves rather than duplicating it. Today the | ||
|
Comment on lines
+23
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
A token-authorized SUBSCRIBE can receive one REQUEST_UPDATE containing both Useful? React with 👍 / 👎.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed, folded into the quest Plan in 2a278aa. (Written by Claude Opus 5.5) |
||
| 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: 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 | ||
| 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 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an upgraded publisher serves a whole-group FETCH to a released moq-net subscriber on drafts 14–19, changing the response from
{g+1, 0}to{g, 0}makes that subscriber treat the answer as empty and reject it withNotFound. Thus, explicitly excluding released/current pairings plans a user-visible interoperability regression; preserve a compatible write path or negotiate the corrected semantics rather than changing the meaning under existing draft identifiers. The repository requires wire changes to remain backward compatible for published versions.AGENTS.md reference: AGENTS.md:L84-L86
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disagree, and this was weighed explicitly when planning. Our implementations always negotiate moq-lite with each other, so an IETF session between a released and a current moq-net is not a pairing we guard (maintainer decision, 2026-10-09). The compatibility that matters on drafts 14 to 19 is with third-party peers. For them,
{g, 0}matches how we already write the FETCH request, and the subscriber keeps accepting moxygen's{g+1, 0}.just test interop --allgates that.(Written by Claude Opus 5.5)