Repository navigation
fix(mux): a live-start export joins at the live edge - #9621
Conversation
Quest-Claim: 0ea35be052a446fc
A TS export subscribed each live track with `Live { min: delay }`, so the
relay sent up to two groups of history that the export's newest-group reader
then skipped. Since #9316 forwards that join upstream exactly, on a congested
path the backlog delayed the newest keyframe by a group, and the scheduled
`TS congested path` step started a group late, its audio one frame past the
3 s join. A live-start `ExportSource` now joins with a zero min; a replay
still reaches back the whole delay, and the max still bounds every group.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…its min Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughLive subscriptions now send a zero minimum delay while retaining the configured maximum. Replay subscriptions retain the configured delay bounds. Comments and tests describe and verify these bounds. The m0 TS congested-path quest document is removed. Merge Risk:
|
…-path # Conflicts: # rs/moq-mux/src/container/source.rs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Maintainer decision (relayed from the maintainer's /quest-run pick round, 2026-11-26):
(Written by Claude Opus 5.5) |
The maintainer keeps newest-first serving: a narrow path drops group tails to keep latency low. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Completes and deletes quest/m0/ts-congested-path.md.
Problem
The scheduled
TS congested pathstep (just test ts --headroom --rate 7000000 --duration 120) has failed on everymainrun since 2026-11-22: each audio PID starts 3.008 to 3.024 s after its source, one frame past the 3.0 s join. The audio follows the video, which joins at its fourth group (4.48 s of 1.48 s) instead of its third.Cause: a TS export subscribes each live track with
Live { min: D, max: D }(export::subscribed), and its reader (ExportSource::live) then starts at the newest group. Since #9316 a live join'sminis placed exactly, at the group holding the edge minus D. So at the join the relay sent up to two groups of 1 s video (about 2.2 MB) that the export skips. On a 7 Mb/s path that backlog delayed the newest group's keyframe until the next group superseded it. The relay trace showed groups 2.48 and 1.48 served at the subscribe, ahead of 3.48.The quest's Plan read the
f2eab6d3c2run as an audio-shed failure. It failed on the same late start (its audio also shed 2 to 37 frames per PID, which--shedallows), and no run with the fix sheds audio.Approach
A live-start
ExportSourcesubscribes with a zeromin, so it joins at the group holding the live edge, where it starts reading anyway. Every hop still drops a group bymax(D) alone, which is what #9067 statedmin: Dfor. A replay export, which reads from the oldest group the delay reaches, still joins D back.Validation
quest gate, 20 s runs of the same path:d1c532d3e4and3d1bb40f2a~1join at 3.48 s (4 of 4),3d1bb40f2aat 4.48 s (2 of 2), andmainat 4.48 s (3 of 3 with moq-mux debug logs).just test ts --headroom --rate 7000000 --duration 120: passes 3 of 3. Joins at 3.48 s, sheds no audio.The third run, on this head (
holes.py --shed), keeps every audio frame from the join on, the old quest's Goal:f2eab6d3c2run (45040473444) also shed 2 to 37 audio frames per PID beside the late start.RUST_LOG=moq_net::lite=debug): the SUBSCRIBE carriesLive { min: 0ns, max: 1s }, and the relay serves only the edge group (2.48), then 3.48. Before, it also served 1.48.just test ts,--mpts --program 2 --join 5,--passthrough --restart 10, and both CUBIC overflowing paths (--headroomand--passthrough,--queue 250ms --duration 120).just test -p moq-mux --all-features(2225 passed),-p moq-srt -p moq-cli(276 passed),just check.main(itsfloor_range, fix(mux): a TS follow export carries on into a same-instance return while it drains #9662, conflicted with the live-start min):cargo test -p moq-mux --all-features(2227 passed),just check, and the full CI command again pass. Joins at 3.48 s, every audio PID from 3.486 s with 0 frames shed.a_subscription_states_the_whole_delaynow assertsmin: 0for a live export andmin: Dfor a replay.latency_is_sent_with_the_initial_subscriptionasserts the same split forExportSource. Both failed without the fix.Impact
Live { min: 0, max: D }instead ofLive { min: D, max: D }.Alternatives
subscribed's min in the TS export alone. That would also move a replay's join, and it leaves every other live-startExportSourcecaller asking for skipped history. The reader's start is the right place to decide.holes.py's 3.0 s join allowance. Rejected: it would hide the extra group of join latency.Caused by
minreach back to the group holding the edge minusmin, which turned the TS export'smin: D(fix(mux): a TS export states its whole delay to the relay #9067, stated only to keep groups held for D) into up to two groups of join backlog (found by check: the scheduledTSworkflow)Decisions
quest/m4/congested-whole-groups.mdis dropped (rejected: keep it). TheTS congested pathharness has no kept-video-share assertion to delete:holes.py --shedonly requires that losses are whole group tails, the shape newest-first produces, and bounds the join.Follow-ups
EIT fixturesandTS long recovery(and on some runsTS overflowing pathandTS private PES) also fail in the scheduledTSworkflow. No quest owns them yet.Models
Size: M
Implementer: Claude Code, claude-opus-5-5, unknown
Implementer: Claude Code, claude-opus-5-5, unknown (iterate, M)
Implementer: Claude Code, claude-opus-5-5, unknown (iterate, S)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: f74f35e
Base: origin/main at b509328
Risk: medium,
A live TS export now subscribes with min 0 so the relay joins at the edge, which could drop history a consumer of the moq-mux export path expects. The public Rust API signatures and wire format are unchanged, and a revert fully undoes it, so the blast radius is shipped behavior that the next cut would publish as a patch.Classified: medium by Claude Code, claude-haiku-5-5, low effort, session
83c851e8-2247-475e-8533-92a348d277d5Risk file: bb7b1c0de60b
Reviewer: Codex, gpt-6.2-sol, high effort
Session:
01a2190a-cb68-7491-bfe8-75dec390e9fd, round 3Score: 10/10,
The latest revision changes only quest tracking and introduces no landing blockers.Rounds: 3; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Notes, the author's to take or leave:
quest/m0/ts-congested-path.md:Keep the remaining video congestion issue tracked