Repository navigation
feat(net): publish and consume compressed lite-07 tracks in JavaScript - #6230
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
Prepare the group-scoped codec foundation without changing the model, wire behavior, or advertised capabilities. The decoder enforces exact declared sizes, stops oversized inflation inside pako onData, rejects final DEFLATE blocks, and retains tight frame buffers. The encoder is isolated behind pako browser deflate for eventual lazy loading. Unresolved: synchronous writes currently require a static compressor, measured at 2870 gzip bytes beyond Inflate alone. Lazy loading requires observable pending-write timing or an explicit preparation API. Planning PR5885 and core PR5928 do not settle that JS choice. No writer timing or public API decision is implemented. Passed: 5 private codec tests (14 assertions), js/net type checks including examples and benchmarks, Biome, git diff --check. Full CI, drafts, Rust/JS exchange, interop --all, integrated bundles and fanout remain unrun because the feature is not integrated. Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Co-Authored-By: GPT-6 <noreply@openai.com>
Keep model writes synchronous, store slices once per group, and share exact-size inflation across plain readers. Serve older sessions plain frames and exercise Rust/JS relay exchange and lite-06 fallback. Co-Authored-By: GPT-6 <noreply@openai.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. Comment |
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. |
|
Quest outcome: complete, with the maintainer-approved synchronous write contract and static encoder tradeoff. Final The maintained publisher × reader benchmark confirms one shared inflated copy, independent of reader count. The standard No open decisions or additional follow-up quests. Existing consumer migration and native codec plans retain their separate scope. The PR is ready; merge and queue actions remain with the batch coordinator. (Written by GPT-6) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged
On the merged head: (Written by Claude Opus 5.5) |
Combine lite-05/06 timestamp dropping (#6150) with compressed frame decoding: frameDecoder and readFrames take one FrameFormat of scale, timed, and compress, and the publisher threads both the Stamp and the compress flag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged
Checks: (Written by Claude Opus 5.5) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f87cd23c94
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
Main's interop harness now runs the tails once per pinned version (#6246). The compress tail lanes pin their own lite versions like the drop lanes, so they run in the auto pass and are planned as case=compress with their version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged
Checks: (Written by Claude Opus 5.5) |
Main's #6230 makes js/net read and write compressed lite-07 tracks, so the listing carries compression instead of refusing it: TRACKS_ADD answers the same TRACK_INFO as a TRACK stream, compression included, mirroring Rust's TrackInfo::serve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves js/net resume.ts and resume.test.ts against #6251, #6230, #6222 and #6209: keeps main's verdict check and identity-based datagram dedup, and tracks the newest datagram handed out separately so a declared end is still checked against it now that `#datagram` is the last one. Renames `advanceAsync` to `advance` for the new manual clock. Drops the quest links to the finished resume-closed, recovery-verdicts and resume-datagrams quests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem
JavaScript refused compressed lite-07 tracks and could not publish them through the networking model. Rust publishers already use the negotiated format, so JS readers need the same bounded storage and plain-frame contract.
Approach
Add
Info.compress, keeping model writes synchronous. Store each group's DEFLATE slices once, forward those slices unchanged on lite-07, and build one exact-size plain copy shared by application readers and older sessions. Datagrams have independent windows; malformed compressed datagrams are refused before delivery.Charge declared plain sizes against the existing group limit before inflation, stop excessive output inside the decoder, retain committed prefixes on cuts, and measure refresh against stored bytes. Complete the JS quest and remove its references.
Impact
@moq/netTrack.Info.compress, default false. Application frame/datagram payloads remain plain, and writes remain synchronous. Codec classes and wire-ingest hooks remain private.Checks
just cipasses on current main, including the merged fixture repair. No temporary overlay remains.just test interop --allpasses. Added Rust ↔ JS Node/Bun compressed exchange through moq-relay on lite-07, plus lite-06 plain fallback, with multiple frames per window and an empty frame.just drafts checkandquest checkpass.just js bench compressionsweeps 1/4/16 publishers × 1/4/16 readers. Each publisher stores 740 bytes and inflates 71,680 bytes once for the fixture, independent of reader count.Alternatives
The maintainer approved the static encoder cost to preserve synchronous writes. Async pending writes and a preparation API were rejected. Both codecs now import one pako module so their helpers are shared.
Follow-ups
No open decisions. Native browser codec work is separately planned. The existing compression migration quest owns consumer migration and removing
@moq/flate; this PR keeps that scope separate.(Written by GPT-6)