From 9df51531c21b6c95973202d015e4997e1dd121dc Mon Sep 17 00:00:00 2001 From: AstroHan Date: Fri, 4 Sep 2026 02:21:56 +0800 Subject: [PATCH] chore(ci): cap effort/XL at 2500 readable lines and add effort/XXL effort/XL had no upper bound, so it held a quarter of merged pull requests and a third of open ones, spanning 1000 to over 10000 readable lines under one label. Reviewers treat those ends differently: past about 2500 lines a change is no longer reviewable as one unit and the first question is whether it splits. The label now says that up front instead of every reviewer measuring it again. Generated-by: Claude Code --- scripts/pr-effort.mjs | 9 ++++++--- scripts/pr-effort.test.mjs | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/pr-effort.mjs b/scripts/pr-effort.mjs index ea155f2049..bfc024e651 100644 --- a/scripts/pr-effort.mjs +++ b/scripts/pr-effort.mjs @@ -23,7 +23,7 @@ // copy fresh. Pull request search has no size qualifier, which leaves reading // effort as the one axis a query cannot express. -const EFFORT_LABELS = ['effort/XS', 'effort/S', 'effort/M', 'effort/L', 'effort/XL']; +const EFFORT_LABELS = ['effort/XS', 'effort/S', 'effort/M', 'effort/L', 'effort/XL', 'effort/XXL']; // Counted changes should track what a human actually reads. Lockfiles, // regenerated artifacts and binaries are verified by their own contracts, so @@ -40,13 +40,16 @@ const UNREAD_PATTERNS = [ ]; // Tier boundaries are inclusive upper bounds on readable lines. Test code is -// not discounted anywhere here; it is reviewed too. +// not discounted anywhere here; it is reviewed too. Past 2500 lines a pull +// request is no longer reviewable as one change, so the top tier exists to +// start the split conversation before the review does. const EFFORT_TIERS = [ { label: 'effort/XS', maxLines: 10 }, { label: 'effort/S', maxLines: 100 }, { label: 'effort/M', maxLines: 500 }, { label: 'effort/L', maxLines: 1000 }, - { label: 'effort/XL', maxLines: Number.POSITIVE_INFINITY }, + { label: 'effort/XL', maxLines: 2500 }, + { label: 'effort/XXL', maxLines: Number.POSITIVE_INFINITY }, ]; function isUnreadPath(path) { diff --git a/scripts/pr-effort.test.mjs b/scripts/pr-effort.test.mjs index 12e8d3f976..28892c8f47 100644 --- a/scripts/pr-effort.test.mjs +++ b/scripts/pr-effort.test.mjs @@ -48,6 +48,8 @@ describe('tier boundaries', () => { assert.equal(tier([file('a.ts', 501)]), 'effort/L'); assert.equal(tier([file('a.ts', 1000)]), 'effort/L'); assert.equal(tier([file('a.ts', 1001)]), 'effort/XL'); + assert.equal(tier([file('a.ts', 2500)]), 'effort/XL'); + assert.equal(tier([file('a.ts', 2501)]), 'effort/XXL'); }); it('counts additions and deletions together', () => {