diff --git a/quest/m2/README.md b/quest/m2/README.md index d65dd3641f..154373f683 100644 --- a/quest/m2/README.md +++ b/quest/m2/README.md @@ -47,8 +47,9 @@ removal, a rename, or a wire, catalog, or format change that is free until [finished format](/quest/m3/e2ee-format.md) follows in m3. - **Catalog, drafts, and formats.** hang-04 (done: the `sync` section, a version per entry, no video `warmup`, the TS passthrough under `mpegts`, one strict rule); - declared ends, back from m3, which became - [a whole marker](/quest/m2/time-addressing/group-end-whole.md) on 2026-11-19. + declared ends, back from m3, which became a whole marker on 2026-11-19 + and [an end again](/quest/m2/time-addressing/group-times.md) on + 2026-11-20. - **Native media and gateways.** [Upstream str0m](https://github.com/moq-dev/moq/pull/8963), which reverses the 2026-10-30 vendoring. - **Bindings.** The C API as `libmoq` (done), reversing 2026-10-25. @@ -61,6 +62,20 @@ allowed inside a value. Not reopened: AUTH_ERROR's retry codes (2026-11-14) and AUTH_OK's rate fields, which wait for lite-08 ([rate grant](/quest/m5/rate-grant.md)). +Decided 2026-11-20 (maintainer, /quest-plan of a pre-cut audit of the +lite-07 and hang-04 wire changes): the cut also waits on what that audit +found. Each fix is so that a subscription, frame, or catalog entry means +the same whichever relay or reader serves it: +[no relative anchors](/quest/m2/time-addressing/no-relative-anchors.md), +with Min Age placing a live join; +[scale-less tracks aging by arrival](/quest/m2/time-addressing/scale-less-arrival.md); +[Group Streams carrying each time once](/quest/m2/time-addressing/group-times.md), +with GROUP_END's end back as a delta; and +[the hang-04 text](/quest/m2/hang-04-text.md) on entry versions and HLS +overruns. [moq-dev/moq#9198](https://github.com/moq-dev/moq/pull/9198) and +[moq-dev/moq#9221](https://github.com/moq-dev/moq/pull/9221) closed, since +relative starts and the bare GROUP_END are gone. + Decided 2026-11-15 (maintainer, /quest-plan on the whole route layer): ✅ the cut waits on [cache-aware multicast](/quest/m2/multicast/README.md), which replaces lite-07's route layer before it freezes (rejected: lite-08). The diff --git a/quest/m2/hang-04-text.md b/quest/m2/hang-04-text.md new file mode 100644 index 0000000000..d1266c5833 --- /dev/null +++ b/quest/m2/hang-04-text.md @@ -0,0 +1,48 @@ +# [S] hang-04 says which readers honor an entry version, and leaves overrun durations to the edge + +## Goal + +The hang-04 draft and its migration notes stop overpromising. An entry's +`version` gates only consumers of moq-hang-04 or later. A hang-03 reader reads +every entry and subscribes to its ID, so while hang-03 players matter a +publisher keeps a rendition's `track` equal to its ID. The HLS and DASH section +keeps the segment grid on `sync.interval` and the gap numbering, which every +edge must share. It stops prescribing how an edge lists an overrun group's +duration: that recipe moves to moq-hls's docs as gateway policy. + +## Plan + +Decided 2026-11-20 (maintainer, /quest-plan of a pre-cut audit of the lite-07 +and hang-04 wire changes): ✅ fix both (rejected: the version text only; +moving the whole HLS and DASH section out of the draft, since moq.pro runs +relays of two versions side by side and their edges must number segments +alike). + +Entry version: + +- `release`'s hang-03 draft has no catalog version rule, so a hang-03 reader + ignores `version` and `track`. The audit ran the released `@moq/hang` 0.5.4 + parser on `hd: {codec: "vp8", track: "hd-v2", version: 4}`: it kept a + playable `hd` and dropped both fields, so a player selecting it subscribes + to `hd`. +- In `drafts/draft-lcurley-moq-hang.md`, the Version section's "so an older + consumer still plays the rest of the catalog, including a compatibility + rendition beside the new one" holds only for consumers of -04 or later. Track + Identity's "A rendition MAY keep its ID and name the new track with `track`" + misleads a hang-03 player while one is in use. +- Put the rule in the -04 migration note too (`rs/hang/MIGRATE.md`, + `js/hang/MIGRATE.md`, or the PR's Impact section, following RELEASE.md). + +HLS overruns: + +- The draft's HLS section says "A group longer than the segment is listed at + its first line, so its duration understates its media, and the gaps after + it overstate theirs." Keep the grid, the numbering, and that an edge + tolerates an overrun. Move how its durations are listed to `doc/bin/hls.md`, + beside `rs/moq-hls/src/export/grid.rs`'s module docs, which already describe + it. +- There is no accurate alternative to build: an EXTINF above + EXT-X-TARGETDURATION is forbidden (RFC 8216 section 4.3.3.1), and the target + duration can't change within a playlist (section 6.2.1). + +Wire: none. Catalog JSON: none; the draft's text and the migration notes. diff --git a/quest/m2/lite07-finalize.md b/quest/m2/lite07-finalize.md index 430e9bc508..7f0b713170 100644 --- a/quest/m2/lite07-finalize.md +++ b/quest/m2/lite07-finalize.md @@ -213,6 +213,8 @@ the version that ships them. ## Required +- [No relative anchors](/quest/m2/time-addressing/no-relative-anchors.md) - SUBSCRIBE's anchors lose Relative, and Min Age places a live join +- [Group Streams carry each time once](/quest/m2/time-addressing/group-times.md) - GROUP loses Previous Start, FRAME's first delta counts from the start, and GROUP_END carries an end - [Cache-aware multicast](/quest/m2/multicast/README.md) - lite-07 carries the redesigned route layer: routes to forwarding nodes, no holds or doubt, claims crossing trust boundaries by a chain, and no Route Key ## Related diff --git a/quest/m2/time-addressing/group-end-whole.md b/quest/m2/time-addressing/group-end-whole.md deleted file mode 100644 index 25b6f0c1c2..0000000000 --- a/quest/m2/time-addressing/group-end-whole.md +++ /dev/null @@ -1,78 +0,0 @@ -# [M] lite-07's GROUP_END says only that a group is whole - -## Goal - -On lite-07-wip, GROUP_END drops its `End` field and stays a zero-length frame -meaning "this group is whole". A Group Stream that FINs without it carries a -closed, possibly partial group that failover may continue. A group's end -position lives only in hang's markers. moq-net ages a finished group with no -successor from its highest frame timestamp, and any other group from the next -group's start. Rust, `@moq/net`, and the moq-lite draft change together. - -## Plan - -Decided 2026-11-19 (maintainer, on closed -[moq-dev/moq#9192](https://github.com/moq-dev/moq/pull/9192) and this plan's -interview): - -- ✅ Drop GROUP_END's timestamp; hang keeps its in-band end markers on every - transport (rejected: readers infer stops from GROUP_END's position, as - #9192 did; keep the position but ignore it). Reason: the timestamp has no - moq-transport equivalent and saves only about a byte over hang's marker. -- ✅ Keep GROUP_END as a bare whole marker (rejected: drop GROUP_END - entirely, with FIN meaning whole). Reason: a FIN cannot tell a partial - group from a whole one. The draft lets a relay whose upstream closed - mid-group deliver the frames it holds and FIN, and failover continues that - group from another publisher; relay caching relies on knowing which copies - are whole. moq-transport's END_OF_GROUP is the same bit, so `ietf` maps it - one to one (`ietf/publisher.rs:7979` already sends END_OF_GROUP only for a - whole group). -- ✅ Aging: a finished group with no successor ages from its highest frame - timestamp; a group with a successor is bounded by the successor's start - (rejected: age from when the last byte arrived; never age it). The rule - ages up to one frame early, since frame durations are not on the wire. A - pause makes the next start overstate a group's reach, which only keeps it - a little longer; hang's markers give the player the exact end. - -Where the timestamp lives today: - -- Rust wire: `buffer_group_end` writes `varint(0)` then `varint(end)` - (`rs/moq-net/src/lite/publisher.rs:6432-6450`; call sites `:3300`, `:3330`, - `:6804`, `:6861`). Decode in `lite/subscriber.rs:1605-1609` and - `:1791-1814`, applied at `:1543` through `recv.rs:111-131` (`finish_at`). - The version gate `has_group_end` (`lite/version.rs:298-306`) also gates - GROUP's Previous Start; keep that. -- JS wire: `frameDecoder` in `js/net/src/lite/group.ts:165` (type at - `:122-125`, `readFrames` at `:189-215`), `groupEnd()` in - `js/net/src/lite/publisher.ts:144-146` (sent at `:2488-2490`, - `:2620-2621`), applied in `lite/subscriber.ts:2062`, `:2409`, `:3039`. -- API: `group::Producer::finish_at(end)` (`rs/moq-net/src/model/group.rs:2266`) - and `group::Consumer::end()` (`:4255`); JS `Producer.finishAt` and the - `Consumer.end` getter (`js/net/src/group.ts:729`, `:1028`, mirrors at - `:469`, `:783`). `finish_at` becomes a timestamp-free whole finish, and - `finish()` stays the closed one. Recommended name: `finish_whole()`, with - `Outcome::Finished` carrying a whole flag instead of an end. -- Callers outside moq-net: `rs/moq-mux/src/container/producer.rs:809` - (`close_group`), `container/consumer.rs:793-801` (feeds only - `presented_end`), `container/ts/recovery_test.rs:497`, `:941`, - `rs/moq-mux/tests/legacy_audio.rs:164`, `js/hang/src/container/legacy.ts:283-288`. -- Aging: Rust `rs/moq-net/src/model/track.rs` `reach` (`:2175-2179`), - `own_end` (`:2203-2205`), `ended_at` (`:2210-2214`), used by `superseded`, - `drifted`, `poll_drifted`, documented at `:2316-2321` and - `model/group.rs:2257-2264`; tests at `track.rs:14674`, `:18642`. JS - `js/net/src/track.ts:3243` (`#endedAt`), `:3252`, `:3280-3281`, `:3293-3295`. -- Draft `drafts/draft-lcurley-moq-lite.md`: group end states (183-187), the - relay's closed delivery (225), Fetch (637, 2016), reach (829-830), expiry - (842-843, 2000), Group Stream (871, 875-876), `Payload Length` 0 (2200), - the GROUP_END message (2220-2237), and the changelog (2354). The TLA model - mentions it in `rs/moq-net/verify/subscribe/SubscribeAccounting.tla` - (lines 18, 44, 175, 252). - -Tests: the GROUP_END codec round trip and fuzz (`subscriber.rs:4632`, -`:4651`, `publisher.rs:7285`, `fuzz/ingest.rs:388`) without the field; a -closed group still reads as partial and a whole one as whole across a relay; -the last group of a paused track ages out from its highest frame timestamp. -Run `just test interop --all`. - -Public API: breaking in Rust and JS (`finish_at` and `end()` on groups). -Wire: lite-07-wip only, which is unpublished. diff --git a/quest/m2/time-addressing/group-times.md b/quest/m2/time-addressing/group-times.md new file mode 100644 index 0000000000..1f49f61563 --- /dev/null +++ b/quest/m2/time-addressing/group-times.md @@ -0,0 +1,116 @@ +# [L] lite-07 Group Streams carry each time once, and GROUP_END the group's end + +## Goal + +On lite-07-wip, a Group Stream carries each time once: + +- GROUP keeps `Group Start` and loses `Previous Start`. +- The first FRAME's `Timestamp Delta` counts from the Group Start (on a Fetch + Stream, from the fetched group's start), so frame 0's delta is 0. +- A FRAME on a scale-less track has no `Timestamp Delta`; its time is its + group's start. +- GROUP_END carries the group's `End` as a delta from its highest frame + timestamp. + +A group's span runs from its lowest frame timestamp to its End and never +overlaps another group's span. The publisher names any span between one +group's End and the next group's start with SUBSCRIBE_SKIP: a discontinuity +that no group contains. Rust, `@moq/net`, the moq-lite draft, and the +subscribe model change together. + +## Plan + +Decided 2026-11-20 (maintainer, /quest-plan of a pre-cut audit of the lite-07 +and hang-04 wire changes). This reverses the 2026-11-19 decisions, made on +closed [moq-dev/moq#9192](https://github.com/moq-dev/moq/pull/9192), that made +GROUP_END a bare whole marker and aged a group with no successor from its +frames; [moq-dev/moq#9221](https://github.com/moq-dev/moq/pull/9221), which +implemented them, is closed. + +- ✅ GROUP_END keeps an end, as a delta from the group's highest frame + timestamp, 0 or more, or from Group Start in a group with no frame + (rejected: a bare whole marker; main's absolute End with its rule relaxed to + "at or above"; a delta from the last frame). The end lets a relay prove a + time falls inside a held whole group without its successor. It also ages a + group exactly when its successor is dropped. + - The base is the highest frame, not the last, because B-frames already send + timestamps backwards within a group (FRAME's delta is signed). A group's + duration is its End minus its lowest frame timestamp. + - A delta of 0 or more also fixes main's rule that End exceed every frame + timestamp. moq-mux broke that rule by writing hang's end marker at T and + finishing the group at T (`container/producer.rs` `close_group`). +- ✅ Previous Start goes, and gaps are covered by End (rejected: a Previous + Gap, as moq-transport's Prior Group ID Gap; a producer finishing a group at + its successor's start). For continuous audio and video, each successor + starts at the previous End and nothing is left to account for. + - ✅ The publisher always names a shortfall, [End, next start), with + SUBSCRIBE_SKIP when it creates the next group, as a discontinuity. In the + maintainer's words, that is "more correct than implying the previous group + contained those timestamps". The cases are a pause, a sparse-keyed data + track (one small SKIP per group), and a group closed without GROUP_END, + where the starts after its own up to the next are skipped. + - `track::Producer::append_group` already records that span as skipped. + The publisher's elision of skips that a GROUP's Previous Start passed over + (`lite/publisher.rs` `TrackRun::elided`) goes. +- ✅ GROUP keeps Group Start, and the first FRAME's delta counts from it. The + maintainer left this to whatever reads better (rejected: frame 0 carrying + the start, since a resumed stream with Frame Start above 0, and an unsent + group, have no frame 0; counting from the previous group's last frame, since + each stream must decode alone). It costs one byte per group over a GROUP + with no start. +- ✅ A scale-less FRAME carries no Timestamp Delta, as an uncompressed track's + carries no Inflated Size (rejected: its own timestamp, which nothing reads, + and which moq-archive's untimed format and libmoq would have to store; a + delta that must be 0). TIMESTAMP_MISMATCH's scale-less case goes. + - moq-transport Object IDs don't ride as frame timestamps. Group and object + numbers are separate spaces there, and an untimed track's Group IDs are + dense, so the `ietf` extension's Object Record keeps `Skip`. + +Recommended, for review: + +- A time inside a skipped span belongs to no group. A time start there begins + at the next group, and a time end there stops after the previous one. + Today's Time Anchor rule ("the group whose start is the highest at or below + it") changes to match. +- A cache proves a time inside a held whole group's span from that group + alone. +- Aging: a whole group's reach is its own End, and any other group's is + bounded by its successor's start, as today. +- With open-GOP leading pictures, a group's lowest frame sits below its + start. Check the Time Anchor rule against spans there, alongside + [groups never overlap](/quest/m3/groups-never-overlap.md). +- `group::Producer::finish_at(end)` and `group::Consumer::end()` stay, since + the end is what GROUP_END encodes. + +Where it lives: + +- Rust wire: `lite/publisher.rs` (`buffer_group_end`, GROUP encoding, + `Stamp`, `TrackRun::elided`, `previous_start`), `lite/subscriber.rs` + (`FrameIngest`, the GROUP decode, `IngestPhase::GroupEnd`), and + `lite/version.rs` (`has_group_end`, which also gates Previous Start). +- JS wire: `js/net/src/lite/group.ts` (`frameDecoder`, `readFrames`), + `js/net/src/lite/publisher.ts` (`groupEnd`, `wireTime`, the elided runs), + and `js/net/src/lite/subscriber.ts`. +- Aging: Rust `model/track.rs` (`reach`, `own_end`, `ended_at`) and JS + `js/net/src/track.ts` (`#endedAt`). +- Draft `drafts/draft-lcurley-moq-lite.md`: Frame, Group, Expiration (reach), + the Time Anchor, GROUP, FRAME, GROUP_END, SUBSCRIBE_SKIP, and the changelog. +- The subscribe model, `rs/moq-net/verify/subscribe/SubscribeAccounting.tla`, + models GROUP's Previous Start passing over skipped runs. Update it and run + `/verify-subscribe`. + +Tests: GROUP, FRAME, and GROUP_END codec round trips and fuzz; a resumed +stream (Frame Start above 0) and a Fetch Stream decode their first delta from +the group's start; a group with B-frames ends at a delta from its highest +frame; a pause and a sparse data track are named in SUBSCRIBE_SKIP while +contiguous groups send none; a group whose successor is dropped ages from its +own End. Run `just test interop --all`. + +Public API: none expected beyond moq-net internals. Wire: lite-07-wip only, +which is unpublished. + +## Related + +- [lite-07 has no relative anchors](/quest/m2/time-addressing/no-relative-anchors.md) - its live join resolves as a time start, which this changes inside a skipped span +- [A scale-less track ages by arrival](/quest/m2/time-addressing/scale-less-arrival.md) - lite-05/06 still stamp a scale-less frame, with its group's start +- [Groups never overlap](/quest/m3/groups-never-overlap.md) - enforces the non-overlap rule in hang's producers and importers diff --git a/quest/m2/time-addressing/late-relative-join.md b/quest/m2/time-addressing/late-relative-join.md deleted file mode 100644 index 629536f579..0000000000 --- a/quest/m2/time-addressing/late-relative-join.md +++ /dev/null @@ -1,34 +0,0 @@ -# [M] A later reader's relative start on a partial lite-07 copy reads only its groups - -## Goal - -A reader that joins a lite-07 received copy already holding part of the -track, with a relative start, reads the groups its publisher counts back to -and nothing below them, in Rust and `@moq/net`. Today it resolves the start -against the groups the copy holds before SUBSCRIBE_STARTED can report the -publisher's: over a copy holding groups 1 and 2 of 0..9, a second reader of -`[{relative:2..time:8}]` reads 1, 2, 7, 8, then 3, 4, 5 and on, where it -should read 7 and 8 and end. - -## Plan - -Found by [moq-dev/moq#9132](https://github.com/moq-dev/moq/pull/9132), which -reports each live range's relative start on the copy -(`TrackState::relative_starts` in `rs/moq-net/src/model/track.rs`) but only -helps a reader whose start resolves after the report lands: the first reader, -whose relative start waits on SUBSCRIBE_START. A later reader's window -resolves at once (`Window::new` in `model/subscription/window.rs`), and -`Holdings::back` counts the copy's cache. - -- Reproduce first: the second-reader case above, as a `range_anchors.rs` - integration test, and the same in `js/net/src/integration.test.ts`. -- Decided 2026-11-19 (coordinator, maintainer away, merge granted), taking - the recommendation: on a received copy, count back over the cache only where - the copy holds every group from the counted one to its latest (received - contiguously since it went live), and otherwise leave the relative start - waiting, as a time start waits (`Start::Waiting`), until the range's - SUBSCRIBE_STARTED reports it. Rejected: always waiting on the report, - since an update that coalesces the reader's range into another one - (`fit` in `lite/subscriber/fit.rs`) gets no SUBSCRIBE_STARTED of its own and would hang. -- The waiting reader must still settle when no report can come: the copy - ends, or its feed goes idle. diff --git a/quest/m2/time-addressing/no-relative-anchors.md b/quest/m2/time-addressing/no-relative-anchors.md new file mode 100644 index 0000000000..1ac3a464d2 --- /dev/null +++ b/quest/m2/time-addressing/no-relative-anchors.md @@ -0,0 +1,94 @@ +# [L] lite-07 has no relative anchors, and Min Age places a live join + +## Goal + +A lite-07 subscription starts at a time, a Position, or no anchor, and ends at +a time or not at all. The Relative anchor leaves the wire, the Rust and +`@moq/net` range API, moq-ffi, libmoq, and every binding. A live join is a +range with no start anchor and a stated Subscriber Min Age (`Delay::min`). +The serving hop starts it at the group containing its live edge minus the Min +Age. A relay copy that can't prove that group from its cache asks upstream and +waits, as a time start does. The join then delivers the same groups from a +relay copy as from the origin. + +## Plan + +Decided 2026-11-20 (maintainer, /quest-plan of a pre-cut audit of the lite-07 +and hang-04 wire changes): + +- ✅ Remove relative anchors, as both starts and ends (rejected: relative + starts only; ends reported in SUBSCRIBE_OK and SUBSCRIBE_STARTED, as + [moq-dev/moq#9198](https://github.com/moq-dev/moq/pull/9198)'s follow-up + recommended; ends inferred from accounting). A count of groups back + resolves against whatever the serving hop holds. A copy holding groups 2 + and 9 of 0..9 counts one back to 2, while the origin counts to 8, and no + message reports where an end resolved. Only tests used a count above 0; + production used only `Range::live()`, which is Relative 0. +- ✅ A live join is no start anchor plus Subscriber Min Age (rejected: a + dedicated Live anchor type). In the maintainer's words, it is "literally + called min age": the subscriber says how far behind the live edge it plays, + and that is where it starts. +- ✅ A hop fills to reach a live join's start (rejected: the draft's "starts + from what it holds and never fetches"). It resolves the start as a time + start at its live edge minus the Min Age. It answers from its cache only + what it can prove upstream would answer; otherwise it asks upstream and + waits. A copy that has been live since a reader with an equal or larger Min + Age already holds those groups, so a join waits only for a larger Min Age or + an evicted group. +- Consequence, recorded for review: with no start anchor, an unstated Min Age + means as far back as Max Age allows (today's `Range::oldest()`), and a + stated zero means the latest group. A relay forwarding several + subscriptions carries the largest Min Age, counting "not stated" as the + largest. An oldest reader merged with a live reader still gets its backlog, + which the draft's "carry the largest stated value, and not stated when none + is" would cut off. +- Closed: [moq-dev/moq#9198](https://github.com/moq-dev/moq/pull/9198), whose + upstream asks resolved relative starts on a copy, and its late-relative-end + follow-up. + +Recommended, for the implementer: + +- `Range::live()` and JS `LIVE` go: a live join is the default range with + `Delay::min` set. A range's end becomes a time type, so a non-time end + can't be written; today an `Oldest` end is refused at runtime. +- A scale-less track measures Min Age by arrival, which differs per hop. + Measure it at the hop that answers, and have a copy ask upstream when its + arrivals don't reach back far enough. +- moq-transport: a live join maps to the filter `Range::live()` maps to + today. A third-party subscriber's relative joining FETCH or relative start + filter (`ietf/filter.rs` `Filter::Relative`): serve a count of 0 as a live + join with a Min Age of zero, and refuse a larger count with NOT_SUPPORTED. + Counting back by Group ID means nothing on a time-keyed track, and AGENTS.md + keeps moq-transport compatibility low-effort. + +Where it lives: + +- Draft `drafts/draft-lcurley-moq-lite.md`: SUBSCRIBE's Anchor Type + (Relative goes; renumber freely, since lite-07-wip is unpublished), "The + publisher resolves a Relative or Time Anchor", the live-join paragraph, + Subscriber Min Age's relay rule, the whole-group rule naming Relative, and + the changelog. `doc/concept/moq-lite.md` says the same for users. +- Rust: `model/subscription.rs` (`Anchor`, `Range::live`, `Delay`), + `model/subscription/window.rs` (`end`, `Holdings::back`), `model/track.rs` + (`TrackState::relative_starts`, `Feed::Live`'s counting), `lite/subscribe.rs` + (anchor codec), `lite/subscriber/fit.rs` (merging relative ranges). +- JS: `js/net/src/track.ts` (`Anchor`, `Range`), `js/net/src/window.ts` + (`LIVE`, relative handling), `js/net/src/ranges.ts`, `js/net/src/lite/`. +- Callers of `Range::live()`: moq-audio, moq-cli `play`, moq-mux, moq-transcode, + moq-video, and libmoq `consume.rs`. +- Bindings: moq-ffi `MoqAnchor::Relative` and libmoq `MOQ_ANCHOR_RELATIVE`, + with every wrapper together. + +Tests: a live join whose Min Age reaches past what a copy holds reads the +same groups from the copy as from the origin, and the copy asks upstream; an +oldest reader and a live reader on one relay each get their own start; an +anchor type the draft no longer assigns is a PROTOCOL_VIOLATION. Run +`just test interop --all`, since the wire and moq-ffi change. + +Public API: breaking in Rust, JS, moq-ffi, libmoq, and the bindings. +Wire: lite-07-wip only. + +## Related + +- [Latest readers join live by their Min Age](/quest/m4/readers-range-live.md) - the readers that floor at the largest group move to this join +- [lite-07 Group Streams carry each time once](/quest/m2/time-addressing/group-times.md) - a time inside a skipped span belongs to no group, which changes where a time start lands diff --git a/quest/m2/time-addressing/scale-less-arrival.md b/quest/m2/time-addressing/scale-less-arrival.md new file mode 100644 index 0000000000..5e2efda74c --- /dev/null +++ b/quest/m2/time-addressing/scale-less-arrival.md @@ -0,0 +1,54 @@ +# [M] A scale-less track ages by arrival, and lite-05/06 stamp its group's start + +## Goal + +On a scale-less track (no timescale), Max Age expiry uses arrival age alone, +in Rust, `@moq/net`, and the lite-07 draft: group starts are bare numbers and +never count as milliseconds. Over lite-05/06, which can only declare +milliseconds, Rust and JS both stamp a scale-less frame with its group's bare +start, so a frame carries the same timestamp on every path and every fetch. +One shared byte fixture pins that encoding for both languages. + +## Plan + +Decided 2026-11-20 (maintainer, /quest-plan of a pre-cut audit of the lite-07 +and hang-04 wire changes): + +- ✅ Arrival age only (rejected: counting key gaps as milliseconds). A + sequence-keyed track would otherwise expire by how many groups passed: keys + 0, 10000, and 20000 arriving together already expire group 0 under a 5 ms + budget (Rust `a_scale_less_track_ages_wide_keys_by_their_distance`). +- ✅ The bare start on lite-05/06 in both languages (rejected: the send time + in both). A send time stamps the same frame differently at each relay and on + each later fetch, which breaks the identity rule in AGENTS.md. + +This matches what the rest of the code base already says. The draft measures +Min Age by arrival on these tracks, Rust's `track::Info::max_age` doc says an +untimed track is judged by the wall clock alone, and +`drafts/draft-lcurley-moq-timestamp.md` does the same for untimed moq-transport +tracks. Only Max Age disagrees. + +Where it lives: + +- Draft `drafts/draft-lcurley-moq-lite.md`, Expiration: "On a scale-less + Track, timestamp age counts bare units as the milliseconds of a Max Age." +- Rust `rs/moq-net/src/model/track.rs`: the scale-less edge and drift paths + (the docs that say "its max age counts bare units") and the test above. +- JS `js/net/src/track.ts`: the live edge and reach that count a scale-less + track's bare starts as milliseconds. +- The bridge: Rust `lite/publisher.rs` `Stamp::wire` already sends the bare + value; JS `lite/publisher.ts` `wireTime` stamps `Timestamp.now()` for a + scale-less track on lite-05/06, which changes. +- `track::Info`'s `unchecked` (a lite-05/06 copy skips the rewind check + because untimed origins stamped send times) likely stays, since released + publishers still do. + +Tests: arrival-age expiry on a scale-less track whose starts jump; the +lite-06 bytes of a scale-less frame match the shared fixture in Rust and JS. + +Public API: none; a behavior change. Wire: no byte change; lite-07-wip expiry +semantics, and a scale-less frame's lite-05/06 timestamp in JS. + +## Related + +- [lite-07 Group Streams carry each time once](/quest/m2/time-addressing/group-times.md) - a scale-less FRAME stops carrying a timestamp on lite-07; lite-05/06 still need this one diff --git a/quest/m3/groups-never-overlap.md b/quest/m3/groups-never-overlap.md index f3b0312c18..2e05c24f37 100644 --- a/quest/m3/groups-never-overlap.md +++ b/quest/m3/groups-never-overlap.md @@ -60,5 +60,5 @@ Public API: none expected. Wire: none; the draft's group rule tightens. ## Related -- [GROUP_END is a bare whole marker](/quest/m2/time-addressing/group-end-whole.md) - a finished group with no successor ages from its highest frame timestamp, which this rule keeps below the next start +- [Group Streams carry each time once](/quest/m2/time-addressing/group-times.md) - lite-07 states that a group's span, from its lowest frame to GROUP_END's end, never overlaps another's; this quest makes hang's producers and importers keep it - [An fMP4 group start never rewinds the decode timeline](/quest/m3/fmp4-group-start-tfdt.md) - a keyframe repeating its predecessor's timestamp would now continue the group; check which of its cases remain diff --git a/quest/m4/readers-range-live.md b/quest/m4/readers-range-live.md index fdace3f251..516c66cac8 100644 --- a/quest/m4/readers-range-live.md +++ b/quest/m4/readers-range-live.md @@ -1,20 +1,24 @@ -# [S] Latest readers subscribe with a relative range +# [S] Latest readers join live by their Min Age ## Goal The readers that wait for the largest group and raise their floor to start near it (moq-audio, moq-video, and `@moq/room` chat) -subscribe with a relative range instead, with no change in what they play: -`Range::live()` for a start at the newest group, and a relative start for a -reader that looks back, such as moq-video's warmup lane, which keeps its -one-group lookback so the preceding intra-refresh group still decodes. +join live by their Min Age instead (`Delay::min`, with no start anchor), with +no change in what they play. A reader that looks back states a larger Min Age, +such as moq-video's warmup lane, which keeps its one-group lookback so the +preceding intra-refresh group still decodes. `moq play` drops its floor entirely and starts where its consumers' `Delay` puts them. ## Plan -Since [moq-dev/moq#6278](https://github.com/moq-dev/moq/pull/6278), -`Range::live()` starts at the live edge on a warm relay copy too. +Changed 2026-11-20 (maintainer, /quest-plan of a pre-cut audit of the lite-07 +and hang-04 wire changes): lite-07 has no relative anchors, and a live join is +no start anchor plus a stated Min Age, filled from upstream when a copy can't +prove its start ([no relative anchors](/quest/m2/time-addressing/no-relative-anchors.md)). +This quest's relative ranges became that join. `Range::live()`'s callers move +with the anchor's removal; these readers never used it. Decided 2026-11-01 (maintainer, follow-up planning after the 2026-11-01 /quest-afk run): `moq play` drops its one-group `lookback` range floor and @@ -27,7 +31,7 @@ does. That start already decides where each decoder reads from, so the `largest().await` plus `with_range(largest.group.saturating_sub(lookback)..)` floor (and its copy in `play/video.rs`'s test helper `join`) is a second start rule; #7311 kept it only to bound how long the refresh decoder's -start reach waits. Delete it rather than convert it to a relative range. +start reach waits. Delete it rather than convert it to a live join. Check that the reason in its comment still holds without it (a warm relay copy waiting on its source must not replay its backlog), and that the refresh decoder still starts on the group below the live edge.