CL-8979: page large read_file responses through to the end - #1180
Merged
TheGreatAxios merged 7 commits intoSep 27, 2026
Merged
TheGreatAxios merged 7 commits into
TheGreatAxios merged 7 commits into
Conversation
Deep pages past the scan ceiling, path+offset chains, blob resume without re-scan, overlong-line windowing, truncation pass-through, loop-detector and registry pins. All five paging tests fail before the fix; pins hold.
Large-file pages used to dead-end: the scan ceiling fired while unread content remained, overlong lines were grep-only, and the 10k re-cut mangled footer-bearing pages. Resume now seeks to the stored point, pages carry both offset and cursor continuations, and footer-bearing pages pass the truncation layer untouched.
Drop the dual footer and live-cursor reuse so continuation is a single stateless path+offset notice, matching the single-way resume direction. Pre-existing cursor tests become same-URI+offset chains; the truncation 10k exemption keys on the offset footer only. Paging mechanics untouched.
A single line past the 8MB scan ceiling was truncated to 2000 chars under a continuation footer whose offset skipped the unshown middle. The scan-capped remainder is now windowed like smaller overlong lines, so every scanned byte reassembles through offset continuation.
evaluateSubAgentStop returns null on any tool turn, so the chunked-reads case pinned nothing. Chunk keying stays covered in thrash.test.ts and null-on-tools in the keeps-running test.
Footer-bearing read_file pages already skip the leisure 10k cut so the 50KB page and its continuation footer reach the reactor. The always-on size-cap then sliced the first 10k of the body and dropped Use offset=. Skip that cap for the same pages leisure skips. Dead offsets on files larger than the 8MB scan ceiling now report beyond-EOF with the path and valid range. Skip bytes still do not count against the scan ceiling.
TheGreatAxios
force-pushed
the
cl-8979-make-large-read_file-responses-explicitly-and-reliably
branch
from
September 27, 2026 22:39
bac09d6 to
aa0e05f
Compare
TheGreatAxios
enabled auto-merge (squash)
September 27, 2026 22:40
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.
Greens the red paging tests from d4de77f.
Second-pass critic follow-up (reactor 10k footer):
createSizeCapTransformfor footer-bearingread_filepages (sameUse offset=predicate leisure already uses). Pages stay at the 50KB budget. The global 10k cap is unchanged for every other tool and forread_fileresults without a continuation footer. Shrinking pages to 10k was rejected because it would defeat paging.createSizeCapTransform(10k)keepsUse offset=and is byte-identical to the leisure page.[offset N is beyond end of file PATH (M lines); valid offsets 0-(M-1)]), not the scan-limit. Skip bytes still do not count against the scan ceiling.Verification:
bun run typecheckexit 0;bun run lintexit 0;bun test ./src ./tests ./evals ./scripts --randomize --seed 424242: 8036 pass 0 fail.Fixes CL-8979