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/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ folded into Dropped sources.
- [Bump web-transport-iroh for the capsule close](/quest/m1/iroh-capsule-bump.md) - condition: moq-dev/web-transport#419 ships in a release, then moq's iroh HTTP/3 client reports a peer's close capsule
- [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - every stream group in a lite subscription arrives or is dropped by name, and lite-07 drops its stream count for it
- [Subscribe ranges](/quest/m1/subscribe-ranges/README.md) - a lite-07 SUBSCRIBE asks for past and live ranges with absolute or relative ends, in either order, and replaces FETCH; merged ranges never starve a subscriber; relays fill misses by range, including over moq-transport
- [Live largest location](/quest/m1/largest.md) - `largest()` replaces `latest()` in Rust and JS as a live stream of the track's largest location, known before the first group from the publisher's report
- [Reproduce cross-node announce flapping](/quest/m1/cross-node-flapping.md) - a clean close reaches a client on another node as one retraction, checked by a 3+ relay drill on main
- [Untimed lite-07](/quest/m1/lite-untimed.md) - lite-07 carries an untimed track in both languages; lite-05/06 write send time
- [A watch and publish release ships assets()](/quest/m1/assets-release.md) - the release that lets the sites host the worklets
Expand Down
38 changes: 38 additions & 0 deletions quest/m1/largest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# [M] Live largest location

## Goal

A track reader learns the track's largest location before the first group
arrives and follows it live. `largest()` replaces `latest()` on the track
producer, consumer and subscriber in Rust and `@moq/net`, returning a
`Location` (group and frame). It is seeded by the publisher's reported
largest (moq-transport SUBSCRIBE_OK, lite-07 SUBSCRIBE_START) and advances as
groups and frames arrive or a newer value is reported. It never lives on
`Info`, which is per-track and immutable.

## Plan

Decided with the maintainer (2026-10-13), after moq-dev/moq#5369 proposed
`Info.publisherLargest` as a snapshot of SUBSCRIBE_OK:

- **Stream only, no snapshot.** Rust: `async fn largest(&mut self)` and
`poll_largest(waiter)`. JS: `async largest()`. The first call yields the
current location at once if known; each later call waits for a newer one,
skipping values in between; it ends (`None`/`undefined`) when the track
ends.
- **One name everywhere.** Rename on the producer, consumer and subscriber,
and update every caller (moq-json, moq-flate, moq-mux, moq-relay, moq-hls,
moq-c, and the rest) in the same PR. JS's buffered-only `largest()` takes
the new meaning. Producers that pick their next sequence from
`latest() + 1` (moq-json, moq-mux) read the sequence high-water, which
datagrams and frameless groups also advance, so a frame `Location` can't
replace it: move each to the track's own allocator (`append_group`). If a
caller can't (moq-mux skips a sequence on a data-track discontinuity) or
truly needs a synchronous read, ask the maintainer rather than adding a
snapshot.
- Check that no cursor logic assumes the largest location was received
locally: a reported largest is a hint about the edge, not a cached group.
- Bindings follow the cross-package table if any expose `latest()`.
- Cover on mock time in both languages: known before the first group from
SUBSCRIBE_OK and SUBSCRIBE_START, advancing per frame, coalescing, and
ending with the track.
6 changes: 4 additions & 2 deletions quest/m1/subscribe-ranges/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ relay bounds a sparse FETCH only if the model can request ranges:
requested ranges the publisher won't deliver: never existed, expired, or
refused upstream. Datagram groups are always dropped in a past range (#4982). The
publisher delivers what it has and fills the rest as upstream answers.
- **Model.** `Subscription` gains `ranges` and `order`, mirroring the wire;
- **Model.** `Subscription` gains `ranges` and `order`, mirroring the wire
(`order` lands first, split out 2026-10-13);
`request_groups` as a separate API was rejected. A publisher's
`track::Dynamic` receives range requests for misses, replacing per-group
`requested_group`, and `fetch_group` becomes a one-range subscription or is
Expand Down Expand Up @@ -71,7 +72,8 @@ every sequence delivered or dropped.

## Required

- [Model ranges](/quest/m1/subscribe-ranges/model.md) - `Subscription` carries ranges and order, and `Dynamic` fills misses by range
- [Subscription order](/quest/m1/subscribe-ranges/order.md) - `Subscription` carries ascending or descending order in both languages, over moq-transport and lite-07
- [Model ranges](/quest/m1/subscribe-ranges/model.md) - `Subscription` carries ranges, and `Dynamic` fills misses by range
- [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - publishers name every group they won't deliver
- [Lite-07 ranges](/quest/m1/subscribe-ranges/lite.md) - the lite-07 wire, Rust publisher and subscriber, and the draft
- [moq-transport ranges](/quest/m1/subscribe-ranges/ietf.md) - range FETCH upstream per missing run, and non-blocking FETCH served downstream
Expand Down
3 changes: 2 additions & 1 deletion quest/m1/subscribe-ranges/js.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Goal

`@moq/net` matches Rust: `Subscription` carries ranges and order, the lite-07
`@moq/net` matches Rust: `Subscription` carries ranges beside the order from
[Subscription order](/quest/m1/subscribe-ranges/order.md), the lite-07
SUBSCRIBE carries them on the wire, FETCH is gone from lite-07, and
`fetchGroup` becomes a one-range subscription or is removed. A JavaScript
publisher serves requested ranges that are no longer in its live cache.
Expand Down
11 changes: 6 additions & 5 deletions quest/m1/subscribe-ranges/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Goal

The Rust model's `Subscription` carries a list of group ranges and an order,
aggregated across subscribers. A track serves the union from one cursor
without duplicating a group, in the requested order, and reports every
The Rust model's `Subscription` carries a list of group ranges, aggregated
across subscribers. A track serves the union from one cursor without
duplicating a group, in the subscription's order, and reports every
sequence it won't deliver. A publisher's `track::Dynamic` receives range
requests for misses instead of one request per group.

Expand All @@ -16,8 +16,8 @@ Guidance:
- Ranges have `Absolute` or `Relative` ends (see the line). Aggregating
subscribers onto one upstream request is the union of their ranges; a
relative end resolves against the track's latest group when the publisher
serves it. Decide and document the order rule when orders conflict (for
example, desc wins).
serves it. [Subscription order](/quest/m1/subscribe-ranges/order.md) owns
`order` and its merge rule (descending wins).
- This absorbs the deleted lite-07 Live flag quest, so the model mirrors the
wire with no `live` field, and its tests move here, on mock time and both
in-process and through a relay: a subscriber from `Absolute(4)` merged with
Expand Down Expand Up @@ -48,4 +48,5 @@ Guidance:

## Related

- [Subscription order](/quest/m1/subscribe-ranges/order.md) - `Subscription` carries `order`, which ranges are served in
- [FETCH max-delay](/quest/m1/fetch-max-delay.md) - historical request budgets and per-caller enforcement
36 changes: 36 additions & 0 deletions quest/m1/subscribe-ranges/order.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# [L] Subscription order

## Goal

A subscriber chooses whether a track serves pending groups oldest or newest
first. `Subscription` carries `order: Order` (`Ascending` or `Descending`,
default `Descending`, today's rule) in Rust and `@moq/net`, and the track's
cursor serves its own subscriber in that order: ascending drains a backlog
oldest first instead of skipping to the newest group. moq-transport SUBSCRIBE
GROUP_ORDER and the lite-07 SUBSCRIBE carry it. Ranges stay in
[Model ranges](/quest/m1/subscribe-ranges/model.md).

## Plan

Split out of the model quest (maintainer, 2026-10-13) so it can land on
moq-dev/moq#5370, which added a JS GROUP_ORDER codec field nothing set or
honored. Build on that contributor's commit and credit them with a
`Co-authored-by:` trailer.

- **Name.** `Order` under the track module (`Order::Ascending`,
`Order::Descending`; JS `"ascending" | "descending"`), not `GroupOrder`.
The private IETF `GroupOrder` maps to it; draft-14's 0 (any) decodes as
`Descending`, so no default variant is representable in the model.
- **Aggregation.** Subscribers sharing one upstream request may want
different orders; `Descending` wins upstream, so live subscribers stay
fresh. Each local cursor still serves its own subscriber in its own order
from the cache.
- **Wire.** lite-07 SUBSCRIBE and SUBSCRIBE_UPDATE carry `order`, documented
in `drafts/draft-lcurley-moq-lite.md`; lite-07 is unpublished. moq-transport
maps GROUP_ORDER both ways, and its publisher honors `Ascending`.
- **Older wires.** lite-06 and older cannot carry the field: an `Ascending`
subscription over them falls back to `Descending` (maintainer, 2026-10-13).
- Cover on mock time, in-process and through a relay, in both languages: a
backlog served ascending and descending, an ascending and a descending
subscriber merged on one upstream request, and an `Ascending` request over
lite-06 served newest first.
Loading