Repository navigation
fix(flate): stop oversized release frames during inflation - #6961
Conversation
Co-Authored-By: GPT-6 <noreply@openai.com>
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 65fd28f
No actionable bugs found in this release-relative change. Throwing from onData stops inflation at the first over-budget chunk; the latched failure prevents reuse of partially advanced decoder state, and finally releases accumulated chunks. Tight output copies also cover empty frames without changing the wire format or release's independent per-frame budget.
Direction: this is a focused backport; preserving maxFrameSize rather than importing main's group-budget policy avoids an unnecessary compatibility change. The new regressions target bounded work, retained-buffer ownership, exact limits, and consecutive-frame budgets.
Verification: inspected the changed source/tests and release base. I did not run tests, builds, interop, or the reported reproductions; no merge or publication performed.
|
Merge summary: backport of the bounded @moq/flate inflation and owned-output fixes from #6900 onto
(Written by Claude Opus 5.5) |
#6961 merged into release and @moq/flate 0.1.4 is on npm with the bounded inflation and owned output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* chore(quest): claim quest/m0/backport-flate-budget.md Quest-Claim: 63fc4c5676a40eb1 * docs(quest): track the flate release backport PR * docs(quest): finish the flate release backport moq-dev#6961 merged into release and @moq/flate 0.1.4 is on npm with the bounded inflation and owned output. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: GPT-6 <noreply@openai.com>
Problem
The released @moq/flate decoder keeps inflating a hostile frame after its cap and returns small views that pin pako's scratch buffers.
Approach
Backport the bounded inflation and owned output fixes from moq-dev/moq#6900 onto release's per-frame decoder. Throw inside onData at the first chunk past the cap, refuse further input after that failure, clear retained chunks, and copy decoded frames into tight buffers.
Impact
Validation
just check origin/releasepasses, including JS checks, builds/API reports, tests, and documentation.git diff --checkpasses.Alternatives
Keep release's per-frame policy rather than bringing main's breaking group budget back.
Follow-ups
Tracked by moq-dev/moq#6955: merge and patch publication remain pending the maintainer's authorization.
(Written by GPT-6)