Skip to content

Commit 5bc2f27

Browse files
os-litantclaude
andauthored
tooling(pm): admit a same-PR cross-file line-budget move, and take the first one (#14860)
* tooling(pm): admit a same-PR cross-file move in the skill line ratchet The per-file line ratchet is shrink-only, which prices a FACT MOVING TO ITS SINGLE-SOURCE FILE as though it were growth: the destination sits at headroom 0 like every other entry, so consolidating a misplaced per-repo reading needed a per-instance maintainer ruling even though the corpus shrank on net. Adds the declared cross-file move as the one raise an author may take alone, under the three ruled conditions: the destination's raise is at most the net decrease of the sources it names, the map-wide total does not increase, and the declaration cites the ruling that authorises it. The declaration is in-tree data carrying each participant's pre-move ceiling, so the arithmetic is computable from the working tree alone — no baseline ref a shallow CI checkout can fail to provide, and no answer that evaporates once the move has landed. Verdict lines and exit codes are unchanged; the map is empty in this commit. Part of #14685 Part of #13597 Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 * tooling: record the authorised cross-file move in the remedy-authority gate The #8435 convention asks who may take a registry-growing remedy on a shrink-only ratchet, and the answer has always been "a maintainer, per instance". One class of act is now authorised generally: a cross-file move in the per-file line ratchet, while the destination's raise is covered by the named sources' net decrease, the map-wide total does not increase, and the raised entry cites the ruling. The exception is written in comment space, because author-facing text describing a registry-growing act would make this gate an instance of the convention it enforces. Two self-test assertions hold it there: one that the phrase never reaches an author-facing message, one that the amended ratchet is still outside this non-recursive walk — so the exception stays honestly documentary, and a wider walk reds here instead of admitting a remedy class in silence. No new verdict class: a fifth class with a population of zero is enforcement nobody has. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 * docs(pm-dispatch): consolidate three misplaced per-repo readings A per-repo gate reading written into one lane charter is read by that lane and missed by the other six. Their single source is references/platform-readings.md, so the three the Phase-1 tables measured move there, under the cross-file-move rule this branch adds: lanes/cli.md -4 the objectstack required-check set, `in_progress` is not a pass, advisory red into main is shared damage lanes/services.md -2 the two aggregate-reading gate boundaries rest-channel.md -5 the merge_group count-is-not-a-mechanism tombstone, moved byte-identically platform-readings.md +10 against a net source decrease of 11, so the corpus falls by one line: the per-job-conclusion rule cli.md carried is already stated in the destination's queue section, so the moved bullet points at it rather than paying for a second copy. Ceilings move with the text (314→324, 35→31, 30→28, 93→88) and the move is declared, so the gate re-derives the arithmetic on every run instead of trusting the comment beside it. No pointer is left at any source: nothing at the three sites becomes unreadable without the moved sentence, and a pointer per move is how a corpus grows while its ledger says it shrank. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 * tooling(pm): singularise the cross-file move verdict's line counts Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 * docs(pm-dispatch): carry main's corrected exit code into the moved i18n reading references/platform-readings.md line 301 -- the bullet this branch moved out of lanes/services.md -- still said the i18n gates answer PREREQUISITE NOT MET with exit 1. main's 365141f (#14856) moved the last three i18n gates (scripts/check-i18n-coverage.mjs, scripts/check-i18n-bundles.mjs, packages/cli/scripts/check-app-nav-i18n.mjs) onto EXIT_PREREQUISITE_NOT_MET (3, from scripts/import-prerequisite.mjs) and corrected the source bullet to "退 3" in the same commit; the merge took our deletion of that bullet, so the corrected fact is carried into the moved text here rather than re-landing the claim main already corrected. Same line count (324, ceiling unchanged); no other edit. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LraLgQVGq8egUwfYZpbYt1 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 20293d6 commit 5bc2f27

6 files changed

Lines changed: 374 additions & 16 deletions

File tree

.claude/skills/pm-dispatch/references/lanes/cli.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414

1515
## 常设承诺
1616

17-
- **Required checks 六个**:`TypeScript Type Check` · `Lint & Repo Gates` ·
18-
`Test Core` · `Dogfood Regression Gate` · `Build Core` ·
19-
`Temporal Conformance (live PG + MySQL)` —— 逐 job 读各自 `conclusion`,⛔ 不认
20-
聚合,`in_progress` 不是过;advisory 门禁红进 main 是共享损伤,照样止血立单。
2117
- **PR 侧绿 ≠ 队列侧绿**;队列分支读法与边界在 platform-readings(条目名
2218
`main/pr-{number}-{parent sha}`,parent sha 可重建队序;⚠️ ref 在出队后滞留)。
2319
- `dispatch-gates.mjs` 只报**路径推导**的地板 —— 条款②从卡**内容**判且优先于它;已知盲

.claude/skills/pm-dispatch/references/lanes/services.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
—— 单独的绿不是证据。
1919
- **安全族卡的披露纪律**:复现配方不落任何公开面(卡、PR、评论);证据以抽象描述
2020
或私有通道承载。
21-
- 门禁读数不轻信聚合:`check:type-check-debt` 可以在包级 typecheck 绿时红;
22-
`check:i18n` 以「PREREQUISITE NOT MET — workspace CLI 未 build」退 3 不是漂移。
2321

2422
## 席内判断
2523

.claude/skills/pm-dispatch/references/platform-readings.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,16 @@
294294
降档(那正是降档保险丝要拒的替换),但「本车道 fable 强制」多是过宽的回忆 ——
295295
`dispatch-gates.mjs --tier PATH` 逐路径现推(实测:`SKILL.md``.claude/agents/**` 强制,`scripts/pm/**`
296296
`references/**` 无 ⇒ 全阻塞的三卡 fold 拆成 1 阻 3 可跑);路径线是**下限不是放行**
297+
- **required checks 的名单是每仓事实**(逐 job 读判定的规则住上面队列段):objectstack 六个 ——
298+
`TypeScript Type Check` · `Lint & Repo Gates` · `Test Core` · `Dogfood Regression Gate` ·
299+
`Build Core` · `Temporal Conformance (live PG + MySQL)`;`in_progress` 不是过;advisory 门禁
300+
红进 main 是共享损伤,照样止血立单。⛔ 聚合命令同样不作判定:`check:type-check-debt` 可在
301+
包级 typecheck 绿时红;`check:i18n` 以「PREREQUISITE NOT MET — workspace CLI 未 build」退 3 不是漂移。
302+
- ⚠️ **计数不是机理读数(被当天推翻的推断的墓碑)**:「`GET .../actions/runs?event=merge_group`
303+
计数 0 ⇒ required 集为空」提出当天即被自身推翻 —— 同一姊妹仓 2026-08-24 首现 merge_group
304+
run(0 → 8),同日再测 224(阳性对照 `event=pull_request` 全程非零)。计数答「至今发生过没有」,
305+
不答「机制在不在」:零计数只作**弱先验**,判 required 集为空要读 ruleset
306+
的 required 集本身、或看队列合并是否真在等检查;⛔ 别处写下的计数值一律先复测再用。
297307

298308
## 闭合关键词解析(PR 正文写侧)
299309

.claude/skills/pm-dispatch/references/rest-channel.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,6 @@ payload → REST → MCP/GraphQL** 的策略住那里,本表是逐操作的通
7676
`PUT .../pulls/{n}/merge`,强制队列 ruleset 下回 **405 `Changes must be made through the merge queue`**;② PR
7777
上的 `added_to_merge_queue` timeline 事件;③ 对已入队 PR 调 update-branch 回「已入队分支不能更新,
7878
要改先出队」。①② 拼写与边界是 `platform-readings.md` 队列段既有行,本条只归拢判据。
79-
- ⚠️ **计数不是机理读数(被当天推翻的推断的墓碑)**:「`GET .../actions/runs?event=merge_group`
80-
计数 0 ⇒ required 集为空」提出当天即被自身推翻 —— 同一姊妹仓 2026-08-24 首现 merge_group
81-
run(0 → 8),同日再测 224(阳性对照 `event=pull_request` 全程非零)。计数答「至今发生过没有」,
82-
不答「机制在不在」:零计数只作**弱先验**,判 required 集为空要读 ruleset
83-
的 required 集本身、或看队列合并是否真在等检查;⛔ 别处写下的计数值一律先复测再用。
8479
- **required job 名与分片矩阵的改名耦合(现行,自 2026-08-24)**:
8580
队列 required 集按 **job / check-run 名**匹配,**workflow 名从不作为 check context 出现**(所以拿
8681
workflow 名在选择器里搜什么也搜不到);改其中任一 job 名**或 test 分片矩阵的形状**,

scripts/check-ratchet-remedy-authority.mjs

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,49 @@
1616
// precedents are check-type-source-resolution.mjs, check-test-source-alias.mjs,
1717
// check-adr-links.mjs and check-driver-memory-census.mjs.
1818
//
19+
// ── The ruled EXCEPTION: an authorised cross-file move (2026-09-03) ─────────
20+
//
21+
// The disjunction above asks WHO may take a registry-growing remedy, and on a
22+
// shrink-only ratchet the answer was always "a maintainer, per instance". One
23+
// class of act is now authorised generally instead of one PR at a time.
24+
// Maintainer ruling, 2026-09-03, adopting option A of item 5 in the skills
25+
// optimization programme's third decision batch (#14685, comment 5520452691) —
26+
// verbatim and untranslated: 「同意」; the text it adopts:
27+
//
28+
// the per-file line ratchet admits a cross-file move in one PR when the
29+
// destination's allowance rises by no more than the source's net decrease and
30+
// total lines do not increase, with the ruling cited in the ratchet comment;
31+
// `check:ratchet-remedy-authority`'s self-description gains this exception
32+
//
33+
// So: a cross-file MOVE in the per-file line ratchet is NOT a maintainer-only
34+
// remedy while all three conditions hold — the destination's raise is covered by
35+
// the named sources' net decrease, the map-wide total does not increase, and the
36+
// raised entry cites that ruling. The scope is exactly the act the ruling names,
37+
// in the gate the ruling names. A raise failing any condition is an ordinary
38+
// raise and belongs to a maintainer as before, and no other ratchet in this farm
39+
// gains anything: the reason a move is not a weakening is that the corpus SHRANK
40+
// on net, which is a property of the act, not of the author.
41+
//
42+
// ⚠️ TODAY THE EXCEPTION IS DOCUMENTARY, and recording that is half the point of
43+
// writing it here. The corpus walk is a NON-RECURSIVE readdir of `scripts/` (see
44+
// corpusFiles), and the gate the ruling amends lives one directory down, in
45+
// scripts/pm/ — it has never been in this sweep, so no verdict of this gate
46+
// moves. A self-test assertion pins that, so a wider walk reds HERE and makes
47+
// the class a decision someone takes rather than one that lands in silence.
48+
//
49+
// ⛔ NO NEW VERDICT CLASS. `marked` / `refused` / `unmarked` / `excluded` stay as
50+
// they are. A fifth class for "authorised by standing ruling" would have a
51+
// population of zero in this corpus, and an unreachable class is a claim of
52+
// enforcement nobody has — the same defect this file's control corpus exists to
53+
// prevent, one level up. If the walk ever reaches a gate offering this act, the
54+
// honest first move is to read that gate's own verdict and record it in CONTROL,
55+
// the way every instance in this file arrived.
56+
//
57+
// ⛔ THIS SECTION IS COMMENT, never a string literal — the header warning above,
58+
// applied to itself. It describes an act that grows a registry, so in
59+
// author-facing text it would make this gate an instance of the convention it
60+
// enforces and flip its own verdict off `excluded`.
61+
//
1962
// WHY A SWEEP AND NOT A SHARED MODULE. #8519 proposed a shared helper module as
2063
// the enforcement route. It is not one: a module is reachable only from gates
2164
// that choose to import it, so it standardises the gates that already agreed and
@@ -146,11 +189,12 @@ const SELF_TEST_BATTERIES = Object.freeze({
146189
'(19) …and the mirror: the token in a string literal DOES count. Paired with': 1,
147190
'(17) This gate must not be an instance of its own convention.': 1,
148191
'(20) The declared population, held to the walk in BOTH directions (#13813)': 7,
192+
'(21) The ruled cross-file-move exception (2026-09-03)': 2,
149193
});
150194

151195
// DELETING an entry silences that battery's floor exactly as effectively as
152196
// zeroing it, so the roster's own size is pinned too.
153-
const SELF_TEST_BATTERY_FLOOR = 20;
197+
const SELF_TEST_BATTERY_FLOOR = 21;
154198

155199
// The key an assertion is filed under when no battery is open. It is not a
156200
// declared battery, so it reds by the same set difference rather than silently
@@ -1347,6 +1391,29 @@ function selfTest() {
13471391
+ 'nothing, and a dead declaration prints as the same silence as declaring nothing)',
13481392
!ROOT_DIR_WATCH_HINTS.some((h) => h.includes('{')));
13491393

1394+
// ── (21) The ruled cross-file-move exception (2026-09-03) ───────────────
1395+
//
1396+
// Two assertions, and both are about THIS FILE rather than about the ratchet
1397+
// the ruling amends: where the exception is written down, and whether it is
1398+
// doing anything yet. Neither can be held by the run — a header section runs
1399+
// green whatever it says, which is exactly how a documented exception drifts
1400+
// into a claimed one.
1401+
battery('(21) The ruled cross-file-move exception (2026-09-03)');
1402+
const selfSrc = readFileSync(join(SCRIPTS_DIR, SELF_FILE), 'utf8');
1403+
// ⛔ The phrase is ASSEMBLED, never spelled, for the reason the ADD hoist above gives in
1404+
// its own case: a literal spelling would put the phrase into THIS file's author-facing text
1405+
// and falsify the assertion below by the act of making it.
1406+
const EXCEPTION_PHRASE = ['cross-file', 'MOVE'].join(' ');
1407+
expect('the ruled exception is recorded in COMMENT space only — written into author-facing text '
1408+
+ 'it would describe a registry-growing act, and this gate would then read as an instance of '
1409+
+ 'the convention it enforces, which is what assertion (17) catches',
1410+
selfSrc.includes(EXCEPTION_PHRASE)
1411+
&& !authorFacingMessages(selfSrc).some((m) => m.includes(EXCEPTION_PHRASE)));
1412+
1413+
expect('the ruled exception is documentary today: the amended line ratchet lives one directory '
1414+
+ 'down and this walk is non-recursive, so a wider walk reds HERE rather than admitting a new '
1415+
+ 'remedy class in silence',
1416+
!corpusFiles().includes('check-skill-line-ratchet.mjs'));
13501417
// ── The floor: every declared battery RAN, and ran its cases (#13489) ───
13511418
//
13521419
// Evaluated after every battery has had its chance and BEFORE the verdict, so

0 commit comments

Comments
 (0)