Repository navigation
Conversation
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
t0ms
force-pushed
the
quest/m1/ts-reliability/pat-lifecycle
branch
from
October 22, 2026 13:22
00c9ea5 to
95fa533
Compare
A frame held across a generation boundary follows its track to a newly recorded PID, and a PID the PMT leaves reads as gone, not quiet, until a stream returns on it. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
t0ms
force-pushed
the
quest/m1/ts-reliability/pat-lifecycle
branch
from
October 22, 2026 14:12
95fa533 to
651405a
Compare
…ts program descriptors Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
t0ms
force-pushed
the
quest/m1/ts-reliability/pat-lifecycle
branch
from
October 22, 2026 15:31
651405a to
44436bb
Compare
…ed track keeps only its own descriptors, and the PMT keeps its PID Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
t0ms
force-pushed
the
quest/m1/ts-reliability/pat-lifecycle
branch
from
October 22, 2026 16:40
44436bb to
bf581d6
Compare
…criptor sets give way past a section, stale tracks retire once their PID is taken, and a switch follows the last PMT laid Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
t0ms
force-pushed
the
quest/m1/ts-reliability/pat-lifecycle
branch
from
October 22, 2026 17:30
bf581d6 to
a87e0eb
Compare
…treams too many for a section end, withdrawn idle tracks go, a listed track keeps its descriptors, and a takeover counts its silence from its listing Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
t0ms
force-pushed
the
quest/m1/ts-reliability/pat-lifecycle
branch
from
October 22, 2026 19:19
a87e0eb to
ecc0961
Compare
Collaborator
|
Closing this for now; the branch stays on your fork. Two things moved under it:
The quest file on (Written by Claude Opus 5.5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A live TS source's PAT can change mid-stream. Today:
program.pmtPidon the old PID. The export writes the PMT where it first did.--program all, a program a later PAT adds is ignored, without a warning.Import. The removed program'shandle_paterrors and the whole multiplex stops, including the programs still listed.Consumer:
moq import ts|srt --program allon a contribution MPTS whose services come and go (a pop-up channel, a part-time feed), and any source whose re-mux moves a PMT.Approach
The last of the three PRs for the PMT/PAT lifecycle quest,
quest/m1/ts-reliability/pat-lifecycle.md(deleted here), as decided there:program.pmtPidin place.program.pmtPidchanges, the export emits a PAT at the nextversion_numbernaming the new PID. Every queued PAT and PMT copy that has not started out takes the move, as fix(mux): the TS export follows a PMT revision at the next version #6289's revisions do, and a copy whose PAT has started out keeps its PMT on the PID that PAT names. A PAT version counts once laid, as the PMT's does there, and a switch to another instance follows the last PAT version laid. A track the catalog records on the old PID as it moves takes another, since the PMT still holds it then. If the new PID is in use (a track, the PCR or SI), it keeps the PMT where it is and warns. Under--syncthe tables stay as laid.Programsreads every PAT itself. It cuts the input at a PAT that changes the program set, so a removed program never sees the PAT that removed it:A single-program import whose program leaves the PAT still ends.
PMT_error_2is graded on the program clock, which a program without a PMT doesn't have yet. The alternatives are below.stats()still covers the whole input.pmtPidchanges in place on a moved PMT. A consumer rebuilding a stream emits a PAT at the nextversion_numbernaming the new PID, and never emits the PMT on the new PID before that PAT or on the old one after it. There is a changelog line too.Tests
Seven tests. Five fail on the base (#6289's head), one pins the decided wait, and one the switch after a move:
import::a_moved_pmt_is_followed: the catalog'spmtPidfollows the PAT, and a stream the PMT adds on its new PID is published.programs::programs_follow_the_pat: the PAT adds program 2, drops it, then restores it. Program 1 runs throughout and its stats count every frame. Program 2 publishes when added, its broadcast closes when dropped, and its return gets a new epoch.programs::a_dropped_program_does_not_end_the_multiplex: the same, fed a packet at a time.programs::a_program_without_a_pmt_waits_unannounced: the listed program with a PMT is announced, the other is not, and the import doesn't fail. It passes on the base, which already waited; this test makes the decision explicit.revision_test::a_moved_pmt_moves_behind_a_new_pat, on a live export: PATs at versions 0 then 1, nothing on the new PID before the moving PAT and nothing on the old one after it, and the PMT layout on the new PID round-trips.revision_test::a_pmt_moved_before_its_tables_go_out_moves_every_copy, throughfixture::Mux, where every copy is still queued at the move: one PAT, at version 0, naming the new PID, and nothing on the old. Without the rewrite, two version-0 PATs name different PIDs.export_test::a_switch_follows_the_last_pat_out: a move with nothing left to carry it, then a switch to another instance, with PATs at versions 0 then 1. It passes on the base, which never moves the PMT; without the seeding, they go out at 0 then 2.#6289's
a_track_recorded_on_the_pmt_pid_after_the_catalog_moves_it_takes_another, whose PMT stays put, becomesa_track_recorded_on_the_pid_the_pmt_moves_from_takes_another: the PMT moves behind PAT version 1, and the track takes neither PID.Impact
moq import ts|srt --program all: follows the PAT instead of ignoring additions or stopping on a removal.moq export ts: follows a moved PMT.program.pmtPidcan now change within a broadcast's life.Alternatives
PMT_error_2against a sibling program's clock. Either one makes the wait observable. The first can end a feed whose PMT is merely late; the second makes one program's health depend on another's clock. Waiting matches what the base does and costs nothing until the PMT arrives.Stacking and overlaps
Built on #6289, rebased with it onto
mainnow that #5949 (--sync) has merged, so its diff includes #6289's commits until that merges. It stays a draft until then and rebases ontomainafter. #6276 (exporters follow a moved rendition) changes the same TS export paths.Gate
just fix, thenjust ci's steps one by one on macOS: lint is clean, and 3,629, 475 and 222 tests pass. The rest fail onmainor the host.bun install's postinstall for@moq/libav(#6243) fails to build ffmpeg under Nix here, sobun installran with--ignore-scripts; the drafts and markdown checks then pass. In the JS suite, whichtest/ts/widens to every package, only tests that need that build fail (@moq/hang's AAC fallback and 10@moq/watchtests), as on #6289.bench/relay.test.pyfails because its fake process asserts--durationis absent. Theplaybuild's__eh_framelinker warning is denied bybuild.warnings; the next step builds the samemoq-clibinaries withplayand passes.Decisions needed
(Written by Claude Opus 5.5)