Repository navigation
fix(core): extend warm chunked open-ended reads from responses - #9232
Merged
Merged
Conversation
PsiACE
approved these changes
Nov 27, 2026
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.
Which issue does this PR close?
Refs #9196.
Rationale for this change
A reused chunked reader can silently truncate an open-ended read at the length observed by an earlier read. On Memory, warm a chunk-size-2 reader on
12345, overwrite the object withabcdefghi, then callread(2..)on the same reader. It returnscdebefore this change andcdefghiwith it.What changes are included in this PR?
FuturesAsyncReader's planned end for subsequent seeks after the read learns the longer length. The Memory regression test checks both the returned bytes and the adapter's relative end.Are there any user-facing changes?
A warmed open-ended read can now continue beyond the cached end when a completed chunk reports growth.
SeekFrom::Enduses the initial plan until the adapter learns a longer end.Reader::metadata()still exposes the first observation.At the cached EOF an empty plan can still return EOF without a request; beyond it, direct reads and adapters keep their existing behavior. Explicit bounds, hints, and limits retain their existing semantics, as do shrink and responses that supply no full length.
Breaking changes
AI Usage Statement
pivia T3, modelmagpie/codex/gpt-6.2-astra, efforthigh. Scoped the bounded warm-chunk growth repair and coordinated implementation, verification, and independent review.pivia T3, modelmagpie/codex/gpt-6.2-sol, effortmax. Evaluated design alternatives against retry, admission, and cache controls, implemented the signed commit (734226c802), measured in-processMemoryoverhead, and verified the PR text against the accepted diff.pivia T3, modelmagpie/codex/gpt-6.2-sol, efforthigh. Independently reviewed the signed commit and reproduced the regression, ordering/overflow/cancellation edge cases, and cost measurements.pivia T3, modelmagpie/agy-cli/gemini-4-neon, efforthigh. Drafted the PR title and body.Native Memory and Foyer exercised the read behavior locally. HTTP and layer fault controls used injected fixtures.