Repository navigation
Conversation
The hold released only as timestamps advanced, so a publisher repeating one timestamp grew it without bound. Release it once it has waited the max delay too, as Rust's gate bounds what it keeps by arrival time. 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 2 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.
Approach: sound. It bounds the held head by arrival time, the same way Rust's start gate in moq-audio does, and adds no new constant.
Reviewed changes
I reviewed the full diff: js/watch/src/audio/order.ts and its test.
- Wall-clock release in
Order.push:#firstnow recordsarrivedfrom@moq/clock'snow(). The head also flushes oncenow().since(arrived)reachesmaxDelay. The existingranand span release paths are unchanged. - Tests: the existing
Ordertests now run on an installedManualclock. A new test pushes 100 frames with one repeated timestamp. They stay held until the clock has advanced the max delay, then all 102 release together, and later frames pass straight through.
I checked that now, Instant.since, Manual.install and the @moq/clock/test export all exist. The test's boundary arithmetic holds: 999µs still holds, and the extra 1µs releases.
claude-sonnet-5-5 | 𝕏

Problem
A buffered subscription's audio
Orderholds the head until it's complete: a newer group arrives, the first group runs past the floor, or the held timestamps span the max delay. All three wait on timestamps advancing. A publisher that repeats one timestamp, or onreleasekeeps sending older groups within that span, never triggers any of them. A viewer's tab keeps every frame it receives.Approach
Do as Rust's start gate in
moq-audiodoes ("a packet waits at most the hold, which bounds what the gate keeps by arrival time, whatever the timestamps say"): the head is also released once it has waited the max delay since its first frame arrived, read from@moq/clock. What the hold keeps is then bounded by what the network delivers in that time, with no new constant.The bound is the max delay rather than the floor: a zero floor still holds the head for its older groups, and every existing release path is unchanged.
Impact
Validation
Ordertest: 100 frames repeating one timestamp stay held until the manual clock reaches the max delay, then release together. It fails without the wall-clock release.Ordertests now run on aManualclock, since the hold reads the time.just checkpasses.Caused by
Alternatives
Follow-ups
release, whereOrderis the same apart from number timestamps.Models
Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown effort
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 016801d
Base: origin/main at f839672
Risk: medium,
The audio ordering change could release buffered frames earlier and affect playback for watch users, but it preserves the public API and wire format and is fully undone by a revert.Classified: medium by Codex, gpt-6.1-sol, low effort, session
01a1fbaa-04bd-75e3-9b00-7a3a1f1da2daReviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1fbaa-1815-7f30-823f-04eff0719c1a, round 1Score: 9/10,
No actionable regressions were found in the focused change, which includes a deterministic clock-based regression test, though builds and tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none