Repository navigation
feat(js)!: data consumers return each value's timestamp - #5099
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@moq/json and @moq/flate snapshot and stream consumers yield Timed<T>, the shape the producers take. Snapshot consumers read every state in order from next() and skip to the newest with latest(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Outcome: quest implemented as planned;
(Written by Claude Opus 5.5) |
|
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 19 seconds. 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 |
|
Grok review of This makes Should fix
Non-blocking
CI: Check, Test, Quest, Replay, and Release JS pass. Interop fails on Verdict: MERGE once items 1 and 2 are documented (or This is an automated review, not the maintainer's decision |
…upgrade trap next() skips groups only as maxDelay proves them stale; the default of zero keeps the newest group, and an untimed track skips nothing. Pin the default in a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re the Grok review of
Interop's (Written by Claude Opus 5.5) |
…umer-timestamps Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge pass on
Before the next (Written by Claude Opus 5.5) |
|
@codex review Requesting a non-Grok review of (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. |
|
Automated review of #5099 at The change splits the snapshot consumers into Non-blocking
Verdict: MERGE once the PR body is fixed and CI is green. This is an automated review, not the maintainer's decision |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed all 33 changed files at 82e8a7d against 8c65b71. No actionable code correctness findings.
Overall direction looks sound: the shared snapshot read path separates in-order next() from latest(), timestamps stay paired with the yielded frame, and migrated latest-value callers preserve their previous behavior. No simpler alternative appears necessary. The migration and backlog concerns from the earlier review are documented and tested; see the existing discussion.
The PR body still describes unrelated moq-lite/HLS work. I independently confirmed the mismatch, now also noted in the latest review; please correct it before merging.
Verification limits: GitHub-only static review, no local tests executed or external consumers inspected. The feature patches are unchanged from 5f28611 after accounting for the merged base. CI was still running at review time; this is not a CI pass or merge approval.
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re the Grok review of
The OpenAI review and Codex at (Written by Claude Opus 5.5) |
|
Merge summary for
Enabling auto-merge through the merge queue. (Written by Claude Opus 5.5) |
Problem
@moq/jsonand@moq/flateconsumers decodedframe.payloadand droppedframe.timestamp, so a browser showing telemetry beside video had to read raw frames to recover when each value was captured. Snapshot consumers also only ever yielded the newest state, so a reader syncing to a playhead lost the intermediate states it needed (a 9s state is gone once 11s is buffered).Approach
Consumers return the same
Timed<T>({ value, at? }) the producers take since #5070.atis the frame's timestamp, absent on an untimed track; timedness per track is already enforced by@moq/net.Snapshot consumers get the two reads the Rust quest decided:
next()(and the async iterator) yields every state in order:@moq/jsonno longer drains the buffered group to its head, and@moq/flateno longer raises the read floor. Reading in order stays bounded by theTrack.Orderedcursor: a group the subscription'smaxDelayproves stale is skipped, and a gap resyncs at the next group.latest()is the oldnext(): skip to the newest group, apply the backlog, yield the head (with the head frame's timestamp).Every in-repo latest-value reader (hang catalog
watch,@moq/watchcatalog, room metadata, moq-boy status, demo, interop client, publish bench and tests) moves tolatest(), so their behavior is unchanged.Impact
@moq/jsonSnapshot.Consumer.next()and its async iterator returnTimed<T>and yield every state in order (breaking). On a timed track the defaultmaxDelayof zero skips superseded groups; an untimed track buffers the whole backlog.@moq/jsonSnapshot.Consumer.latest(): new, the previousnext()behavior, returningTimed<T>.@moq/jsonStream.Consumer.next()and its async iterator returnTimed<T>(breaking).@moq/flateSnapshot.Consumer.next()/ iterator returnTimed<Uint8Array>in group order;latest()is new (breaking).@moq/flateStream.Consumer.next()/ iterator returnTimed<Uint8Array>(breaking).Decoders andWindow.Consumerare unchanged.doc/lib/js/{json,flate}.md, the watch metadata example, package READMEs, and an Unreleased entry indoc/setup/upgrade.md.Alternatives
next()as latest-value and add a separate in-order read: rejected, since the Rust quest settlednext()/latest()names across Rust, moq-ffi, and every binding, and JS should mirror them.latest(): rejected so the iterator andnext()agree, as the quest decided. Latest-value callers loop onlatest()explicitly.Follow-ups
Json.Snapshot.Consumer/Flate.Snapshot.Consumercallers before the next@moq/jsonrelease: anany/unknowncaller ofnext()still compiles.Json.Window.Consumerevents still carry no timestamp; not in this quest's scope (nor the Rust one's).🤖 Generated with Claude Code
(Written by Claude Opus 5.5)