Skip to content
4 changes: 0 additions & 4 deletions .claude/skills/pm-dispatch/references/lanes/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@

## 常设承诺

- **Required checks 六个**:`TypeScript Type Check` · `Lint & Repo Gates` ·
`Test Core` · `Dogfood Regression Gate` · `Build Core` ·
`Temporal Conformance (live PG + MySQL)` —— 逐 job 读各自 `conclusion`,⛔ 不认
聚合,`in_progress` 不是过;advisory 门禁红进 main 是共享损伤,照样止血立单。
- **PR 侧绿 ≠ 队列侧绿**;队列分支读法与边界在 platform-readings(条目名
`main/pr-{number}-{parent sha}`,parent sha 可重建队序;⚠️ ref 在出队后滞留)。
- `dispatch-gates.mjs` 只报**路径推导**的地板 —— 条款②从卡**内容**判且优先于它;已知盲
Expand Down
2 changes: 0 additions & 2 deletions .claude/skills/pm-dispatch/references/lanes/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
—— 单独的绿不是证据。
- **安全族卡的披露纪律**:复现配方不落任何公开面(卡、PR、评论);证据以抽象描述
或私有通道承载。
- 门禁读数不轻信聚合:`check:type-check-debt` 可以在包级 typecheck 绿时红;
`check:i18n` 以「PREREQUISITE NOT MET — workspace CLI 未 build」退 3 不是漂移。

## 席内判断

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

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

Expand Down
5 changes: 0 additions & 5 deletions .claude/skills/pm-dispatch/references/rest-channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ payload → REST → MCP/GraphQL** 的策略住那里,本表是逐操作的通
`PUT .../pulls/{n}/merge`,强制队列 ruleset 下回 **405 `Changes must be made through the merge queue`**;② PR
上的 `added_to_merge_queue` timeline 事件;③ 对已入队 PR 调 update-branch 回「已入队分支不能更新,
要改先出队」。①② 拼写与边界是 `platform-readings.md` 队列段既有行,本条只归拢判据。
- ⚠️ **计数不是机理读数(被当天推翻的推断的墓碑)**:「`GET .../actions/runs?event=merge_group`
计数 0 ⇒ required 集为空」提出当天即被自身推翻 —— 同一姊妹仓 2026-08-24 首现 merge_group
run(0 → 8),同日再测 224(阳性对照 `event=pull_request` 全程非零)。计数答「至今发生过没有」,
不答「机制在不在」:零计数只作**弱先验**,判 required 集为空要读 ruleset
的 required 集本身、或看队列合并是否真在等检查;⛔ 别处写下的计数值一律先复测再用。
- **required job 名与分片矩阵的改名耦合(现行,自 2026-08-24)**:
队列 required 集按 **job / check-run 名**匹配,**workflow 名从不作为 check context 出现**(所以拿
workflow 名在选择器里搜什么也搜不到);改其中任一 job 名**或 test 分片矩阵的形状**,
Expand Down
69 changes: 68 additions & 1 deletion scripts/check-ratchet-remedy-authority.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,49 @@
// precedents are check-type-source-resolution.mjs, check-test-source-alias.mjs,
// check-adr-links.mjs and check-driver-memory-census.mjs.
//
// ── The ruled EXCEPTION: an authorised cross-file move (2026-09-03) ─────────
//
// The disjunction above asks WHO may take a registry-growing remedy, and on a
// shrink-only ratchet the answer was always "a maintainer, per instance". One
// class of act is now authorised generally instead of one PR at a time.
// Maintainer ruling, 2026-09-03, adopting option A of item 5 in the skills
// optimization programme's third decision batch (#14685, comment 5520452691) —
// verbatim and untranslated: 「同意」; the text it adopts:
//
// the per-file line ratchet admits a cross-file move in one PR when the
// destination's allowance rises by no more than the source's net decrease and
// total lines do not increase, with the ruling cited in the ratchet comment;
// `check:ratchet-remedy-authority`'s self-description gains this exception
//
// So: a cross-file MOVE in the per-file line ratchet is NOT a maintainer-only
// remedy while all three conditions hold — the destination's raise is covered by
// the named sources' net decrease, the map-wide total does not increase, and the
// raised entry cites that ruling. The scope is exactly the act the ruling names,
// in the gate the ruling names. A raise failing any condition is an ordinary
// raise and belongs to a maintainer as before, and no other ratchet in this farm
// gains anything: the reason a move is not a weakening is that the corpus SHRANK
// on net, which is a property of the act, not of the author.
//
// ⚠️ TODAY THE EXCEPTION IS DOCUMENTARY, and recording that is half the point of
// writing it here. The corpus walk is a NON-RECURSIVE readdir of `scripts/` (see
// corpusFiles), and the gate the ruling amends lives one directory down, in
// scripts/pm/ — it has never been in this sweep, so no verdict of this gate
// moves. A self-test assertion pins that, so a wider walk reds HERE and makes
// the class a decision someone takes rather than one that lands in silence.
//
// ⛔ NO NEW VERDICT CLASS. `marked` / `refused` / `unmarked` / `excluded` stay as
// they are. A fifth class for "authorised by standing ruling" would have a
// population of zero in this corpus, and an unreachable class is a claim of
// enforcement nobody has — the same defect this file's control corpus exists to
// prevent, one level up. If the walk ever reaches a gate offering this act, the
// honest first move is to read that gate's own verdict and record it in CONTROL,
// the way every instance in this file arrived.
//
// ⛔ THIS SECTION IS COMMENT, never a string literal — the header warning above,
// applied to itself. It describes an act that grows a registry, so in
// author-facing text it would make this gate an instance of the convention it
// enforces and flip its own verdict off `excluded`.
//
// WHY A SWEEP AND NOT A SHARED MODULE. #8519 proposed a shared helper module as
// the enforcement route. It is not one: a module is reachable only from gates
// that choose to import it, so it standardises the gates that already agreed and
Expand Down Expand Up @@ -146,11 +189,12 @@ const SELF_TEST_BATTERIES = Object.freeze({
'(19) …and the mirror: the token in a string literal DOES count. Paired with': 1,
'(17) This gate must not be an instance of its own convention.': 1,
'(20) The declared population, held to the walk in BOTH directions (#13813)': 7,
'(21) The ruled cross-file-move exception (2026-09-03)': 2,
});

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

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

// ── (21) The ruled cross-file-move exception (2026-09-03) ───────────────
//
// Two assertions, and both are about THIS FILE rather than about the ratchet
// the ruling amends: where the exception is written down, and whether it is
// doing anything yet. Neither can be held by the run — a header section runs
// green whatever it says, which is exactly how a documented exception drifts
// into a claimed one.
battery('(21) The ruled cross-file-move exception (2026-09-03)');
const selfSrc = readFileSync(join(SCRIPTS_DIR, SELF_FILE), 'utf8');
// ⛔ The phrase is ASSEMBLED, never spelled, for the reason the ADD hoist above gives in
// its own case: a literal spelling would put the phrase into THIS file's author-facing text
// and falsify the assertion below by the act of making it.
const EXCEPTION_PHRASE = ['cross-file', 'MOVE'].join(' ');
expect('the ruled exception is recorded in COMMENT space only — written into author-facing text '
+ 'it would describe a registry-growing act, and this gate would then read as an instance of '
+ 'the convention it enforces, which is what assertion (17) catches',
selfSrc.includes(EXCEPTION_PHRASE)
&& !authorFacingMessages(selfSrc).some((m) => m.includes(EXCEPTION_PHRASE)));

expect('the ruled exception is documentary today: the amended line ratchet lives one directory '
+ 'down and this walk is non-recursive, so a wider walk reds HERE rather than admitting a new '
+ 'remedy class in silence',
!corpusFiles().includes('check-skill-line-ratchet.mjs'));
// ── The floor: every declared battery RAN, and ran its cases (#13489) ───
//
// Evaluated after every battery has had its chance and BEFORE the verdict, so
Expand Down
Loading
Loading