Repository navigation
test(scene): the looping media test holds under load - #181
Conversation
Quest-Claim: f7e41f36a412c80e
The test jumped a paused clock to 950 ms in one sleep. Pictures decode on moq-video's own thread, which tokio cannot see, so while the runtime sat idle the clock ran past 800 and 900 ms before those pictures existed, and the slot still held 700 or 800 ms. Step the clock to one picture's moment at a time and wait for it there, as the play-once test already did, through a helper both share; then read the loop's start at its end, before the second play's next picture can replace it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The second play begins at the first one's end, which its sound puts a little past 1 s, so holding the clock at 1 s waited forever. Read the end from the feed's run instead. Adds a follow-up quest for the restart test, which hung once under the same load. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 35 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. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the test-only fix for the looping media flake and the quest bookkeeping around it.
- Shared
plays_on_timehelper: the play-once test's loop, which moves the clock to one picture's moment at a time and waits for that picture there, is extracted unchanged and reused by the looping test in place of the single jump to 950 ms. - Second play read at the first play's end: the looping test waits with
until(|| feed.run().ended)and then moves the clock to that end, instead of using a fixed 1.1 s. This cannot hang. For a loop,play_clipreturns atahead(end)(end −WRITE_LEAD, 50 ms), sorun.endedis already set while the clock is held at 998 ms.ranrecords it once for the loop'scue.play, so it equals the second play'sbegin. - Quest files: the completed
flaky-looping-mediaquest is removed, andflaky-media-restartis added for the restart-test hang found under the same load.
Note: the review shell has no quest binary, so quest context was not run.
claude-opus-5-5 | 𝕏
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head: 142af2c057a646621f627ccd95b08ae074a9f899.
No actionable issue found in the test-only change. Reviewed the extracted per-frame pacing loop, shown helper and second-play synchronization: the looping test now consumes each decoded picture before advancing instead of jumping past frames, and waits for the recorded playback end rather than assuming 1.1 seconds. Production source behavior is unchanged. Limits: static source review only; I did not rerun the decoder/load stress tests or the full suite.
# Conflicts: # rs/moq-scene/src/source.rs
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the merge of main into the branch since the approved 142af2c.
- Merge resolution in
plays_on_time: the shared helper now usesmain'sDuration::try_from(timestamp).unwrap() - Duration::try_from(first).unwrap(), the same asmain's play-once loop. The test logic is otherwise unchanged.
claude-opus-5-5 | 𝕏

Finishes quest/m0/flaky-looping-media.md:
source::media_tests::a_looping_media_file_starts_overnow passes however busy the host is.Summary
The test jumped the paused clock from the first picture to 950 ms in one sleep. Pictures decode on moq-video's own thread, which tokio can't see, so while the runtime sat idle tokio auto-advanced the clock past the 800 and 900 ms moments before those pictures had decoded. The feed's slot then still held the 700 or 800 ms picture.
plays_on_time, and the looping test uses it too.Feed::run().ended) instead of at a fixed 1.1 s. That end is a little past 1 s because the clip's sound outlasts its last picture. Holding the clock at the end also stops the second play's next picture from replacing its first.Public API and wire: none. Only test code changes.
Validation
stress-ng --cpu 96on a 32-CPU host already at load 25 to 40. 34 of 200 runs failed at the 900 ms assertion, showing 700 ms (10) or 800 ms (24).timeout 120: 200 of 200 passed.source::media_tests::module, 60 runs beside the same stress: 59 passed. The one failure was a hang in a different test,a_media_file_restarts_going_on_program; see Follow-ups.just cipassed (check, plus 333 tests).Duration::try_fromcatch-up inside the loop this PR moved intoplays_on_time; the helper now uses it. Both tests, 500 runs, 16 at a time, besidestress-ng --cpu 96at load 81: 500 of 500 passed.just cipassed (359 tests).Caused by
Follow-ups
a_media_file_restarts_going_on_programhung once in 60 module runs under the same load. The quest has a lead: the test holds the clock at a fixed 1.1 s, which may fall short of a play's end. No open decisions. Recommendation: keep it.Models
Size: S
Implementer: Claude, claude-opus-5-5, unknown effort (arm A)
Implementer: Claude Code, claude-opus-5-5, low effort (iterate, XS, arm A)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: e9a4cf6
Base: origin/main at f232c0b
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1e145-264c-7f00-a922-8338b91db321, round 2Score: 9/10,
The merge preserves the previously reviewed test fixes, with no new actionable regression found by code inspection; builds and tests were not run.Rounds: 2; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Reviewer: Codex, gpt-6.1-sol, low effort, shadow
Session:
01a1e145-264c-7610-ab26-f7738d11c358Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0