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
6 changes: 4 additions & 2 deletions quest/m1/ts-reliability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ two outages); state stays bounded by the track count, and the extra flag
lands where loss happened. Not chosen: keeping every loss until all tracks
pass it (unbounded while a track stalls); collapsing losses older than the
release point minus the delay (more code, and assumes muxing in release
order).
order). Reversed the same day: the planned
[PCR jump flag](/quest/m1/ts-reliability/pcr-jump-flag.md) removes the
per-track loss tracking.

PMT fragmentation (#5220), initial mux-rate measurement (#5287), and
decoder-time admission (#5306) have landed, as have PSI runs (#5606) and
Expand All @@ -134,8 +136,8 @@ catalog linger (#5305).
## Required

- [A CBR import's muxRate can't stick low](/quest/m1/ts-reliability/mux-rate-raise.md) - a stable window above the published rate raises it, and an export's deadline miss names the rate it needed
- [The TS export flags a PCR only where its clock jumps](/quest/m1/ts-reliability/pcr-jump-flag.md) - a padded skip goes out unflagged; a schedule that skips slots flags the jump

## Related

- [MSFTS mapping](/quest/m3/msfts-convergence.md) - document the exact equivalence and differences between the carriage modes

44 changes: 44 additions & 0 deletions quest/m1/ts-reliability/pcr-jump-flag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# [S] The TS export flags a PCR only where its clock jumps

## Goal

`moq export ts` sets `discontinuity_indicator` on a PCR exactly when the
time base it asserts breaks: a declared switch, as today, or a schedule that
skips empty slots so the PCR jumps past the bytes between. A delivery skip the
schedule pads on a continuing clock goes out unflagged, a gap in the programme
and not a new time base.

## Plan

Reported in [moq-dev/moq#7965](https://github.com/moq-dev/moq/issues/7965),
a correction to [moq-dev/moq#7741](https://github.com/moq-dev/moq/issues/7741):
in a live relay-kill run the export padded a 7 s outage with nulls on an
unbroken 25 ms PCR grid, and every PID's DTS kept its offset to the PCR. So
[moq-dev/moq#7785](https://github.com/moq-dev/moq/pull/7785), which flags
every delivery skip, declared a new time base equal to the old one there.
Verified against `main`: the claim holds for holes the schedule pads, but
`Schedule::index` (`rs/moq-mux/src/container/ts/schedule.rs`) skips the
empty slots of a gap longer than `BACKFILL` (1 s), and that PCR does jump.
`a_skipped_group_flags_the_clock` runs 6 s holes through that path.

Decided 2026-11-05 (maintainer, /quest-import of #7965):

- ✅ Flag real jumps only: derive the flag from the schedule, set on the first
PCR after it skips slots, whatever caused the gap, so a source stall with
no delivery skip is flagged too. Delete #7785's per-track loss tracking
(`Track::{gap, last_timestamp, lost}`, `coalesce`, `Queued::gap`,
`PesUnit::skipped`, `Schedule::{gap, skip}`), and the 2026-11-05
coalescing decision in the epic README goes with it. Not chosen: keeping
the flag as a skip marker and rewording its docs (it misstates the time
base); reverting #7785 (a hole past the backfill would again carry an
unflagged PCR jump); won't fix.
- ✅ m1, in the TS reliability epic.

Rework the tests to match: holes the schedule pads carry no flag and keep the
PCR's repetition health clean; holes past the backfill carry one flag each on
the first PCR after the jump. Fix `doc/bin/cli.md` and `test/ts/README.md`,
which describe the skip flag.

## Closes

- [#7965](https://github.com/moq-dev/moq/issues/7965) - `export ts`: the skip #7741 reported keeps its clock