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
2 changes: 2 additions & 0 deletions quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 45 additions & 0 deletions quest/m1/ietf-fetch-end-location.md
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.
Comment on lines +18 to +19

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep FETCH_OK writes compatible with released peers

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 with NotFound. 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

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 --all gates that.

(Written by Claude Opus 5.5)


- 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
61 changes: 61 additions & 0 deletions quest/m1/ietf-subscribe-pause.md
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep observing track termination while paused

Dropping the track::Subscriber also removes the TrackServe::poll path that observes a clean track end, while the existing paused run_publish loop only watches listing removal and reports that as NotFound. Consequently, a source that ends while an inbound SUBSCRIBE is paused can leave the request established indefinitely and never send PUBLISH_DONE with TRACK_ENDED; this directly breaks the held paused-SUBSCRIBE removal flow required by quest/m1/archive/subscribe-tracks-outbound.md. Preserve a termination watcher while releasing demand and add an end-while-paused test.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve token renewal across a pause transition

A token-authorized SUBSCRIBE can receive one REQUEST_UPDATE containing both FORWARD=0 and a replacement AUTHORIZATION_TOKEN. Currently apply_subscription_update returns Served::Paused before starting verify_renewal, and the PUBLISH paused loop rejects authorization tokens, so sharing that machinery without an explicit renewal path can acknowledge the update while ignoring its token and later terminate the paused request when the old grant expires. Carry the SUBSCRIBE grant and renewal state across pause/resume and test a combined pause-and-renew update.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The 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
1 change: 1 addition & 0 deletions quest/m1/js-fetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading