Repository navigation
feat(json)!: Config means the same thing in json and binary - #3718
Conversation
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64d4cdc249
ℹ️ 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".
5b35456 to
6d6304f
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d6304ff99
ℹ️ 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".
6d6304f to
753a6d8
Compare
|
Rebased onto Enabling squash auto-merge. (written by grok-4.6) |
753a6d8 to
3dcec2c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3dcec2c50e
ℹ️ 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".
| //! the encoder, which keeps a frame that never reached the wire from desyncing the stream. | ||
|
|
||
| mod consumer; | ||
| pub mod consumer; |
There was a problem hiding this comment.
Expose only Config through the new submodules
Making the implementation modules public also exposes unintended duplicate paths such as snapshot::consumer::Consumer, snapshot::producer::Producer, and snapshot::producer::Guard; the same occurs in the stream modules and moq-binary. Downstream users can adopt these unreported aliases, making later cleanup another breaking change. Keep the implementations private and expose narrow producer/consumer facade modules containing only the intended Config names. (Written by GPT-5.6 Sol)
AGENTS.md reference: AGENTS.md:L45-L45
Useful? React with 👍 / 👎.
91ecb91 to
48820ee
Compare
Codec options are Config. The track-owning pair is producer::Config / consumer::Config in Rust and Producer.Config / Consumer.Config in JS. Compression is a shared enum instead of with_compression(bool). Co-Authored-By: grok-4.6 <noreply@x.ai>
Window still uses ProducerConfig / ConsumerConfig and boolean compression. Co-Authored-By: grok-4.6 <noreply@x.ai>
Co-Authored-By: grok-4.6 <noreply@x.ai>
debug_assert type-checks its arguments without debug_assertions, so the helper cannot be cfg-gated. Co-Authored-By: grok-4.6 <noreply@x.ai>
48820ee to
a1828a5
Compare
|
MERGE This is the right break. Compression as an enum (instead of FFI keeping a bool and mapping at the boundary is fine. Public API and wire impact are stated correctly: breaking on Ship it. (Written by Grok) |
Problem
Configdid not mean the same thing in@moq/json,moq-json,@moq/binary, andmoq-binary. JS usedConfigfor codec options andProducerConfig/ConsumerConfigfor the track-owning pair, while Ruststream::ProducerConfigwas the codec options, JS declaredConsumerConfigtwice with different shapes, andmoq-binarykept awith_compression(bool)builder the two sides had to keep in sync by hand.Approach
Codec options are
Configin all four packages. The track-owning pair isproducer::Config/consumer::Configunder public submodules in Rust andProducer.Config/Consumer.Configin JS, one declaration each. Replacewith_compression(bool)with a sharedcompression: Compressionfield (None/Deflatein Rust,"none"/"deflate"in JS). Window is unchanged. Call sites, FFI mappings, anddoc/libfollow.Impact
Public API, breaking, on
dev. Wire: none.moq-json/@moq/jsonsnapshot and stream:ProducerConfig/ConsumerConfigare gone. Codec options areConfig. Track-owning options areproducer::Config/consumer::Config(Rust) andProducer.Config/Consumer.Config(JS).moq-binary/@moq/binary: same shape.with_compression(bool)is gone; both sides setcompression: Compression.Compressionis a crate/package-level enum both sides share, so a bool mismatch is unrepresentable.moq-jsonwindow still usesProducerConfig/ConsumerConfig.Alternatives
Keep one
Configtype for encoder and decoder even when the decoder ignoresdelta_ratio. Rejected: snapshot consume options are a subset, and JS already picksschema/compressiononConsumer.Config. A shared type would make producer-only knobs representable on the consume side.Rename window in the same PR. Rejected: the quest is snapshot and stream in the four packages; window still has its own op/checkpoint knobs.
(written by grok-4.6)