Skip to content

Commit cfff9b1

Browse files
chore(governance): the human-merge line threshold is 3,000 changed lines (HUMAN_MERGE_LINE_THRESHOLD), per the maintainer's 2026-10-09 ruling
The maintainer, 2026-10-09, verbatim: 「这种大额改动就应该人工审核,我还是建议5000行的人工审核门槛降到 3000,立卡。」 - scripts/pm/check-governed-merges.mjs: the one declaration moves 5000 → 3000; the header and docblock prose state 3,000 beside the earlier quotes (kept verbatim) with the 2026-10-09 words added; the self-test pins on the line (ruled default, exactly-at under, over-by-one over, the lift's unchanged threshold, the --test / --json runs, the fixture subjects) move to 3000 / 3001; the parse-only probes stay. - scripts/pm/check-governed-queue-guard.mjs: the stated value in the header, the 2026-10-09 words beside the earlier two in the header and in the REFUSED guidance, and the pin on that guidance extended to the new words. - scripts/pm/check-skill-line-ratchet.mjs: the sentence describing the rule line. - scripts/pm/dispatch-gates.mjs: the one pin on the constant (3000 / 3001); nothing else in the frozen file. - .claude/skills/pm-dispatch/SKILL.md, references/landing-operations.md, AGENTS.md: the digit in place, 0 net lines. Claude-Session: https://claude.ai/code/session_01JmWtcHfGbC4ncw4GFKWuRA Co-authored-by: Claude <noreply@anthropic.com>
1 parent f66c440 commit cfff9b1

7 files changed

Lines changed: 57 additions & 40 deletions

File tree

‎.claude/skills/pm-dispatch/SKILL.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ PM 的工作是循环:选卡 → 认领 → 派发 → 收集 → 复核 → 报
183183
- governed 面统一定义:`docs/adr/**` + `.claude/**`(全量)+ `skills/**` + `docs/NORTH-STAR.md`。
184184
- governed 面同含 `AGENTS.md` + `CLAUDE.md`;`GOVERNED_REPOS` 各仓同治理待遇,执行席恒随落地仓车道。
185185
- 路径面命中 Tier H ⇒ ACCEPT 换终局四件套,混合 diff ⛔ 不按比例判;要拆让 dev 单独开 PR。
186-
- 改动 >5000 行(含生成物)同换终局四件套,⛔ 无 Tier S 例外;读数 = PR additions+deletions。
186+
- 改动 >3000 行(含生成物)同换终局四件套,⛔ 无 Tier S 例外;读数 = PR additions+deletions。
187187
- ① 复核结论照常写在 issue 上;技能面 hunk 须由契约复审档的席复核,档外席先交 skills 席。
188188
- ② PR 留给维护者看得见地悬着;终局两条:人工直合即审核记录;授权批准 ⇒ 席位落地。
189189
- 看得见 = ACCEPT 同笔挂 `needs-user-decision` + 贴终稿「维护者速读」评论;①仍是审核记录。

‎.claude/skills/pm-dispatch/references/landing-operations.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
- 确认 MERGED 要两个读数:每轮同时读队列分支与 `origin/main`。
5656
- 契约复核 PASS 落地的 PR 到窗口时已 ready 且 auto-merge 在挂,见 `contract-review.md`。
5757
- 窗口自身权责不变:跟到 MERGED、踢出处置、落地后对账。
58-
- 转 ready/入队前跑 `check-governed-merges.mjs --pr N`:受管面照两层;>5000 行(含生成物)照 Tier H。
58+
- 转 ready/入队前跑 `check-governed-merges.mjs --pr N`:受管面照两层;>3000 行(含生成物)照 Tier H。
5959
- 受管路径全在 `.claude/**` 者 Tier S:席内达档复核过落地前检三条即转正式入队。
6060
- Tier H(其余受管面)者:四件套留 draft 等人批,⛔ 不翻正式不入队;获授权批准后认领席落地。
6161
- ⛔ 两层不由席位批准;清标即落地同受此闸,漏判会被队列守卫在 merge group 里拒收。

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ Even inside your own worktree, operate defensively:
507507
⛔ **Three classes of PR never enter this path on green alone:** (a) a diff touching any **governed surface**
508508
(**Prime Directive #14**, which names them and holds the current list — **this file and `CLAUDE.md` are on it**,
509509
so re-read it rather than recalling it); (b) the **Version Packages** PR, or any PR whose merge performs a
510-
release (**Prime Directive #15**); (c) a PR whose **changed lines exceed 5,000** (`additions + deletions`,
510+
release (**Prime Directive #15**); (c) a PR whose **changed lines exceed 3,000** (`additions + deletions`,
511511
generated files included) — it lands the way a Tier H surface does: an authorized APPROVED review and then
512512
the owning seat, or a human merge. Read the PR's file list (`get_files`), **its author and its size** before
513513
you arm anything.

‎scripts/pm/check-governed-merges.mjs‎

Lines changed: 40 additions & 30 deletions
Large diffs are not rendered by default.

‎scripts/pm/check-governed-queue-guard.mjs‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,12 @@
332332
*
333333
* > 修改代码量超过某个行数(比如5000)就应该人工审核
334334
*
335+
* and on 2026-10-09 lowered the line, verbatim and untranslated:
336+
*
337+
* > 这种大额改动就应该人工审核,我还是建议5000行的人工审核门槛降到 3000,立卡。
338+
*
335339
* PR #19033 landed it seat-side: `testVerdict(paths, { size })` in the sibling
336-
* carries a `size` limb, `HUMAN_MERGE_LINE_THRESHOLD` (5,000) is declared
340+
* carries a `size` limb, `HUMAN_MERGE_LINE_THRESHOLD` (3,000) is declared
337341
* there ONCE, the comparison is `additions + deletions` STRICTLY greater, and
338342
* generated files are INCLUDED — the case that prompted the ruling, PR #18971
339343
* (+238,310 / −119, 237,706 of them regenerated), touched no governed path and
@@ -1906,6 +1910,7 @@ export function renderSizeVerdict(verdict) {
19061910
'',
19071911
' 2026-09-18 「修改代码量超过某个行数(比如5000)就应该人工审核」',
19081912
' 2026-09-27 「所以阈值写死成 5000 行 , 维护者已经批准了就是可以合并。」 (objectstack#20153)',
1913+
' 2026-10-09 「这种大额改动就应该人工审核,我还是建议5000行的人工审核门槛降到 3000,立卡。」',
19091914
'',
19101915
' landed as `HUMAN_MERGE_LINE_THRESHOLD` and the lift in scripts/pm/check-governed-merges.mjs, which',
19111916
' this leg IMPORTS — the number, the comparison, what counts and what lifts are that file\'s, never',
@@ -3455,9 +3460,10 @@ export async function selfTest() {
34553460
text18971,
34563461
);
34573462
assert(
3458-
'and-names-the-TWO-landings-an-authorized-APPROVAL-or-a-HUMAN-MERGE-quoting-both-rulings-untranslated-and-never-advises-shrinking-the-diff',
3463+
'and-names-the-TWO-landings-an-authorized-APPROVAL-or-a-HUMAN-MERGE-quoting-all-three-rulings-untranslated-and-never-advises-shrinking-the-diff',
34593464
text18971.includes('HUMAN MERGE') && text18971.includes('修改代码量超过某个行数(比如5000)就应该人工审核') &&
3460-
text18971.includes('所以阈值写死成 5000 行 , 维护者已经批准了就是可以合并。') && text18971.includes('DRAFT') && !/shrink|split the|smaller/i.test(text18971),
3465+
text18971.includes('所以阈值写死成 5000 行 , 维护者已经批准了就是可以合并。') &&
3466+
text18971.includes('这种大额改动就应该人工审核,我还是建议5000行的人工审核门槛降到 3000,立卡。') && text18971.includes('DRAFT') && !/shrink|split the|smaller/i.test(text18971),
34613467
text18971,
34623468
);
34633469
assert(

‎scripts/pm/check-skill-line-ratchet.mjs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,10 @@ export const CEILINGS = new Map([
322322
// 2026-09-18, live chat beside ruling C on the regenerated-artefact landing,
323323
// verbatim and untranslated: 「还有应该完善skills,修改代码量超过某个行数
324324
// (比如5000)就应该人工审核。」 The content is ONE rule line beside the
325-
// four-piece-terminal trigger: a PR over 5,000 changed lines (additions +
326-
// deletions, generated files included) takes the same terminal, with no
327-
// fact-layer exception; the mechanical face is `check-governed-merges.mjs`.
325+
// four-piece-terminal trigger: a PR over the human-merge line (3,000 changed
326+
// lines since the maintainer's 2026-10-09 word; additions + deletions,
327+
// generated files included) takes the same terminal, with no fact-layer
328+
// exception; the mechanical face is `check-governed-merges.mjs`.
328329
// It could not be paid in place — measured, not assumed: the trigger line it
329330
// belongs beside stands at 118 B against the 120-byte cap and the shortest
330331
// self-contained form of the rule is 111 B; of the file's 598 adjacent bullet

‎scripts/pm/dispatch-gates.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26397,7 +26397,7 @@ function selfTest() {
2639726397
t('exactly at the threshold is under it — strictly greater, as the gate reads it', atLine.includes('under.') && !atLine.includes('HUMAN MERGE'), atLine);
2639826398
const noneLine = changedLineLines(null).join('\n');
2639926399
t('an explicit path list is NOT MEASURED, said out loud, never a silent under', noneLine.includes('NOT MEASURED') && !noneLine.includes('under.') && noneLine.includes('--pr'), noneLine);
26400-
t('the threshold is read from the gate — no second copy here — and it is the ruled 5000', HUMAN_MERGE_LINE_THRESHOLD === 5000 && changedLineLines({ additions: 5001, deletions: 0 }).join('\n').includes('OVER'));
26400+
t('the threshold is read from the gate — no second copy here — and it is the ruled 3000', HUMAN_MERGE_LINE_THRESHOLD === 3000 && changedLineLines({ additions: 3001, deletions: 0 }).join('\n').includes('OVER'));
2640126401
t('a text buffer counts its lines, an unterminated last line included', lineCountOf(Buffer.from('a\nb\n')) === 2 && lineCountOf(Buffer.from('a\nb')) === 2 && lineCountOf(Buffer.alloc(0)) === 0);
2640226402
t('a buffer with a NUL in its first 8000 bytes is binary: null, which the caller counts as zero lines', lineCountOf(Buffer.from([0x61, 0, 0x62])) === null);
2640326403
// Same liveness guards as the mandatory table: dead data reading as

0 commit comments

Comments
 (0)