Repository navigation
Conversation
Quest-Claim: 4943fb93b8d640fd
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Maintainer decision (via /quest-run):
(Written by Claude Opus 5.5) |
…max drops retransmittable video Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
Author
|
Applied the maintainer's decision on head b100663: both answers are recorded under (Written by Claude Sonnet 5.5 with high effort) |
This was referenced Nov 23, 2026
This branch has not been deployed
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.
A lost group stalls a composition layer only as long as the layer plays behind, not for the fixed
LAYER_DELAY(4 s) every layer held. Holdsquest/m2/compose/layer-delay.mdopen, now waiting on a moq investigation (see Waiting); the PR that lands it deletes the quest.Changes
rs/moq-scene/src/source.rs:LAYER_DELAYis gone. Each layer track keeps aReach: the longest wait between a frame arriving (Consumer::arrival) and coming due on the program's clock, plusLEEWAY(VIDEO_DELAY, 100 ms). The reach grows at once when a wait gets within a frame of it. It shrinks only after a whole second of shorter waits, so the late frames a loss leaves behind don't shrink it. It is capped atmoq_mux::container::DELAY_MAX, however a peer stamps its frames.follow_video): moq_video's decoder has noset_max_delayat this pin, so when the reach moves, the layer subscribes again withDelay { min: reach, max: reach }. That join starts where the layer plays. The old subscription keeps playing until the new one opens. Pictures the join repeats (at or before the newest queued picture) are dropped.follow_audio):set_max_delay(reach + STRETCH)in place, asmoq playdoes.a_reach_follows_the_longest_waitcovers the estimator's edge cases.a_lost_group_stalls_a_layer_no_longer_than_it_plays_behinduses a paused clock and a forwarder that delivers only the first frame of one group and never finishes it. It asserts that the next group shows within the layer's lag of when it is due. It fails on the base commit (the next group showed 3.6 s after due) and passes 40/40 under--stress-count.A choice that differs from the quest's wording
The Plan says to set
Delay::max"from its own composition offset plus the viewer's playout". A layer'soffsetmaps one broadcast's timestamps onto another's, so it also includes how far apart the two publishers' clocks sit. That can be any size;plays_a_guest_where_the_studio_didshowsoffset = apart + playout. Measuring each frame's arrival-to-due wait gives the intended quantity directly: the studio's playout, which the offset carries, plus the viewer's playout and the path difference. It needs no wall-clock agreement between machines, and it follows offset and playout changes without watching either.Validation
just cipasses (523 tests).moq_relay::test_relay, two 320x180 30 fps openh264 broadcasts (1 s GOP) in-process, and a player whoseSourcesconnect over QUIC. Loopback is shaped withneteminsideunshare -rn. The layer has offset 300 ms, so it plays about 400 ms behind. "Stalled" sums the gaps over 100 ms between new pictures, per 60 s after a 5 s warmup. All variants are release builds.Random loss (20±5 ms delay, 2% and 5% loss): QUIC retransmits inside the 400 ms lag, so no variant stalls the layer beyond the program's own stalls. Base: 0 and 0.75 s stalled; this branch: 0 and 0.
Outages (1% loss plus 600 ms of 100% loss every 5 s), 5 runs each. Layer stall ÷ the program's stall in the same run:
LAYER_DELAY= 4 s)set_max_delayin moq_video)1.2 s outages (1 run each): layer stalled 17.8 s on the base, 15.8 s on the wait-alone variant, and 18.5 s on C. Max gap 2.26 s, 1.54 s, and 1.77 s.
Reading: resubscribing (A) and moving the max in place (C) stall alike, so a moq-side
set_max_delaybuys no measurable stall improvement here, only fewer decoder reopens. Under outages, where the "lost" data is retransmitted rather than gone, holding the max close to the lag stalls the layer more than a 4 s max does, and more leeway narrows the gap. The maintainer's decision on it is under Decisions.Public API and wire impact
None. Everything changed is private to
moq-scene::source. On the wire, a layer's subscriptions state a smallerSubscriber Max Ageand a non-defaultSubscriber Min Age, and video layers subscribe again (SUBSCRIBE_UPDATE for audio) as the reach moves.Caused by
LAYER_DELAYof two playouts for every layer (found by person, the quest's planning)Decisions
Maintainer, via /quest-run (comment):
Delay::maxdrops video that retransmission would deliver in time (rejected: land as is; land with a 500 msLEEWAY). The PR stays a draft until that lands.set_max_delayonmoq_video::decode::Consumer: ✅ not needed for this quest (rejected: plan it in moq now). Revisit in moq only if decoder reopen CPU shows up.Both are recorded in the quest's Plan.
Waiting
Delay::maxdrops video that retransmission would deliver in time lands. Check: a moq quest named for it has merged on moq'smain, deleting its file, with a moq-side test that a group arriving late within the reader's lag is delivered, not skipped; then bump themoqgitlink here and re-measure the outage runs above. A quest file that moved, or went away without its work landing, does not count.Follow-ups
For
/quest-planin moq-dev/moq's tree (its quest tree owns the work, so none is added here):Delay::maxdrop video that retransmission would deliver in time? Evidence from this PR's lossy-link harness (loopbackneteminsideunshare -rn, amoq_relay::test_relay, two 320x180 30 fps openh264 broadcasts with a 1 s GOP, a layer playing about 400 ms behind, release builds; "stalled" sums gaps over 100 ms between new pictures per 60 s after a 5 s warmup):Delay::max= 4 s, 0.77 with max = the layer's wait + 100 ms, 0.69 with + 500 ms, and about 0.87 with the max moved in place (1 run). Max gap 0.47–1.1 s at 4 s against 0.79–0.87 s at the short max.moq-net(group vs frame) first.Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm A)
Implementer: Claude Code, claude-sonnet-5-5, high effort (iterate, XS, arm A)
🤖 Generated with Claude Code
(Written by Claude Sonnet 5.5 with high effort)