From 13d1e11f8e233f17e94d799544d33eed908a0531 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 7 Oct 2026 13:11:05 -0700 Subject: [PATCH 1/5] quest: plan the lite-07 Latest flag that unblocks #5000 A subscriber's floor and "the latest group" become separate fields on lite-07 SUBSCRIBE, so merged subscriptions never starve one another. Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 1 + quest/m1/lite-late-lower-group.md | 14 ++++---- quest/m1/lite-latest.md | 51 +++++++++++++++++++++++++++++ quest/m1/lite07-finalize.md | 1 + quest/m1/subscribe-ranges/README.md | 4 +++ 5 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 quest/m1/lite-latest.md diff --git a/quest/m1/README.md b/quest/m1/README.md index 45b20598427..ae9340466a7 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -57,6 +57,7 @@ blocks. The quests that gated m0 lines moved under them. - [Flapping peer drill](/quest/m1/cross-relay-flap-drill.md) - the cluster burst drill survives a flapping peer link, the regression for 0.15.6 route-flap drops - [Untimed lite-07](/quest/m1/lite-untimed.md) - lite-07 carries an untimed track in both languages; lite-05/06 write send time - [Finalize moq-lite-07](/quest/m1/lite07-finalize.md) - when the maintainer cuts it, lite-07 negotiates as `moq-lite-07` and the next release ships it +- [lite-07 Latest flag](/quest/m1/lite-latest.md) - a separate `Latest` field on lite-07 SUBSCRIBE, so merged floors never starve a subscriber; late lower groups build on it - [Late lower groups](/quest/m1/lite-late-lower-group.md) - a moq-lite subscriber with a floor receives a group created below the first served one, as moq-transport does - [Flate stream budget](/quest/m1/flate-stream-budget.md) - a flate stream refuses an oversized append without ending, sharing one DEFLATE bound with json - [JS track takeover](/quest/m1/js-track-takeover.md) - JS `createTrack` answers a queued request and continues its sequences, as Rust does diff --git a/quest/m1/lite-late-lower-group.md b/quest/m1/lite-late-lower-group.md index afa0444f7e7..80bc9b38354 100644 --- a/quest/m1/lite-late-lower-group.md +++ b/quest/m1/lite-late-lower-group.md @@ -32,12 +32,10 @@ Decided: - `raise_start_to` applies only when the subscription has no explicit floor (`start.is_none()`). With an explicit floor, `SUBSCRIBE_START` still reports the first served group, but nothing below it is suppressed. -- Aggregation follows: `Subscription::poll_combined` - (`rs/moq-net/src/model/subscription.rs`) lets any `None` clear another - subscriber's explicit floor, so a relay forwards "join at the start" upstream - and the explicit-floor subscriber still loses group 0. An explicit floor - survives mixing with `None`; the loosest explicit floor wins. Each - subscriber's own cursor still filters what it sees. +- Aggregation follows [lite-07 Latest flag](/quest/m1/lite-latest.md): letting + an explicit floor survive mixing with `None` starved a floorless subscriber + until the floor's group existed (#5000's review), so the floor and "the latest + group" become separate fields and merge as min and OR. - `start_floor_suppresses_late_lower_arrivals` stays as the `None` case: it subscribes with `None`, receives group 7, raises the start to 7 as `SUBSCRIBE_START` does, and group 5 is still suppressed. Add its explicit-floor @@ -54,6 +52,10 @@ relay, with the in-process and moq-transport controls. Add a mixed case through a relay: a `None` subscriber already receiving group 1, then one with a floor of group 0, and a fresh group 0 reaches only the second. +## Required + +- [lite-07 Latest flag](/quest/m1/lite-latest.md) - floors and "the latest group" are separate fields, so merging them never starves a subscriber + ## Closes - [#4595](https://github.com/moq-dev/moq/issues/4595) - moq-lite: a group created below the first served group is silently dropped diff --git a/quest/m1/lite-latest.md b/quest/m1/lite-latest.md new file mode 100644 index 00000000000..5bbd66e271e --- /dev/null +++ b/quest/m1/lite-latest.md @@ -0,0 +1,51 @@ +# [M] lite-07 Latest flag + +## Goal + +Subscribers with different group and frame floors that share one upstream +subscription, in-process or through a relay, each receive everything their own +floor and `Subscriber Max Age` allow. No subscriber's floor starves another: +a resumed subscriber whose floor sits above the live edge never hides the +latest group from a subscriber that wants it. + +Today a floor and "no floor" are one field. On lite-06 `Group Start` 0 means no +floor, and the model keeps a separate `None` from pre-06's "absent means the +latest group". Merging an explicit floor with `None` either drops the late +group the floor asked for (main) or starves the floorless subscriber until the +floor's group exists, which on a quiet catalog track is never (#5000, the +failure #4940 fixed from the other side). + +## Plan + +Decided (maintainer, 2026-10-07): + +- lite-07 SUBSCRIBE and SUBSCRIBE_UPDATE carry a separate `Latest` boolean. + `Group Start` and `Frame Start` become a plain absolute floor, with no + "0 means none" sentinel. +- `Latest: true` replaces the floor with the latest group when the latest group + is smaller, starting at frame 0 of that group (its keyframe). `Frame Start` + only qualifies an explicit floor group. +- The model mirrors the wire: `Subscription { floor: (group, frame), latest }` + in Rust and `@moq/net`, replacing the `Option` floor. +- Merging across subscribers (`Subscription::poll_combined`, JS + `combineSubscriptions`): `latest` is the OR, and the floor is the minimum + `(group, frame)`. Each subscriber's own cursor still filters what it sees. +- Older wires map at the codec only, with no change to a published version: + lite-06 `Group Start` 0 is `latest`, any other value a floor; pre-06 absent + is `latest`; moq-transport `Largest Object` and `Next Group Start` filters are + `latest`, `Absolute Start` a floor. +- When merged subscriptions need both the latest group and a floor that an + older upstream wire cannot express in one SUBSCRIBE, the relay MAY first ask + TRACK_STATUS for the largest group and subscribe from the lower of the two. +- Docs stay inline: the lite draft (field, semantics, lite-07 changelog), + `doc/concept`, and the Rust and JS API docs. + +Test with mock time: the starvation case (a floor-4 subscriber and a `latest` +subscriber on a quiet track whose newest group is 3) in-process and through a +relay on lite-06 and lite-07-wip, a frame floor merged with `latest`, and the +codec mapping of each older wire. + +## Related + +- [Late lower group](/quest/m1/lite-late-lower-group.md) - requires this; #5000 rebases onto it and drops its own floor-combining change +- [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - names undelivered groups once publishers report them diff --git a/quest/m1/lite07-finalize.md b/quest/m1/lite07-finalize.md index c783cabfb8e..1dc37c60d41 100644 --- a/quest/m1/lite07-finalize.md +++ b/quest/m1/lite07-finalize.md @@ -70,6 +70,7 @@ is published; older versions are unchanged. - [Cluster routing](/quest/m1/cluster-routing/README.md) - lite-07 carries the route layer: ROUTE per origin node and path-less ANNOUNCE, with the hop list gone - [Remove `--hop`](/quest/m0/broadcast-epoch/hop-removal.md) - lite-07 loses NO_CAPACITY and stamping - [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - lite-07 restores SUBSCRIBE_DROP in place of `Stream Count` +- [lite-07 Latest flag](/quest/m1/lite-latest.md) - SUBSCRIBE carries `Latest` apart from its floor - [Subscribe ranges](/quest/m1/subscribe-ranges/README.md) - SUBSCRIBE carries ranges and an order and lite FETCH is gone, in Rust and JS - [Live media time](/quest/m1/subscribe-live-time.md) - SUBSCRIBE_OK carries the publisher's live media time - [Untimed lite-07](/quest/m1/lite-untimed.md) - an untimed track crosses the wire untimed diff --git a/quest/m1/subscribe-ranges/README.md b/quest/m1/subscribe-ranges/README.md index 7a136ccc3c2..09e1c403e30 100644 --- a/quest/m1/subscribe-ranges/README.md +++ b/quest/m1/subscribe-ranges/README.md @@ -40,6 +40,10 @@ relay bounds a sparse FETCH only if the model can request ranges: group's existing prefix but never wait for its future objects. Downstream, an IETF FETCH is served from the model's ranges, capped at the Largest Object. +- The `Latest` flag from [lite-07 Latest flag](/quest/m1/lite-latest.md) + stays a separate field beside the range list (maintainer, 10-07): a range + starting above the live edge must not hide the latest group from a + subscriber merged with it. - Ranges are frame-precise (`Position`), not whole groups. The IETF joining FETCH for a mid-group SUBSCRIBE's uncached prefix stays, because today's bridge relies on it (maintainer, 09-29). From 9a206b26f3168b8431affdc606a0a669c19dfe11 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 7 Oct 2026 14:38:00 -0700 Subject: [PATCH 2/5] quest(lite-latest): keep Next Group Start a floor; latest is the prefix-fill bridge Co-Authored-By: Claude Opus 5.5 --- quest/m1/lite-latest.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/quest/m1/lite-latest.md b/quest/m1/lite-latest.md index 5bbd66e271e..701d72f430b 100644 --- a/quest/m1/lite-latest.md +++ b/quest/m1/lite-latest.md @@ -32,8 +32,13 @@ Decided (maintainer, 2026-10-07): `(group, frame)`. Each subscriber's own cursor still filters what it sees. - Older wires map at the codec only, with no change to a published version: lite-06 `Group Start` 0 is `latest`, any other value a floor; pre-06 absent - is `latest`; moq-transport `Largest Object` and `Next Group Start` filters are - `latest`, `Absolute Start` a floor. + is `latest`. moq-transport has no current-group filter, so `latest` is the + bridge `ietf::subscriber::subscribe_join` already sends: `Largest Object` + plus the current group's prefix, from a `Relative(1)` fill on draft-20+ or a + relative joining FETCH on older drafts. `Next Group Start` (draft-20 + `Relative(0)`) keeps its draft meaning, a floor at the group after Largest + Object; a bare `Largest Object` is a floor at the next object; draft-20 + `Relative(1)` is `latest`; `Absolute Start` is a floor. - When merged subscriptions need both the latest group and a floor that an older upstream wire cannot express in one SUBSCRIBE, the relay MAY first ask TRACK_STATUS for the largest group and subscribe from the lower of the two. From fc40c883d7a468de5eec702d1b8c55185c4543ea Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 7 Oct 2026 14:42:50 -0700 Subject: [PATCH 3/5] quest(lite-live): rename Latest to Live and let it reach back by max age A live-only subscriber has no floor, and Live lowers the floor to the oldest unexpired group, so lite-06 buffering keeps its backlog. Apply the position comparison, the lite-06 (0, N) mapping, and the lite upstream fallback from review. Co-Authored-By: Claude Opus 5.5 --- quest/m1/README.md | 2 +- quest/m1/lite-late-lower-group.md | 8 ++-- quest/m1/lite-latest.md | 56 ------------------------ quest/m1/lite-live.md | 68 +++++++++++++++++++++++++++++ quest/m1/lite07-finalize.md | 2 +- quest/m1/subscribe-ranges/README.md | 2 +- 6 files changed, 75 insertions(+), 63 deletions(-) delete mode 100644 quest/m1/lite-latest.md create mode 100644 quest/m1/lite-live.md diff --git a/quest/m1/README.md b/quest/m1/README.md index ae9340466a7..dba21c12e40 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -57,7 +57,7 @@ blocks. The quests that gated m0 lines moved under them. - [Flapping peer drill](/quest/m1/cross-relay-flap-drill.md) - the cluster burst drill survives a flapping peer link, the regression for 0.15.6 route-flap drops - [Untimed lite-07](/quest/m1/lite-untimed.md) - lite-07 carries an untimed track in both languages; lite-05/06 write send time - [Finalize moq-lite-07](/quest/m1/lite07-finalize.md) - when the maintainer cuts it, lite-07 negotiates as `moq-lite-07` and the next release ships it -- [lite-07 Latest flag](/quest/m1/lite-latest.md) - a separate `Latest` field on lite-07 SUBSCRIBE, so merged floors never starve a subscriber; late lower groups build on it +- [lite-07 Live flag](/quest/m1/lite-live.md) - a separate `Live` field on lite-07 SUBSCRIBE, so merged floors never starve a subscriber; late lower groups build on it - [Late lower groups](/quest/m1/lite-late-lower-group.md) - a moq-lite subscriber with a floor receives a group created below the first served one, as moq-transport does - [Flate stream budget](/quest/m1/flate-stream-budget.md) - a flate stream refuses an oversized append without ending, sharing one DEFLATE bound with json - [JS track takeover](/quest/m1/js-track-takeover.md) - JS `createTrack` answers a queued request and continues its sequences, as Rust does diff --git a/quest/m1/lite-late-lower-group.md b/quest/m1/lite-late-lower-group.md index 80bc9b38354..dc6e3884bc9 100644 --- a/quest/m1/lite-late-lower-group.md +++ b/quest/m1/lite-late-lower-group.md @@ -32,10 +32,10 @@ Decided: - `raise_start_to` applies only when the subscription has no explicit floor (`start.is_none()`). With an explicit floor, `SUBSCRIBE_START` still reports the first served group, but nothing below it is suppressed. -- Aggregation follows [lite-07 Latest flag](/quest/m1/lite-latest.md): letting +- Aggregation follows [lite-07 Live flag](/quest/m1/lite-live.md): letting an explicit floor survive mixing with `None` starved a floorless subscriber - until the floor's group existed (#5000's review), so the floor and "the latest - group" become separate fields and merge as min and OR. + until the floor's group existed (#5000's review), so the floor and `Live` + become separate fields and merge as min and OR. - `start_floor_suppresses_late_lower_arrivals` stays as the `None` case: it subscribes with `None`, receives group 7, raises the start to 7 as `SUBSCRIBE_START` does, and group 5 is still suppressed. Add its explicit-floor @@ -54,7 +54,7 @@ of group 0, and a fresh group 0 reaches only the second. ## Required -- [lite-07 Latest flag](/quest/m1/lite-latest.md) - floors and "the latest group" are separate fields, so merging them never starves a subscriber +- [lite-07 Live flag](/quest/m1/lite-live.md) - floors and `Live` are separate fields, so merging them never starves a subscriber ## Closes diff --git a/quest/m1/lite-latest.md b/quest/m1/lite-latest.md deleted file mode 100644 index 701d72f430b..00000000000 --- a/quest/m1/lite-latest.md +++ /dev/null @@ -1,56 +0,0 @@ -# [M] lite-07 Latest flag - -## Goal - -Subscribers with different group and frame floors that share one upstream -subscription, in-process or through a relay, each receive everything their own -floor and `Subscriber Max Age` allow. No subscriber's floor starves another: -a resumed subscriber whose floor sits above the live edge never hides the -latest group from a subscriber that wants it. - -Today a floor and "no floor" are one field. On lite-06 `Group Start` 0 means no -floor, and the model keeps a separate `None` from pre-06's "absent means the -latest group". Merging an explicit floor with `None` either drops the late -group the floor asked for (main) or starves the floorless subscriber until the -floor's group exists, which on a quiet catalog track is never (#5000, the -failure #4940 fixed from the other side). - -## Plan - -Decided (maintainer, 2026-10-07): - -- lite-07 SUBSCRIBE and SUBSCRIBE_UPDATE carry a separate `Latest` boolean. - `Group Start` and `Frame Start` become a plain absolute floor, with no - "0 means none" sentinel. -- `Latest: true` replaces the floor with the latest group when the latest group - is smaller, starting at frame 0 of that group (its keyframe). `Frame Start` - only qualifies an explicit floor group. -- The model mirrors the wire: `Subscription { floor: (group, frame), latest }` - in Rust and `@moq/net`, replacing the `Option` floor. -- Merging across subscribers (`Subscription::poll_combined`, JS - `combineSubscriptions`): `latest` is the OR, and the floor is the minimum - `(group, frame)`. Each subscriber's own cursor still filters what it sees. -- Older wires map at the codec only, with no change to a published version: - lite-06 `Group Start` 0 is `latest`, any other value a floor; pre-06 absent - is `latest`. moq-transport has no current-group filter, so `latest` is the - bridge `ietf::subscriber::subscribe_join` already sends: `Largest Object` - plus the current group's prefix, from a `Relative(1)` fill on draft-20+ or a - relative joining FETCH on older drafts. `Next Group Start` (draft-20 - `Relative(0)`) keeps its draft meaning, a floor at the group after Largest - Object; a bare `Largest Object` is a floor at the next object; draft-20 - `Relative(1)` is `latest`; `Absolute Start` is a floor. -- When merged subscriptions need both the latest group and a floor that an - older upstream wire cannot express in one SUBSCRIBE, the relay MAY first ask - TRACK_STATUS for the largest group and subscribe from the lower of the two. -- Docs stay inline: the lite draft (field, semantics, lite-07 changelog), - `doc/concept`, and the Rust and JS API docs. - -Test with mock time: the starvation case (a floor-4 subscriber and a `latest` -subscriber on a quiet track whose newest group is 3) in-process and through a -relay on lite-06 and lite-07-wip, a frame floor merged with `latest`, and the -codec mapping of each older wire. - -## Related - -- [Late lower group](/quest/m1/lite-late-lower-group.md) - requires this; #5000 rebases onto it and drops its own floor-combining change -- [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - names undelivered groups once publishers report them diff --git a/quest/m1/lite-live.md b/quest/m1/lite-live.md new file mode 100644 index 00000000000..cff3687bd0d --- /dev/null +++ b/quest/m1/lite-live.md @@ -0,0 +1,68 @@ +# [M] lite-07 Live flag + +## Goal + +Subscribers with different group and frame floors that share one upstream +subscription, in-process or through a relay, each receive everything their own +floor and `Subscriber Max Age` allow. No subscriber's floor starves another: +a resumed subscriber whose floor sits above the live edge never hides the +latest group from a subscriber that wants it. + +Today a floor and "no floor" are one field. On lite-06 `Group Start` 0 means no +floor, and the model keeps a separate `None` from pre-06's "absent means the +latest group". Merging an explicit floor with `None` either drops the late +group the floor asked for (main) or starves the floorless subscriber until the +floor's group exists, which on a quiet catalog track is never (#5000, the +failure #4940 fixed from the other side). + +## Plan + +Decided (maintainer, 2026-10-07): + +- lite-07 SUBSCRIBE and SUBSCRIBE_UPDATE carry a separate `Live` boolean. + `Group Start` and `Frame Start` become a plain absolute floor, with no + "0 means none" sentinel. +- A live-only subscriber has no floor, the neutral value for the minimum, so + lite-07 makes the floor optional. A subscription with neither a floor nor + `Live` is refused. +- `Live: true` lowers the floor to frame 0 of the oldest group that + `Subscriber Max Age` has not expired, when that position sorts below the + floor. That is the start lite-06 already resolves for `Group Start` 0, so a + buffering subscriber keeps its backlog, and a max age of 0 still means the + latest group. Comparing positions, not groups, means a merged floor of + (3, 5) with group 3 as the latest still delivers frames 0-4. +- The model mirrors the wire: `Subscription { floor: Option<(group, frame)>, + live }` in Rust and `@moq/net`. +- Merging across subscribers (`Subscription::poll_combined`, JS + `combineSubscriptions`): `live` is the OR, and the floor is the minimum + `(group, frame)`. Each subscriber's own cursor still filters what it sees. +- Older wires map at the codec only, with no change to a published version: + lite-06 `Group Start` 0 with `Frame Start` 0 is `live`, any other pair a + floor (`(0, N)` is a catalog resume); pre-06 absent is `live`. + moq-transport has no current-group filter, so `live` is the bridge + `ietf::subscriber::subscribe_join` already sends: `Largest Object` plus the + current group's prefix, from a `Relative(1)` fill on draft-20+ or a relative + joining FETCH on older drafts. `Next Group Start` (draft-20 `Relative(0)`) + keeps its draft meaning, a floor at the group after Largest Object; a bare + `Largest Object` is a floor at the next object; draft-20 `Relative(1)` is + `live`; `Absolute Start` is a floor. +- When merged subscriptions need both `live` and a floor that an older + upstream wire cannot express in one SUBSCRIBE, a moq-transport upstream MAY + first be asked TRACK_STATUS for the largest group, subscribing from the lower + of the two. For an empty track the `live` mapping alone covers both, since + moq-transport starts it at {0, 0}. moq-lite has no + TRACK_STATUS, so a lite-06 or pre-06 upstream is subscribed at floor 0 and + the relay filters locally, as main does today. +- Docs stay inline: the lite draft (field, semantics, lite-07 changelog), + `doc/concept`, and the Rust and JS API docs. + +Test with mock time: the starvation case (a floor-4 subscriber and a `live` +subscriber on a quiet track whose newest group is 3) in-process and through a +relay on lite-06 and lite-07-wip, a buffering `live` subscriber (max age > 0) +merged with a floor above the live edge, a frame floor merged with `live`, and +the codec mapping of each older wire. + +## Related + +- [Late lower group](/quest/m1/lite-late-lower-group.md) - requires this; #5000 rebases onto it and drops its own floor-combining change +- [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - names undelivered groups once publishers report them diff --git a/quest/m1/lite07-finalize.md b/quest/m1/lite07-finalize.md index 1dc37c60d41..40b3a2d2905 100644 --- a/quest/m1/lite07-finalize.md +++ b/quest/m1/lite07-finalize.md @@ -70,7 +70,7 @@ is published; older versions are unchanged. - [Cluster routing](/quest/m1/cluster-routing/README.md) - lite-07 carries the route layer: ROUTE per origin node and path-less ANNOUNCE, with the hop list gone - [Remove `--hop`](/quest/m0/broadcast-epoch/hop-removal.md) - lite-07 loses NO_CAPACITY and stamping - [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - lite-07 restores SUBSCRIBE_DROP in place of `Stream Count` -- [lite-07 Latest flag](/quest/m1/lite-latest.md) - SUBSCRIBE carries `Latest` apart from its floor +- [lite-07 Live flag](/quest/m1/lite-live.md) - SUBSCRIBE carries `Live` apart from its floor - [Subscribe ranges](/quest/m1/subscribe-ranges/README.md) - SUBSCRIBE carries ranges and an order and lite FETCH is gone, in Rust and JS - [Live media time](/quest/m1/subscribe-live-time.md) - SUBSCRIBE_OK carries the publisher's live media time - [Untimed lite-07](/quest/m1/lite-untimed.md) - an untimed track crosses the wire untimed diff --git a/quest/m1/subscribe-ranges/README.md b/quest/m1/subscribe-ranges/README.md index 09e1c403e30..cd7d9356672 100644 --- a/quest/m1/subscribe-ranges/README.md +++ b/quest/m1/subscribe-ranges/README.md @@ -40,7 +40,7 @@ relay bounds a sparse FETCH only if the model can request ranges: group's existing prefix but never wait for its future objects. Downstream, an IETF FETCH is served from the model's ranges, capped at the Largest Object. -- The `Latest` flag from [lite-07 Latest flag](/quest/m1/lite-latest.md) +- The `Live` flag from [lite-07 Live flag](/quest/m1/lite-live.md) stays a separate field beside the range list (maintainer, 10-07): a range starting above the live edge must not hide the latest group from a subscriber merged with it. From 3e8af4df23c42bd596f6143ba0c984b44e602757 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 7 Oct 2026 16:22:17 -0700 Subject: [PATCH 4/5] quest(lite-live): encode pre-06's replay floor explicitly; late-lower-group speaks floor and live --- quest/m1/lite-late-lower-group.md | 28 +++++++++++++++------------- quest/m1/lite-live.md | 14 ++++++++++---- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/quest/m1/lite-late-lower-group.md b/quest/m1/lite-late-lower-group.md index dc6e3884bc9..a646bad88ce 100644 --- a/quest/m1/lite-late-lower-group.md +++ b/quest/m1/lite-late-lower-group.md @@ -24,20 +24,22 @@ Decided: - An explicit floor delivers late lower groups within `max_delay`, matching moq-transport, draft-ietf-moq-transport ("subscriptions without a filter pass all Objects"), and moq-mux's floor handling (#3258). -- `start: None` joins where the publisher starts: the first served group - becomes the floor, so a group created below it is dropped by design. This is - what moq-mux's `container::Consumer` and the IETF publisher already assume. - Fix the `Subscription::start` docs in moq-net (which say `None` equals a - floor of group 0) and the matching js/net docs. -- `raise_start_to` applies only when the subscription has no explicit floor - (`start.is_none()`). With an explicit floor, `SUBSCRIBE_START` still reports - the first served group, but nothing below it is suppressed. +- A live-only subscription (no floor, per + [lite-07 Live flag](/quest/m1/lite-live.md)) joins where the publisher + starts: the first served group becomes the floor, so a group created below + it is dropped by design. This is what moq-mux's `container::Consumer` and the IETF publisher already assume. + Fix the `Subscription` docs in moq-net (which say `None` equals a floor of + group 0) and the matching js/net docs. +- `raise_start_to` applies only to a live-only subscription + (`floor.is_none()`). With an explicit floor, merged with `live` or not, + `SUBSCRIBE_START` still reports the first served group, but nothing below + it is suppressed; each subscriber's cursor filters locally. - Aggregation follows [lite-07 Live flag](/quest/m1/lite-live.md): letting - an explicit floor survive mixing with `None` starved a floorless subscriber + an explicit floor survive mixing with no floor starved a floorless subscriber until the floor's group existed (#5000's review), so the floor and `Live` become separate fields and merge as min and OR. -- `start_floor_suppresses_late_lower_arrivals` stays as the `None` case: it - subscribes with `None`, receives group 7, raises the start to 7 as +- `start_floor_suppresses_late_lower_arrivals` stays as the live-only case: it + subscribes with no floor, receives group 7, raises the start to 7 as `SUBSCRIBE_START` does, and group 5 is still suppressed. Add its explicit-floor twin, which delivers group 5. @@ -49,7 +51,7 @@ Test: port the reporter's deterministic repro (`rs/moq-net/tests/late_lower_group.rs` on kidq330's fork, paused time and the mock transport) for lite-05, lite-06, and lite-07-wip, direct and through a relay, with the in-process and moq-transport controls. Add a mixed case through -a relay: a `None` subscriber already receiving group 1, then one with a floor +a relay: a live-only subscriber already receiving group 1, then one with a floor of group 0, and a fresh group 0 reaches only the second. ## Required @@ -62,4 +64,4 @@ of group 0, and a fresh group 0 reaches only the second. ## Related -- [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - once publishers name every undelivered group, a group dropped under the None floor can be named instead of vanishing +- [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - once publishers name every undelivered group, a group dropped under a live-only join can be named instead of vanishing diff --git a/quest/m1/lite-live.md b/quest/m1/lite-live.md index cff3687bd0d..01a498ff9b5 100644 --- a/quest/m1/lite-live.md +++ b/quest/m1/lite-live.md @@ -24,7 +24,8 @@ Decided (maintainer, 2026-10-07): "0 means none" sentinel. - A live-only subscriber has no floor, the neutral value for the minimum, so lite-07 makes the floor optional. A subscription with neither a floor nor - `Live` is refused. + `Live` is refused. The draft names how an absent floor is encoded (not a + value-plus-one sentinel) and how SUBSCRIBE_UPDATE clears a floor or `Live`. - `Live: true` lowers the floor to frame 0 of the oldest group that `Subscriber Max Age` has not expired, when that position sorts below the floor. That is the start lite-06 already resolves for `Group Start` 0, so a @@ -52,15 +53,20 @@ Decided (maintainer, 2026-10-07): of the two. For an empty track the `live` mapping alone covers both, since moq-transport starts it at {0, 0}. moq-lite has no TRACK_STATUS, so a lite-06 or pre-06 upstream is subscribed at floor 0 and - the relay filters locally, as main does today. + the relay filters locally. On lite-06 that is `Group Start` 0, exactly the + `live` mapping. On pre-06 the floor must go out as an explicit group 0 + (replay from the beginning): the codec folds a floor of 0 to absent today + (`encode_start_group`), which pre-06 reads as the latest group, so a merged + `{floor: 2, live}` with groups 2-4 retained would lose 2-3. - Docs stay inline: the lite draft (field, semantics, lite-07 changelog), `doc/concept`, and the Rust and JS API docs. Test with mock time: the starvation case (a floor-4 subscriber and a `live` subscriber on a quiet track whose newest group is 3) in-process and through a relay on lite-06 and lite-07-wip, a buffering `live` subscriber (max age > 0) -merged with a floor above the live edge, a frame floor merged with `live`, and -the codec mapping of each older wire. +merged with a floor above the live edge, a frame floor merged with `live`, a +merged `{floor: 2, live}` through a pre-06 upstream with groups 2-4 retained +that delivers all three, and the codec mapping of each older wire. ## Related From fa42467577f64949177a7f6179d7d289dafcaf2c Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Wed, 7 Oct 2026 20:02:59 -0700 Subject: [PATCH 5/5] quest(lite-live): back a buffered Live from group 0 over moq-transport; untimed Live is the latest group; lite-01/02 limit --- quest/m1/lite-live.md | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/quest/m1/lite-live.md b/quest/m1/lite-live.md index 01a498ff9b5..e73a6f5564b 100644 --- a/quest/m1/lite-live.md +++ b/quest/m1/lite-live.md @@ -30,8 +30,10 @@ Decided (maintainer, 2026-10-07): `Subscriber Max Age` has not expired, when that position sorts below the floor. That is the start lite-06 already resolves for `Group Start` 0, so a buffering subscriber keeps its backlog, and a max age of 0 still means the - latest group. Comparing positions, not groups, means a merged floor of - (3, 5) with group 3 as the latest still delivers frames 0-4. + latest group. On an untimed track no group expires by max age, so `Live` + means the latest group there (as `model/subscription.rs` documents today), + not the whole cache. Comparing positions, not groups, means a merged floor + of (3, 5) with group 3 as the latest still delivers frames 0-4. - The model mirrors the wire: `Subscription { floor: Option<(group, frame)>, live }` in Rust and `@moq/net`. - Merging across subscribers (`Subscription::poll_combined`, JS @@ -50,14 +52,22 @@ Decided (maintainer, 2026-10-07): - When merged subscriptions need both `live` and a floor that an older upstream wire cannot express in one SUBSCRIBE, a moq-transport upstream MAY first be asked TRACK_STATUS for the largest group, subscribing from the lower - of the two. For an empty track the `live` mapping alone covers both, since + of the two. That covers only a `live` reaching the latest group. A buffered + `live` (max age > 0) needs the oldest unexpired group, which the relay + can't learn upstream: the ordinary join (`subscribe_join`) fetches only the + latest group's prefix. So a buffered `live` merged with a floor subscribes + from `Absolute Start` at group 0, and the relay filters locally by age and + floor. For an empty track the `live` mapping alone covers both, since moq-transport starts it at {0, 0}. moq-lite has no - TRACK_STATUS, so a lite-06 or pre-06 upstream is subscribed at floor 0 and - the relay filters locally. On lite-06 that is `Group Start` 0, exactly the - `live` mapping. On pre-06 the floor must go out as an explicit group 0 - (replay from the beginning): the codec folds a floor of 0 to absent today - (`encode_start_group`), which pre-06 reads as the latest group, so a merged - `{floor: 2, live}` with groups 2-4 retained would lose 2-3. + TRACK_STATUS, so a lite-06 or lite-03 to 05 upstream is subscribed at floor + 0 and the relay filters locally. On lite-06 that is `Group Start` 0, exactly + the `live` mapping. On lite-03 to 05 the floor must go out as an explicit + group 0 (replay from the beginning): the codec folds a floor of 0 to absent + today (`encode_start_group`), which those versions read as the latest + group, so a merged `{floor: 2, live}` with groups 2-4 retained would lose + 2-3. lite-01 and 02 carry no `Group Start` at all, so a merged floor through + them gets what they send from the latest group; that is a limitation of + those published versions, not something the codec can fix. - Docs stay inline: the lite draft (field, semantics, lite-07 changelog), `doc/concept`, and the Rust and JS API docs. @@ -65,8 +75,11 @@ Test with mock time: the starvation case (a floor-4 subscriber and a `live` subscriber on a quiet track whose newest group is 3) in-process and through a relay on lite-06 and lite-07-wip, a buffering `live` subscriber (max age > 0) merged with a floor above the live edge, a frame floor merged with `live`, a -merged `{floor: 2, live}` through a pre-06 upstream with groups 2-4 retained -that delivers all three, and the codec mapping of each older wire. +merged `{floor: 2, live}` through a lite-03 to 05 upstream with groups 2-4 +retained that delivers all three, a buffered `live` merged with a floor-5 +subscriber over a moq-transport upstream with fresh groups 2-4 that still +delivers 2-4, an untimed `live` merged with a floor that starts at the latest +group, and the codec mapping of each older wire. ## Related