Repository navigation
A stuck source clock's arrival deltas are exact - #9274
Conversation
Quest-Claim: acfb3e6d10402c2f
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound. It rounds at the point where the timestamp is produced, so the worker and <video> paths both emit whole microseconds, as a VideoFrame stores them. That fixes the cause of the float error instead of loosening the test.
Reviewed changes
Reviewed the full diff in this run.
Epoch.stamp: wraps the computed timestamp, both the stuck and non-stuck branches, inMath.round. Rounding is monotonic, so frame ordering is preserved.<video>fallback: roundsMediaClock.capture(at).asMicros()before building theVideoFrame.- Test: asserts the first timestamp is an integer. The exact 10_000µs delta assertions are unchanged.
- Quest file: the completed quest doc is deleted.
claude-sonnet-5-5 | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughThe video processor now rounds timestamps to whole microseconds in the epoch and video-element fallback paths before creating Merge Risk:
|

Finishes
quest/m0/test-flakes-3/publish-stuck-clock-delta.md(deleted here).Summary
TrackProcessornow rounds each frame's timestamp to whole microseconds, in the worker path (Epoch.stamp) and the<video>fallback. The arrival comes frommsg.at - performance.timeOrigin, soMediaClock.capture(at).asMicros()carried float error that depended on the wall clock; aVideoFrametimestamp is an integer a browser truncates, so a frame could land 1µs early. The test asserts the first timestamp is an integer; its exact-delta assertions are unchanged, and notoBeCloseTo.The test's frozen base needed no change: the media timeline is microseconds since instant zero, so the error is about 1e-12µs and a rounded delta only moves if a fraction lands within that of .5.
Validation
bun test src/video/processor.test.tsinjs/publishfailed 4 of 6 runs (Expected: 10000,Received: 9999.999999999998).@moq/publishsuite (448 tests) andjust checkpass.Public API / Wire
None. Timestamps were fractional microseconds before and are now whole; no consumer depends on the fraction.
Caused by
MediaClock.capture(at).asMicros()and thearrived - instantslew term, which let wall-clock-dependent float error into frame timestamps (found by check).Notes
moq-dev/moq#9236 also edits this quest's Plan; this PR deletes the quest, so whichever lands second needs a trivial merge (drop the file).
Models
Size: XS
Implementer: Claude, claude-sonnet-5-5, high effort (arm A)
Review
Rewritten by
quest reviewafter each round.Head: 4f8a52b
Base: origin/main at 9f3c781
Risk: medium,
Rounding video timestamps changes shipped publishing behavior and could affect frame timing for @moq/publish users, but preserves the API and wire format and is fully undone by a revert.Classified: medium by Codex, gpt-6.1-sol, low effort, session
01a1fbb4-e4bd-74b2-9b68-de5e7920b558Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1fbb5-02f9-7751-a86a-113ff8641b87, round 1Score: 9/10,
Static review found no actionable regressions in the focused timestamp rounding change and matching assertion; builds and tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none