Skip to content

feat(groom): raise the pr_size_limit default from 400 to 600 lines (BE-6161) - #108

Open
mattmillerai wants to merge 2 commits into
mainfrom
matt/be-6161-groom-pr-size-limit-600
Open

feat(groom): raise the pr_size_limit default from 400 to 600 lines (BE-6161)#108
mattmillerai wants to merge 2 commits into
mainfrom
matt/be-6161-groom-pr-size-limit-600

Conversation

@mattmillerai

Copy link
Copy Markdown
Contributor

ELI-5

Groom's auto-builder refuses to open a PR whose patch changes more than pr_size_limit lines — it files a groom issue instead so nobody has to review a giant machine-written diff. That ceiling was 400. This raises the shared default to 600, in the reusable workflow, so it changes once under review instead of 28 times across callers.

Why 600, and why not 1000

Measured across both builder repos on 2026-08-02: 49 groom issues, 7 bail issues, exactly 1 patch-too-large — and that one was 403 lines changed (> 400). Three lines over. The other 6 bails are CI-privileged-file / security refusals that no size change affects. So 400 was not systematically too tight; it caught one boundary case, and 600 buys headroom for that shape without a large jump.

1000 was rejected deliberately, even though it is the org's human PR cap (pr-size.yml max_lines), for two reasons — both now recorded in the input's description so the next person doesn't "harmonize" the numbers:

  1. Different counting basis. pr-size.yml counts non-generated changed lines — it strips lockfiles and linguist-generated/Code generated output first, and offers an oversized-ok bypass label. Groom counts raw changed lines with no exclusions. 1000-non-generated and 1000-raw are not the same quantity.
  2. Different risk. The human cap is advisory on a diff whose author chose the scope and can defend it in review. pr_size_limit is a hard refusal on a diff with no author to interrogate; the failure mode is a reviewer approving 900 plausible-looking machine-written lines because nothing in it looks wrong. The machine does not get the same benefit of the doubt, on purpose.

What changed

  • .github/workflows/groom.ymlpr_size_limit default 400600, plus the expanded description above (below-the-human-cap rationale + the measured evidence for the raise).
  • Same file — a code comment's illustrative value (e.g. 400.0) follows the default to 600.0. The parsing behaviour it documents is unchanged.

What deliberately did NOT change

  • pr_size_limit stays in _LOCKED_KEYS (.github/groom/config.py). It is the backstop against an unreviewably-large machine patch; a repo raising its own ceiling via GROOM_CONFIG without review defeats it. Raising the shared default here, under review, is the sanctioned act. Already covered by test_pr_size_limit_is_locked.
  • bail_sink (BE-6157) is untouched. That ticket is about suppressing bail issues; this one is about producing fewer bails in the first place. Complementary, neither replaces the other.
  • No new test asserting 600. Nothing in .github/groom/tests/ asserted 400 — the number lived in exactly one place (this default) — and a test that re-reads the YAML to assert the literal would recreate the two-places drift the ticket warns about. The invariant actually worth guarding (the key stays locked) is already tested.

Propagation — this does not take effect immediately

Callers are SHA-pinned (uses: ...@<sha> + matching workflows_ref), so a repo keeps 400 until its pin advances past this commit: merge here → bump-groom-callers.yml opens SHA-bump PRs for every repo in GROOM_CALLERS → 600 takes effect per repo as those merge. Two consequences worth stating so nobody is surprised: the 4 callers absent from GROOM_CALLERS (already stranded on older SHAs, BE-6015) will not get this; and the pending builder callers of BE-5920 inherit 600 for free since they pin current main at implementation time.

Verification

  • python3 -m unittest discover -s .github/groom/tests -p 'test_*.py'170 tests, OK.
  • Parsed groom.yml with PyYAML and read the resolved input back: default is the integer 600, and the folded description renders as the intended three paragraphs (blank-line handling in >- is easy to get wrong, so it was checked rather than assumed).
  • Cross-checked every claim the new description makes about pr-size.yml against that file: max_lines default 1000, generated/lockfile exclusion, oversized-ok bypass label — all accurate.
  • Swept pr_size_limit / PR_SIZE_LIMIT / 400 across workflows, .github/groom/, .github/bump-callers/, and both READMEs: no caller in this repo passes pr_size_limit, so no caller-side value silently keeps 400.

Judgment calls

  • The description now carries the why, at some length, because the "just match the 1000-line human cap" instinct is exactly the thing that would quietly undo this. The literal 600 appears in the prose only in the historical "raised 400 → 600" note; the forward-looking sentence says "the default" so the prose can't drift from the value.
  • The two acceptance criteria that live past merge — bump PRs opening for registered callers, and confirming 600 in effect on the next builder run via the resolved-knobs line (not the per-job pr_size_limit: input echo, which shows the input default) — cannot be met inside this PR and are unverified here by construction.

…E-6161)

Measured across both builder repos on 2026-08-02: 49 groom issues, 7 bails,
exactly one patch-too-large — and that one was 403 lines changed (> 400). The
other six bails are CI-privileged-file / security refusals no size change
affects. So 400 was not systematically tight; it caught one boundary case, and
600 buys headroom for that shape without a large jump.

1000 (the org's human PR cap in pr-size.yml) is deliberately NOT copied: that
cap counts non-generated lines with an oversized-ok bypass and is advisory on an
author-defended diff, while this is a hard refusal on raw changed lines with no
author to interrogate. The input description now records both reasons.

pr_size_limit stays a _LOCKED_KEY — a repo must not raise its own ceiling via
GROOM_CONFIG; raising the shared default under review is the sanctioned act.
@mattmillerai mattmillerai added the agent-coded Authored by the agent-work loop label Aug 2, 2026
@mattmillerai
mattmillerai marked this pull request as ready for review August 2, 2026 21:44
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 27 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f56a5373-1fb8-42a4-9182-9acd541b941b

📥 Commits

Reviewing files that changed from the base of the PR and between bcde90f and 5755028.

📒 Files selected for processing (1)
  • .github/workflows/groom.yml

Comment @coderabbitai help to get the list of available commands.

@mattmillerai mattmillerai added the cursor-review Multi-model cursor review label Aug 2, 2026

@github-actions github-actions 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.

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

Found 2 finding(s).

Severity Count
🟢 Low 1
⚪ Nit 1

Panel: 8/8 reviewers contributed findings.

Comment thread .github/workflows/groom.yml Outdated
Comment thread .github/workflows/groom.yml Outdated
…E-6161)

Review found the new prose overstates two things about the size gate.

- The `_LOCKED_KEY` note said review here is "the only way it moves".
  The lock covers the GROOM_CONFIG/config layers only and explicitly
  exempts caller defaults (config.py), and the builder job reads
  `inputs.pr_size_limit` directly — so a consumer caller can still
  raise its own ceiling via `with:`. Say what the lock actually
  buys (no un-reviewed variable-layer raise) and point an auditor at
  the caller.
- "raw changed lines with no exclusions" oversells the bound: the
  count sums `git diff --cached --numstat`, which reports `-` for
  binary files (counted as 0), and counts lines regardless of length.
  Name both gaps so the basis is not read as a byte budget.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-coded Authored by the agent-work loop cursor-review Multi-model cursor review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants