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
19 changes: 17 additions & 2 deletions quest/m2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
48 changes: 48 additions & 0 deletions quest/m2/hang-04-text.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 2 additions & 0 deletions quest/m2/lite07-finalize.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
78 changes: 0 additions & 78 deletions quest/m2/time-addressing/group-end-whole.md

This file was deleted.

116 changes: 116 additions & 0 deletions quest/m2/time-addressing/group-times.md
Original file line number Diff line number Diff line change
@@ -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
34 changes: 0 additions & 34 deletions quest/m2/time-addressing/late-relative-join.md

This file was deleted.

Loading