sweep: catch the files variant of GitHub's too-large diff - #50
Merged
Conversation
#49 only matched "diff exceeded the maximum number of lines". GitHub 406s on TWO limits — 20000 lines and 300 files — so #8338 and #8241 (both over the file cap) stayed in the retry loop after the fix, while #8308 and #8121 correctly dropped out. Match gh's stable `PullRequest.diff too_large` code, which both variants carry, and keep the prose patterns as a fallback. Both real payloads are pinned in the test.
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.
Follow-up to #49, which fixed the retry loop for only half the affected PRs.
What #49 missed
GitHub 406s a diff on two independent limits, with different prose:
isDiffTooLargematched only the lines wording. So after deploying #49, the live bevyl sweep split cleanly down the middle:The fix
Match gh's stable error code, which both variants carry:
/PullRequest\.diff too_large|diff exceeded the maximum number of (lines|files)/iThe code comes first deliberately — the prose differs per limit and can be reworded, but
too_largeis what gh emits for both. The prose patterns stay as a fallback.Messages now name both limits (
20000-line / 300-file) rather than asserting the line cap for a PR that actually blew the file cap.Both real payloads, copied verbatim from the live #8121 and #8338 failures, are pinned in the test.