Repository navigation
fix(engine): approve once the reviewer has read every changed line the prompt left out - #46
Merged
TorstenDittmann merged 1 commit intoNov 16, 2026
Conversation
…e prompt left out A pull request whose diff passes maxDiffChars could never be approved: any code file left out of the prompt withheld approval, even after the reviewer read it with read_file. Record the head lines read_file returns, list each omitted file's changed lines in files_not_shown, and count a file as reviewed once every one of them was read.
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.
Large pull requests can never be approved. Files are added to the prompt until
maxDiffChars(150k) runs out. Every code file that doesn't fit setstruncated, and that withholds approval, even when the reviewer opens the file withread_file.This blocks generated SDK release PRs every time. On sdk-for-node#182,
src/services/project.ts(64k) and three other files push past the budget.Change
createRepoToolstakesonRead(path, startLine, endLine). It reports the head lines eachread_fileactually returned, after the 400-line cap. The reviewer, subagents and verifier all report through it.truncatedskips a left-out file once every one of itscommentableLines(the head side the diff would have shown) lies inside a range that was read. A file whose diff was too large to load (omitted, no hunks) still withholds approval, because its lines are unknown.files_not_shownentry for each file that was too large now lists the changed line spans, so the reviewer knows what to read.The verdict is still made in code: the model cannot claim it read something. Only lines the tool returned count.
Tests
withholds approval for outside contributors and incomplete reviewsnow covers a scripted reviewer that reads the left-outsrc/big.ts. The review approves, and the prompt listschanged lines 1-1. With theseencheck reverted, that assertion fails (commentinstead ofapprove).bun run test(394 pass),lintandcheckare all green.