Repository navigation
fix(triage): read a large pull request's whole diff for the judge - #691
Closed
TheGreatAxios wants to merge 1 commit into
Closed
TheGreatAxios wants to merge 1 commit into
TheGreatAxios wants to merge 1 commit into
Conversation
The facts step stopped reading patches after 270,000 chars, three judge requests' worth, so on a larger pull request the files past it reached the judge without lines and focused and docs stayed unconfirmed. The judge already splits a diff by file across up to 64 requests and combines the answers in code; the patch budget now matches what those 64 requests hold, and past it the unread files are listed as before.
Contributor
Author
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.
The judge already splits a large diff by file across several calls, up to 64 per pull request, and combines focused and docs in code (any slice that is a separate change fails focused, every serving slice passes it, anything else is Unsure; any file part needing docs fails docs). The trim that left #688 Unsure sat earlier, in the facts step: it stopped reading patches after 270,000 chars, three calls' worth, so later files reached the judge without lines and focused listed them as unread.
The facts step now reads patches up to what the 64 calls can hold (64 × 90,000 = 5,760,000 chars). Past that budget, files are listed as unread and the rule is Unsure naming them, as before. A split needing more than 64 calls leaves the judged rules Unsure with "pull request too large for the decision model (N requests)", as before. Nothing is trimmed silently. Small pull requests are unchanged. Bitbucket Data Center lists no patches, so it is unaffected.
facts.ts:MAX_PATCH_CHARSisMAX_JUDGE_REQUESTS * MAX_SYSTEM_ONE_STATE_BYTES.quality.tsexportsMAX_JUDGE_REQUESTS.docs/DECISION_MODEL.md: the limit, the unread-files text and the cost of the largest pull request. ARCHITECTURE.md and the user manual do not mention this budget.Verification
listFilesandprepareQualityEvaluation, using its files from the GitHub API. Before: 58 of 141 files had patches, 4 calls, and 78 files unread by focused. After: every file with lines has its patch (135; the other 6 are removed PNGs), 9 calls, and 0 files unread by focused.pr-triage.test.ts, which runs the facts director against a fake GitHub, now uses more than 270,000 chars of patch. It checks that every file reaches the judge across at least 4 calls. On main it fails with 10 files missing; on this branch it passes.bun --conditions=intx-src test ./packages/triage-workflows/: 285 pass, 0 fail.bun run lint: exit 0, no new warnings.bun run test:chain: locally it printed nothing for 300 s and was stopped, so CI runs it. Its fixture has a one-line patch and does not reach the budget.Waiting on you
Closes CL-11613