Repository navigation
test(ts): grade the passthrough export packet by packet against its source - #5856
Conversation
…ource A reusable oracle places every object a raw TS release writes at its exact position in the admitted source interval and checks it goes out on the source's PCR schedule, so a missing object leaves its time behind. Fixtures cover null and unknown PIDs, tables, adaptation stuffing, a split PES, the PCR wrap and an MPTS with unaligned recovery points, plus skipped and cut groups. The TS harness gains a --passthrough arm (and --mpts) graded by passthrough.py: every captured packet must be the source's in place, and every compliance check must grade the capture as it grades that interval of the source. CI runs it on the generated clip, a T-STD-passing capture and an MPTS, and nightly over 1% loss. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Outcome from the quest run: the quest's acceptance is covered except counting omitted groups, which waits on (Written by Claude Opus 5.5) |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@coderabbitai review (Written by Claude Opus 5.5) |
|
|
Merge summary: this adds a test-only checker ( Settled decisions (the maintainer chose the recommended option on each): counting omitted groups moves to the recovery quest behind #5849; compliance is graded against the source; a gap fails the harness, Review: Codex found nothing on (Written by Claude Opus 5.5) |
Problem
export ts --passthroughlanded in #5349 with local byte and timing checks. The TS passthrough export quest still needed: a reusable packet/position and release-schedule oracle, fixtures the captures don't carry, deterministic group omissions, a T-STD verdict check on output against input, automated TSDuck/FFmpeg runs, and a nightly impairment test. Nothing intest/tsexercised passthrough.Approach
Rust (merge gate, paused clock)
ts/oracle.rs(test-only):Admittedplaces the published objects on the source and reports the acquisitionprefix.gradechecks that each released object is the source's packets at its exact position, in order, stamped as published, never duplicated, and opened on a group's first object. It also checks each object goes out within 1 ms of its PCR time on one clock, so a gap leaves its time behind. It returns which objects are missing.ts/fixture.rs: theMuxbuilder moved out ofpassthrough_test.rs, plusassortedandmpts.assortedcarries a clock-only PID, PSI and SDT, a PES split across PCR intervals, adaptation stuffing, nulls, an unlisted PID, and the PCR wrap.mptshas two programs on their own clocks with unaligned random access points.release_test.rs: the existing tests now grade through the oracle. New tests: the fixtures, a group never delivered, and a group cut short (abortedOld).Harness
just test ts --passthrough(and--mpts, two ffmpeg programs with keyframes every 25 and 40 frames).just test ts-passthrough-captureruns it on the in-repo Kyrion capture, which passes T-STD.test/ts/passthrough.pymaps every captured packet to its source position. A position is only claimed after a 16-packet match, so a duplicated null cannot pass as a later one. It reports the prefix and any gaps by PID. On a complete capture, everycompliance.pycheck (TSDuck structure, T-STD, system buffers) must give the capture the verdict it gives the admitted interval.decode.pythen runs for the generated clip. Unit tests are inpassthrough.test.py.--passthrough --loss 1 --duration 120.Measured locally on a loaded shared host:
Impact
--passthroughand--mptsare new.doc/bin/cli.mdalready documents the flag (feat(mux): export ts --passthrough writes the m2ts track back on a fixed delay #5349).Decisions
Settled by the maintainer, each on the recommended option:
Release::stats().gapslands. This PR adds no duplicate counter.droppedalready counts late objects.--lossincluded, asholes.pygates the demux lossy arm.passthrough.py --loss-okgrades a high-loss capture by hand.Alternatives
Follow-ups
test/ts/README.mddescribes. Carrying null padding makes this worse; that belongs to the BBR study.out_of_tolerancerising every 2 s on a clean loopback path. Worth a look under clock recovery.--passthrough --live) is not wired up; release timing is covered by the paused-clock Rust tests.(Written by Claude Opus 5.5, updated by Claude Opus 5.5 to record the settled decisions)
🤖 Generated with Claude Code