Increase PR size thresholds to accommodate AI-assisted development#2136
Increase PR size thresholds to accommodate AI-assisted development#2136
Conversation
Updated size tier breakpoints: - Medium: 500 → 1,000 lines - Large: 1,000 → 5,000 lines - Extra Large: new tier at 5,001–10,000 lines - Extra Extra Large: new tier at >10,000 lines (triggers warning) Previously, any PR >1,000 lines triggered a Mergify warning. With AI assistance, PRs naturally grow larger while remaining focused. The new thresholds reflect this: PRs under a few thousand lines are ideal, only those exceeding 10,000 are flagged. Changes: - .github/actions/pr-sizer/action.yml: Add xl_max_size, xxl_label, fail_if_xxl inputs and logic - .github/workflows/pr-size-labeler.yml: Update thresholds and pass new inputs - .github/mergify.yml: Retarget warning from size/xl to size/xxl - CLAUDE.md: Document PR size guidelines for Claude agents Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
The GitHub Action and Mergify rules already enforce these limits. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
Dependency Review✅ No vulnerabilities or license issues found.Scanned FilesNone |
📝 WalkthroughWalkthroughExtends the PR size-labeling system to support XXL category by increasing size thresholds, adding XXL-specific configuration options to the pr-sizer action, and updating Mergify rules to comment on XXL-labeled PRs with adjusted sizing guidance. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/actions/pr-sizer/action.yml (1)
206-214: Minor observation: identical error messages.Both XL and XXL failures use the same message. Consider differentiating them (e.g., mentioning the threshold exceeded) for easier debugging. Not blocking.
💡 Optional: differentiate error messages
// Fail if XL and configured to do so if (newLabel === xl_label && fail_if_xl) { - core.setFailed(`PR is too large (${totalChanges} changes). Please consider breaking it up into smaller PRs.`); + core.setFailed(`PR exceeds XL threshold (${totalChanges} changes, limit ${xl_max_size}). Please consider breaking it up into smaller PRs.`); } // Fail if XXL and configured to do so if (newLabel === xxl_label && fail_if_xxl) { - core.setFailed(`PR is too large (${totalChanges} changes). Please consider breaking it up into smaller PRs.`); + core.setFailed(`PR exceeds XXL threshold (${totalChanges} changes, limit ${xl_max_size}). Please consider breaking it up into smaller PRs.`); }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/actions/pr-sizer/action.yml around lines 206 - 214, The two core.setFailed calls for XL and XXL use identical messages; update them to include the label/threshold so failures are distinguishable: when newLabel === xl_label && fail_if_xl, call core.setFailed with a message that mentions xl_label and the XL threshold (e.g., "PR is too large (XL threshold: X changes, actual: ${totalChanges})."), and when newLabel === xxl_label && fail_if_xxl, call core.setFailed with a message that mentions xxl_label and the XXL threshold similarly; use the existing variables (newLabel, xl_label, xxl_label, fail_if_xl, fail_if_xxl, totalChanges) to build the distinct messages.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/actions/pr-sizer/action.yml:
- Around line 206-214: The two core.setFailed calls for XL and XXL use identical
messages; update them to include the label/threshold so failures are
distinguishable: when newLabel === xl_label && fail_if_xl, call core.setFailed
with a message that mentions xl_label and the XL threshold (e.g., "PR is too
large (XL threshold: X changes, actual: ${totalChanges})."), and when newLabel
=== xxl_label && fail_if_xxl, call core.setFailed with a message that mentions
xxl_label and the XXL threshold similarly; use the existing variables (newLabel,
xl_label, xxl_label, fail_if_xl, fail_if_xxl, totalChanges) to build the
distinct messages.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (3)
.github/actions/pr-sizer/action.yml.github/mergify.yml.github/workflows/pr-size-labeler.yml
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2136 +/- ##
=======================================
Coverage 76.57% 76.58%
=======================================
Files 832 832
Lines 79500 79500
=======================================
+ Hits 60879 60885 +6
+ Misses 14822 14817 -5
+ Partials 3799 3798 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
These changes were released in v1.208.1-test.0. |
what
Updated PR size tier thresholds to better reflect modern AI-assisted development:
why
Previously, any PR >1,000 lines triggered a Mergify warning. With Claude-assisted development, PRs naturally grow while remaining focused on single, logical changes. The new thresholds reflect this reality: PRs under a few thousand lines are ideal, only those exceeding 10,000 are flagged as too large and should be split into smaller PRs.
changes
xl_max_sizeandxxl_labelinputs to PR size actionsize/xltosize/xxl(>10,000 lines)Summary by CodeRabbit
New Features
Chores