Skip to content

ci: fail when a PR adds a module size exception - #10979

Merged
Xuanwo merged 1 commit into
lance-format:mainfrom
shu-chen-dot-ca:fix-10844-new-module-size-exception
Nov 13, 2026
Merged

Xuanwo merged 1 commit into
lance-format:mainfrom
shu-chen-dot-ca:fix-10844-new-module-size-exception

Conversation

@shu-chen-dot-ca

Copy link
Copy Markdown
Contributor

Closes #10844.

ci/module_size_exceptions.txt says "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 base and head, the same point the module sizes are compared from. Entries that are not there are reported as New module size exception errors (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 usual Module too large error. Using the merge base rather than base keeps a PR branch that has not yet merged main's latest list edits from being blamed for them; for the workflow's HEAD^1 HEAD test merge the two are the same commit.

How was this patch tested

New test_pr_changes_exceptions cases in ci/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 on main. The existing test_pr_diverged_from_main cases still pass with both HEAD and HEAD^2 as head.

pytest ci/test_check_module_size.py (22 passed), ruff format --check and ruff check (0.11.2, as in pre-commit) and typos on 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 against origin/main (passes).

Before After
before after

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions github-actions Bot added the ci Github Action or Test issues label Nov 12, 2026

@lance-gatekeeper lance-gatekeeper Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

@lance-gatekeeper lance-gatekeeper Bot added the K-approved Latest Gatekeeper recommendation permits acceptance. label Nov 12, 2026

@Xuanwo Xuanwo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Xuanwo
Xuanwo merged commit 8e97763 into lance-format:main Nov 13, 2026
11 checks passed
@shu-chen-dot-ca
shu-chen-dot-ca deleted the fix-10844-new-module-size-exception branch November 13, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Github Action or Test issues K-approved Latest Gatekeeper recommendation permits acceptance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The module-size exception list is append-only in name only: a PR can exempt the module it grows

2 participants