Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
d2fc101
chore(quest): claim quest/m1/hls-reinit-same-codec.md
kixelated Oct 31, 2026
4184a1f
docs(quest): record same-codec HLS reproduction blockers
kixelated Oct 31, 2026
b668ff0
Merge remote-tracking branch 'origin/main' into iter-7436
kixelated Oct 31, 2026
24785de
docs(quest): rerun same-codec HLS case with a repaired fixture
kixelated Oct 31, 2026
a5652c6
fix(hls): keep a reconfigured rendition's segments in its playlist
kixelated Oct 31, 2026
86214cd
style: rustfmt
kixelated Oct 31, 2026
4988eb5
fix(hls): bound and route a reconfigured rendition's predecessors
kixelated Oct 31, 2026
e392601
fix(hls): release predecessors on a consistent window read
kixelated Oct 31, 2026
e3b81a9
Merge remote-tracking branch 'origin/main' into hls-reinit-iterate
kixelated Nov 2, 2026
1375b50
docs(quest): rewrite the same-codec hand-over quest to what remains
kixelated Nov 2, 2026
f2bd6f3
fix: build moq-hls tests and moq-relay without warnings on main's lints
kixelated Nov 2, 2026
3b49f04
fix(hls): never bridge a numbering jump, serve cached predecessor ini…
kixelated Nov 2, 2026
cd87090
fix(hls): authorize only the instance supplying a requested init
kixelated Nov 2, 2026
b83bd44
Merge remote-tracking branch 'origin/main' into hls-reinit-iterate
kixelated Nov 2, 2026
9485ecb
Merge remote-tracking branch 'origin/main' into iter-7436-r3
kixelated Nov 2, 2026
7326d3c
fix(hls): serve inherited segments before the replacement's own init
kixelated Nov 2, 2026
6b51630
fix(hls): wait for a replacement's own segment before a DASH manifest
kixelated Nov 2, 2026
22f6e32
Merge remote-tracking branch 'origin/main' into iter-7436-r3
kixelated Nov 2, 2026
33c7a8f
quest land: merge tested base
Nov 2, 2026
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 doc/bin/hls.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ What that means for you:
- **Live joins cost the window.** The exporter reads the record checkpoint and lists at most 256 segments.
- **Segments are timed by their records.** A segment is listed once the record after it arrives, and its duration, its DASH `t` and `d`, and its last sample's duration all come from its own record and the next, so a segment's bytes never change with a catalog estimate. A stop record (a break or the end of the content) is listed as a zero-length gap, and what follows it starts a discontinuity.
- **The target duration is declared.** Every media playlist keeps one `EXT-X-TARGETDURATION` while its rendition stays in the catalog, even across a reconfigure: the longest segment duration the broadcast's first renditions declare, rounded up. A rendition added later that declares longer segments gets a larger target of its own, while playlists already served keep theirs. A rendition removed and re-added gets the target its declared duration gives, so keep a rendition's declared duration fixed for the run. A GOP longer than the target, once rounded, is still listed rather than dropped or split, against RFC 8216's rule: hls.js plays it, but Apple's `mediastreamvalidator` flags it, so keep keyframe intervals within the declared duration.
- **A reconfigure keeps the playlist.** A rendition whose decoder config changes (its resolution, say) keeps its media playlist: the segments already listed stay, under the init they were muxed for, and the new config's segments follow behind an `EXT-X-DISCONTINUITY` and a new `EXT-X-MAP`, as RFC 8216 requires. The DASH manifest lists only the new config's segments.
- **Disabled renditions are hidden.** A rendition the catalog marks `enabled: false` leaves the multivariant playlist and DASH manifest until it re-enables. Its media playlist keeps serving, so a player already on it is not ended with `EXT-X-ENDLIST`.
- **URLs name the stream.** Every URL the multivariant playlist and DASH manifest list sits under `@<instance>`, the stream's instance, so every edge and every reload derive the same URLs and a CDN in front of export caches them. A restarted publisher gets URLs of its own, whose numbering starts over. The multivariant playlist and manifest switch to it at once, while the old stream's playlists end at the segments they listed before the switch, even if its publisher keeps sending; a player already on it plays those out and then has to reload the multivariant playlist. A stream that reached export over moq-lite-06 or older, or moq-transport, has an instance its session minted, so only that export serves its URLs.
- **Only a clean finish ends a playlist.** `EXT-X-ENDLIST` and a `static` DASH manifest mean the records finished, or, on a replaced stream's media playlists, that another publisher took the broadcast over. A rendition whose records fail instead, such as a publisher dropping its session, answers HTTP 500 with `Cache-Control: no-store`, so a truncated recording never looks complete, and leaves the multivariant playlist and DASH manifest so players switch to a sibling. With none left, the DASH manifest answers the error too.
Expand Down
2 changes: 1 addition & 1 deletion quest/m1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ per-frame CPU growth since #5926.
- [A follower is told when the serving instance's route leaves](/quest/m1/instance-leave-restart.md) - wire-level tests pin the restart a follower gets when the serving instance's route is withdrawn or dies while another instance's remains
- [Poll-first async](/quest/m1/poll-first/README.md) - library crates compile no coroutines by default: async wrappers are generated from `poll_*` and gated behind an `async` feature
- [Authored tracks default to a 30 s max-age](/quest/m1/max-age-defaults.md) - raw and media tracks advertise 30 s unless their author chooses otherwise, with explicit unlimited in every binding
- [HLS export follows a resolution change](/quest/m1/hls-reinit-same-codec.md) - a decoder-identity change under the same codec string starts a new init and segment tag
- [HLS export lists a same-codec reconfigure's first group under the new init](/quest/m1/hls-reinit-same-codec.md) - the hand-over pick, whichever of the catalog and the records arrives first, after the catalog `hls` removal is planned
- [moq-quic deletes its remaining 0-RTT code](/quest/m1/quic-zero-rtt-leftovers.md) - only the code that drops a 0-RTT packet remains, with a test
- [Gate the no-em-dash rule](/quest/m1/em-dash-gate.md) - `just check` fails on an em dash in any tracked text file
- [Every package shares one minor version](/quest/m1/shared-version.md) - a recipe sets every published package to one minor at the cut (next: 0.22.0), and `just check` enforces it and the `0.0.x` rule for experiments
Expand Down
2 changes: 1 addition & 1 deletion quest/m1/hls-conformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ own quest below.

## Required

- [HLS export follows a resolution change](/quest/m1/hls-reinit-same-codec.md) - the conformance test's same-codec switch fails until it lands
- [HLS export lists a same-codec reconfigure's first group under the new init](/quest/m1/hls-reinit-same-codec.md) - the conformance test's same-codec switch fails until it lands

## Related

Expand Down
14 changes: 9 additions & 5 deletions quest/m1/hls-reinit-same-codec.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# [M] HLS export follows a resolution change under the same codec string
# [M] HLS export lists a same-codec reconfigure's first group under the new init

## Goal

When a rendition changes resolution (or any other decoder-affecting field) while keeping its codec string, the HLS and DASH export starts a new init segment and segment tag for it, so every served segment decodes under the init it is listed with, the rendition's first segments are listed, and its recording cursor keeps up.
When a rendition changes resolution (or any other decoder-affecting field) while keeping its codec string, the first group after the change is listed under the new init and segment tag, whichever of the catalog and the HLS records reaches the export first.

The conformance test in [moq-dev/moq#7387](https://github.com/moq-dev/moq/pull/7387) is the end-to-end regression test: its `video1` same-codec switch must pass.

## Plan

Found by the conformance test in [moq-dev/moq#7387](https://github.com/moq-dev/moq/pull/7387): after `video1` switches from 320x180 to 480x270 with the same codec string, the export keeps the old segment tag and init. The 480x270 segments are served under the 320x180 init with no in-band parameter sets, so they don't decode, that rendition's first segments are never listed, and its recording cursor fails with `RecordingLagged`. When the codec string also changes, the importer makes a new rendition name and everything passes.
Found by the conformance test in [moq-dev/moq#7387](https://github.com/moq-dev/moq/pull/7387). The export already replaces the instance on a decoder-identity change (the same fields hang's `same_identity` compares, plus geometry), and since [moq-dev/moq#7436](https://github.com/moq-dev/moq/pull/7436) the playlist keeps the retired instance's segments, under their own init, ahead of the replacement's behind a discontinuity (RFC 8216 6.2.2).

What remains is the hand-over race. The catalog and the records are separate tracks, so the new config's first group can reach the old instance's records watcher before the catalog update. The retiring instance claims it, so it is muxed under the old init and the replacement starts one group late.

Decided 2026-10-30 (maintainer, follow-up planning after the /quest-afk run). Treat a change of the rendition's decoder identity (the same fields hang's `same_identity` compares) as a new instance in the export, as a codec-string change already is. Reuse the existing instance-replacement path rather than adding a second one. The conformance test's `video1` case is the regression test; it must pass with the same-codec switch restored.
Waiting on a plan: the maintainer decided on 2026-11-02 to remove the catalog's `hls` field (`rs/hang/src/catalog/hls.rs` and the JS zod schema), planned separately. That changes how the export finds a rendition's records, so the hand-over pick is designed after that plan, not with a catalog `start` field, a record track per config, or a marker in each record (all three dropped the same day). Once the removal is planned, add it under `Required` here or fold the pick into it.

Public API: none. Wire: none.
Public API: none expected. Wire: decided by the removal plan.

## Related

Expand Down
Loading
Loading