Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
✅ Gate recommendation: approve.
This closes #10844 by enforcing the existing shrinking-list policy. Local regression tests and a merge-commit reproduction verify the fix while preserving existing exceptions, removals, and diverged-branch behavior.
Xuanwo
approved these changes
Nov 13, 2026
Xuanwo
left a comment
Member
There was a problem hiding this comment.
Approved for squash merge: the check now reads the exceptions list at the merge base, so only entries present on both sides downgrade growth, and additions fail the job, summary, and exit code. Hosted checks and CI-script tests are green on this commit.
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.
Closes #10844.
ci/module_size_exceptions.txtsays "Do not add new entries", but the check read the list only from the head commit, so a PR could grow a module past 400 KB and list it in the same change: the error became a warning and the job passed.The check now also reads the list at the merge base of
baseandhead, the same point the module sizes are compared from. Entries that are not there are reported asNew module size exceptionerrors (and in the step summary), and only entries present on both sides downgrade growth to a warning, so a newly listed module that grows also gets the usualModule too largeerror. Using the merge base rather thanbasekeeps a PR branch that has not yet merged main's latest list edits from being blamed for them; for the workflow'sHEAD^1 HEADtest merge the two are the same commit.How was this patch tested
New
test_pr_changes_exceptionscases inci/test_check_module_size.py: an entry added for a module the PR grows (fails with both errors), an entry added for an oversized module the PR does not touch (fails), an entry already on the base whose module grows (warning, passes), and an entry removed after a split (passes). The first two fail onmain. The existingtest_pr_diverged_from_maincases still pass with bothHEADandHEAD^2as head.pytest ci/test_check_module_size.py(22 passed),ruff format --checkandruff check(0.11.2, as in pre-commit) andtyposon the two changed files pass. I also ran the script on a test merge commit (HEAD^1 HEAD) whose PR side adds an entry (fails), and on this branch againstorigin/main(passes).