Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Count UTF-8 replacement output before allocating it and enforce the existing global decompression ceiling. Keep per-call limits on raw decoded bytes and preserve the original envelope on rejection.
Measure Rust allocation bytes during the direct decompression regression. An unrestricted repair followed by a size check exceeds the budget even though it returns the expected outcome.
lan17
force-pushed
the
fix/rust-text-output-bound
branch
from
November 13, 2026 07:23
c1ac0ac to
7c53162
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A bounded resource test found that a 6,151-byte compressed text envelope can decode to 192 MiB of
0xFFand then allocate 576 MiB of repaired UTF-8. The raw bytes fit the 512 MiB read ceiling, but the repaired text does not.The same case reaches the reader through a tracked, remote-only
get_or_loadwithdisable_compression(). That option controls new writes, not reads.Change
Bug fix under the X02 native resource boundary. No design record is needed: no portable contract, public API, cache-value policy, key or frame format changes.
MAX_DECOMPRESSED_BYTES.0xFFand returns the three-byte replacement character.ReadOverLimitand the original marked bytes. The default JSON codec rejects these bytes, so the cache loads the source and writes its result. A custom codec that accepts the raw bytes keeps the existing fallback behavior.This is independent of the Go change in PR 276.
Ports
Validation
Head:
7c53162e3da39427930b6b6a9302f29c9eaa674dOnly commit credit trailers were removed after
c1ac0ac1fd13ea46aab890910a02fc12b2f72a39; the complete file tree is identical.make check-rustandmake auditatc1ac0ac1fd13ea46aab890910a02fc12b2f72a39: pass, including formatting, both clippy lanes, native tests and committed conformance histories. These local results cover the identical current file tree.22c1f502ddb5f27419faf5caa528d9ea3a9c92e4: the reader reportsDecompressedinstead ofReadOverLimit.ReadOverLimitReadOverLimit, one source call, one writeThe allocation counter also passes on this file tree. An allocate-then-check negative control fails it with 1,946,163,207 allocated bytes, despite returning the expected outcome.
No changed file is named by either mutation catalog, so the required hosted tier is Replay.
Hosted PR CI at
7c53162e3da39427930b6b6a9302f29c9eaa674d: pass, including native and wire checks, formal smoke and differential checks, documentation build and CodeQL. Only documentation deployment was skipped.formal-full.yaml, modereplay, run 43386430953 at7c53162e3da39427930b6b6a9302f29c9eaa674d: pass. Generation, symbolic verification, all four complete language replays and the final aggregate passed. Model, mutation and exploration jobs were skipped as required by Replay mode.Read-only independent review of the identical file tree found no unresolved findings across correctness, tests, simplicity, architecture, contracts, security, reliability, performance and full-flow review. The rollout safety review found no blocker.
An independent bounded repeat confirmed the exact fixture, raw limits of 0 and 1, and the tracked read with compression disabled. The tracked read called the source once and wrote once; its peak RSS fell from 789,880 KiB to 200,436 KiB. This is evidence for the tested fixture, not a total process-memory ceiling.
Not run locally: Redis/Valkey/Cluster integration; hosted PR CI passed that lane.
Required hosted lanes not run: none.
Follow-ups
None.