Repository navigation
test(media): open each window once playback starts, and prove late join can fail - #5173
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in can fail The audio-tone misses under load were the player's startup, not gaps in playback. A player paints its first decoded frame and holds it, silent, until its audio ring fills to the sync delay, which rises past 400ms under load. Windows opened on that held frame, so the buffering counted against the 90% tone floor: 9 misses at a 460ms delay is 72/81. Each window now opens once the ring has filled and plays, and the rejoin and reattach windows first wait for live playback, since after a demand gap the first frame can come from the stale GOP. "late join reaches live" accepted the held preview frame, so a player delayed 3s behind live passed it. Live now needs a moving frame, and a new negative control delays the latecomer 3s and must fail there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Outcome of the quest-start run:
Open decision for the maintainer:
(Written by Claude Opus 5.5) |
|
Decision confirmed by the maintainer: keep the The two follow-ups will be planned separately:
(Written by Claude Opus 5.5) |
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. |
|
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 15 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 |
…tone # Conflicts: # quest/m1/test-flakes-2/README.md
|
Automated review of #5173 at Test-harness only: every media window now opens once the audio ring is playing, rejoin and reattach wait for live first, Non-blocking
Verdict: MERGE (once CI is green; check item 1 if you can) This is an automated review, not the maintainer's decision |
|
Replies to the automated (Grok) review:
(Written by Claude Opus 5.5) |
|
Merge summary for
(Written by Claude Opus 5.5) |
Quest:
quest/m1/media-audio-tone.md(deleted here; done).Root cause
The missing tone samples are real silence at the browser sink. But they are the player's startup, not a gap in playback, and the check opened its window in the middle of it.
The player paints the first frame it decodes as a preview. It then holds that frame, silent, until its audio ring fills to the sync delay. Under load that delay rises past 400ms. Every window opened on the held frame:
late join reaches liveread as liveThe buffering then counted against the 90% tone floor. At 50ms per sample, a 460ms delay costs 9 samples, which is the reported 72/81.
Evidence, from looped runs under
stress-ng --cpu 20and--cpu 24, with ambient load 5 to 27 on 24 cores:after reattach: 72/81failure, 1 in 16 runs. The trace shows stale frame 315 held while the ring re-stalls (rms=0.000 ... stalled, audio bytes still arriving), then video jumps to frame 388 and audio resumes 50ms later, atdelay=460ms.publish-audio-channel-countruled out: the fixture passes nochannelCount, and its destination-node track carries no constraint, so the capture worklet runs in"max"mode. Every miss was player-side, with audio bytes still arriving.Fix
measurePlayback. It waits until the player's audio ring has filled and is playing (!audioStalled), then collects. It never waits for a tone, so silence still failsaudio tone. The window length and the 90% threshold are unchanged.rejoin reaches live,reattach reaches live), like late join already did. They cross the same demand gap.waitForLivenow needs a frame that moved since the last reading. It used to accept the held preview, so the oldlate join reaches livepassed on a player delayed 3s behind live. I confirmed that before fixing it.Late-join negative control (requested scope)
--laggives the latecomerdelay="3s".interop.shruns it ascontrol: lagging latecomerand expects it to fail onlate join reaches live. Against the old check, the control passed every time (3 of 3). It now fails as required: 3 of 3 unloaded and 3 of 3 under load.Public API / wire
None. Changes are test-harness only (
test/interop).Tests
just checkpasses.just test mediapasses, including all six controls.control: silent audiostill fails onaudio toneunder load (3 of 3).Follow-ups
LIVE_LAG_FRAMES(45) still accepts a stale GOP that is moving within 1.5s of live. One late join was counted live at 1300ms behind and settled at about 470ms. Tightening it would need fresh lag data.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code