Conversation
Count only additions to implementation files when deciding which open PRs qualify for the stale review reminder. Tests, snapshots, fixtures, docs, lockfiles, generated code, localization files and assets no longer count toward the 200-line limit. The Slack digest names the new rule and shows each PR's implementation line count. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ng docstrings Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Member
|
@vinnyjth all this does is add more PRs to the list of PRs that are not getting reviewed, how does that help? Seems like it just piles on |
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.
Why
The stale-review reminder in the Slack digest only lists PRs under 200 lines added, and it measures that with GitHub's raw
additions. That total counts test files, snapshots, docs and lockfiles, so a PR like apollos-cluster#4678 with 118 lines of implementation and 191 lines of tests never gets a reminder, while Linear's review page shows the implementation-only number for the same PR.Across the eight repos bug-board tracks, 389 of 2,064 recent PRs (open, or merged in the last 30 days) fail the raw gate but pass an implementation-only gate. None move the other way.
Solution
implementation_lines.py(new):is_implementation_pathclassifies a path by directory name and filename pattern, andcount_implementation_additionssums per-file additions across implementation files. When GitHub truncates the file list (more than 100 files) or returns none, it falls back to the PR's total additions, so a PR is never under-counted.github.py: the existing PR query also requestsfiles(first: 100) { path additions }. No extra request per PR, and the page cost stays at 1 rate-limit point per 20 PRs.get_prs_waiting_for_review_by_reviewergates onREVIEW_REMINDER_MAX_IMPLEMENTATION_ADDITIONS(200) and stamps each qualifying PR withimplementation_additions.jobs.py: the digest header names the rule and what it excludes, and each PR line shows its implementation line count.Excluded from the count: test, fixture and mock directories and filename patterns (
__tests__,*.test.*,*.tests.*,*.spec.*,test_*.py,*_test.go), snapshots, docs (*.md,*.mdx,*.rst,docs/), agent guidance (.cursor/,.claude/), lockfiles, generated code, Storybook stories, localization files, and binary assets.Not in this PR: per-repo overrides through
.gitattributesreview categories (the convention Linear's review UI reads). The default classifier handles every path pattern seen in the current data, so overrides can follow when a repo needs one. Dashboard pages do not show PR sizes, so the Slack digest is the only reporting surface that changes.To Test
python -m unittest discover -s tests -p 'test_*.py': 219 tests pass.ruff check,ruff format --checkandmypyare clean.additionsinstead of the implementation count; drop thetestsdirectory rule; drop the count from the digest line.jobs.post_stale()against live GitHub with Slack delivery intercepted and Linear stale issues stubbed to empty, once onmainand once on this branch. Before: 21 PRs across 7 reviewers. After: 34 PR lines for the same 7 reviewers, with 9 PRs newly surfaced. Retrieval took 30s to 37s on the branch across three runs and 40s on main, so the extra field did not slow the job.Proof
Real digest text from both runs, rendered locally in Slack style. Highlighted lines are the PRs the raw count hid.
Which PRs qualify under each rule, per repo, for every non-draft PR open or merged since 2026-08-18.
What the classifier removes, by category.
The PRs the reminder starts surfacing. 36 of the 389 are Dependabot bumps whose bulk is a
package-lock.json; the table shows the human-authored ones.Open decision
Dependabot lockfile bumps now count as tiny PRs, so they get a reminder when a review request has waited more than 24 hours. If that is unwanted noise, skipping bot authors in the reminder is a one-line follow-up.
Posted by Claude Code on behalf of @vinnyjth
🤖 Generated with Claude Code