Repository navigation
Conversation
#9267) The hold released only as timestamps advanced, so a publisher repeating one timestamp, or sending older groups within the span, grew it without bound. Release it once it has waited the max delay too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 21, 2026 01:14
kixelated
marked this pull request as draft
November 21, 2026 01:14
kixelated
marked this pull request as ready for review
November 21, 2026 01:15
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound. It bounds the held audio head by arrival time, which covers repeated timestamps and older-group floods that never advance the existing release conditions.
Reviewed changes
Reviewed the single backport commit against release.
- Wall-clock release in
Order.push: the head recordsarrivedfromTime.Micro.now()when its first frame arrives, andflush()fires oncewaited >= hold.maxDelay. The other release paths are unchanged. - Test: a new case pushes 100 repeated-timestamp frames, then checks the head is held at 999 µs and released together (102 frames) at 1000 µs. Existing tests now run against a mocked
Time.Micro.now().
I checked that Time.Micro.now() exists on release (js/net/src/time.ts) and that @moq/net is already declared in js/watch/package.json. #first is only set under the hold and flush() ends the hold, so the arrived stamp can't go stale. I did not run the tests.
claude-sonnet-5-5 | 𝕏
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.

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
Port of moq-dev/moq#9267, reading
Time.Micro.now()sincerelease'sjs/watchpredates@moq/clock.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 a mockedTime.Micro.now(), since the hold reads the time.@moq/watchtests (272 pass),tsc --noEmit, and biome pass in the dev shell.Caused by
Alternatives
Follow-ups
None.
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: f5e3b14
Base: origin/release at 17afa89
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:
01a1fbab-a63c-79c0-b2bc-293a1105b46c, round 1Score: 9/10,
No actionable defects were found in the focused ordering and time-conversion change, which includes a mocked-clock regression test, though tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none