Skip to content

Commit 1f53b0b

Browse files
os-steveclaude
andauthored
fix(pm): repair two carriers still spelling the superseded references-tier boundary (#19379)
Part of #19146 Clause-②: no Two carriers of the governed-tier rule still stated the 2026-09-13 boundary (Tier S / "fact layer" = only `.claude/skills/pm-dispatch/references/**`) that #19133 (2026-09-18) superseded. #19133's ruling, verbatim and untranslated: maintainer 「同意改规则。」 on the skills seat's proposal, plus the amendment that folded `.claude/settings.json` and `.claude/hooks/**` in too: 「我觉得这些我也没必要确认」. Tier S is now the whole `.claude/**` tree. Current, correct source of truth (unchanged by this PR): - `scripts/pm/check-governed-merges.mjs` register row `{ id: 'claude-tree', prefix: '.claude/', glob: '.claude/**', tier: GOVERNED_TIER_S, … }`, pinned by self-test case `skills-agents-and-the-fact-layer-are-Tier-S`. - `.claude/skills/pm-dispatch/SKILL.md:625-626`: 「受管面两层:Tier H(规则层)= `AGENTS.md`+`CLAUDE.md`+`docs/adr/**`+`docs/NORTH-STAR.md`+发布 `skills/**`。」「Tier S = `.claude/**` 全树;Tier H 四件套等人批;Tier S 经席内达档复核 PASS 在案后 ready → 入队。」 ## What was stale **`.claude/skills/pm-dispatch/references/landing-operations.md:27-28`** Before: ``` - 受管路径全在本技能 `references/` 者事实层:席内达档复核过落地前检三条即转正式入队。 - 其余为规则层:四件套留 draft 等人批,⛔ 不翻正式不入队;获授权批准后认领席落地。 ``` After: ``` - Tier S(`.claude/**` 全树)者:席内达档复核过落地前检三条即转正式入队。 - Tier H(其余受管面)者:四件套留 draft 等人批,⛔ 不翻正式不入队;获授权批准后认领席落地。 ``` Line count and byte ceiling unchanged (69/69, both lines within the 120-byte cap — `check:pm-skill-ratchet` verified). **`scripts/pm/check-governed-queue-guard.mjs`, the "THIRD leg" header (~268-294)** It reproduced the 2026-09-13 boundary and concluded: "Every other governed path is the rules layer and keeps the predicate above byte-for-byte" — false since #19133, and self-contradicting the same file's own later "the landing TIER" section, which already records that `REFERENCES_TIER_PREFIX` "is gone". Fix: the quoted 2026-09-13 ruling is kept, untranslated, as the ruling that STARTED this leg (history is load-bearing — a reader who finds that text must see why it no longer governs). A new paragraph marks it SUPERSEDED by #19133 (cited with date, reusing this same file's own existing verbatim quote of the amendment for consistency) and points at `governedTierFor` / the register / `node scripts/pm/check-governed-merges.mjs --test <paths>` instead of a prefix to remember. The concluding sentence now reads "Every governed path outside Tier S is Tier H, the rules layer, and keeps the predicate above byte-for-byte." No behavior changed: `GOVERNED_SURFACES`, `governedTierFor`, `landingTierOf`, every tier constant and every self-test assertion's expected value are untouched — only the two stale prose passages. ## Verification before editing - Read #19133 on GitHub directly (the tracking card/comments): maintainer ruling 「同意改规则。」 plus the amendment 「我觉得这些我也没必要确认」, landed by PR #19144 (merged `1047fe101`), matches this PR's premise exactly. - Read the register row, its self-test case, and `SKILL.md:625-626` — all current and correct, confirmed unedited. - Read both stale passages in full context before editing. ## Tier verdict on this PR's final file list ``` node scripts/pm/check-governed-merges.mjs --test .claude/skills/pm-dispatch/references/landing-operations.md scripts/pm/check-governed-queue-guard.mjs ``` → `GOVERNED — Tier S`, exit 3. `landing-operations.md` hits the `.claude/**` register row; `check-governed-queue-guard.mjs` is not itself a registered surface (1 of 2 paths governed). Per Prime Directive #14, this PR lands on the owning seat's Tier S contract-tier review of record — no seat approves it, and no maintainer click is waited for. ## Gates run (exit code captured before any pipe) - `node scripts/pm/check-governed-queue-guard.mjs --self-test` — exit 0 (296 cases pass) - `node scripts/pm/check-governed-merges.mjs --self-test` — exit 0 (435 assertions) - `pnpm check:pm-skill-ratchet` — exit 0 (landing-operations.md 69/69, headroom 0, unchanged) - `pnpm check:pm-skill-id-lint` — exit 0 (27 files clean) - `pnpm check:pm-governed-prose` — exit 0 (names all 6 registered surfaces) - `pnpm check:nul-bytes` — exit 0 - `npx eslint scripts/pm/check-governed-queue-guard.mjs` — exit 0 - `node --check scripts/pm/check-governed-queue-guard.mjs` — exit 0 ## Changeset `skip-changeset` — no `packages/*` touched; neither `.claude/skills/**` nor `scripts/pm/**` ships in any package's `files[]` (same as precedent PRs #19144 and #19021). ## On the card This PR is filed as **Part of #19146**, not a new card: #19146 ("skills: re-key the three 事实层 = references/ spellings the Tier S ruling leaves false") was already open, filed by the seat that landed PR #19144, and its item 2 is exactly `landing-operations.md:27-28`. Creating a new duplicate card would have contradicted this repo's own duplicate-avoidance practice, so none was created. #19146's other items — `.claude/agents/os-dev.md:286-287`, `check-half-states.mjs` H48 and `check-half-states.mjs` H43 — are **not** touched by this PR and remain open on that card; neither is `SKILL.md:608`'s own `事实层` wording (added to #19146 by its own addendum comment). H43 is the newest of them: it had lived only in card comment 5750573385 and is enumerated on the card body as item 4 by this rework. It is left here deliberately — H43 is missing LOGIC in a non-governed instrument (a LAZY `governedTierFor` load, because that row travels to sibling repos, plus one `pnpm check:pm-half-states` self-test case), which is the same change class as H48 and rides with it in ONE half-states PR rather than under a docs-only Tier S record. The at-tier review of record (`5751616940`) ruled this PR NOT incomplete for leaving it there. This PR additionally fixes `scripts/pm/check-governed-queue-guard.mjs`'s self-contradiction, which is not named in #19146 at all. ## Note on the dispatching brief The brief that generated this PR stated "this repair has no card yet." That is not accurate: #19146 already existed (filed 2026-09-18, still open) covering part of this exact repair. Everything else in the brief — the ruling text, the register row, the self-test name, `SKILL.md:625-626`, and both stale passages — verified exactly as stated on direct reading. ## Rework after the at-tier contract review (record `5751616940` — FAIL) Head `fa628d0b36` → `71216fcff6`, one commit on the same branch (⛔ no rebase, no amend, no force-push — the review record is anchored to this branch's history). Both defects are TEXT: ⛔ no tier constant, no `GOVERNED_SURFACES` row, no `governedTierFor`, no `landingTierOf` and no self-test expected value moved. Self-test case counts are unchanged at 296 / 435. **1. `landing-operations.md:27` — the PR-level ALL quantifier is restored.** The line shipped as 「- Tier S(`.claude/**` 全树)者:…」, which names the SURFACE. Its own predecessor (「受管路径全在本技能 `references/` 者事实层」), this repair's prescribed wording on the card, and the sibling `contract-review.md:46` (「受管路径全在 Tier S 面(`.claude/**`)者」) all carry the quantifier. Without it, lines 27 and 28 partition governed SURFACES rather than pull requests — so a mixed diff (a `.claude/**` path plus `AGENTS.md`, Tier H by the register's ALL-not-ANY rule) matched both lines with no tiebreak on the page. ```diff -- Tier S(`.claude/**` 全树)者:席内达档复核过落地前检三条即转正式入队。 +- 受管路径全在 `.claude/**` 者 Tier S:席内达档复核过落地前检三条即转正式入队。 ``` Re-measured here, not taken on trust: 93 B → 105 B against the 120 B cap, file 69/69 lines with headroom 0 (`check:pm-skill-ratchet` exit 0 names the file at 69/ceiling 69). **2. `check-governed-queue-guard.mjs:4442-4443` — the `--self-test` SUCCESS line is re-keyed.** The docblock repair in the first commit left the one instance seats actually read: the SUCCESS line printed on EVERY run (it is in the review's own capture) still stated the superseded #18020 population, while the battery at `:3949-3950` asserts `⛔ the-old-references-boundary-is-GONE`. Landed 2026-09-13 in #18036 and untouched by #19144 — present at merge-base and at the reviewed head, reproduced here before the edit. ```diff - 'the boundary a label reader cannot cross — and the #18020 references TIER: a governed diff whose governed ' + - 'paths all lie under the one ruled prefix lands on the skills seat\'s review of record instead of an ' + + 'the boundary a label reader cannot cross — and the #18020 references TIER, re-keyed to Tier S by #19133: a ' + + 'governed diff whose governed paths are ALL Tier S — the register\'s `.claude/**` row, asked through ' + + '`governedTierFor`, never a prefix repeated here — lands on the skills seat\'s review of record instead of an ' + ``` History stays (the `#18020` naming), exactly as the docblock keeps its quoted ruling; only the POPULATION is re-keyed. Proof it is gone from the PRINTED output, not merely from the source: `--self-test` at the new head prints `the one ruled prefix` 0 times and the re-keyed sentence once. ### Still stating the superseded boundary — reported, ⛔ deliberately not pulled in The review lists these as live and OUT of this PR's scope, and this rework leaves them exactly as it found them: `.claude/agents/os-dev.md:286-287` (this card's item 1) and `SKILL.md:608`'s 「⛔ 无事实层例外」 (a card addendum, vocabulary only — the rule itself stays true). Naming-only uses of "the references tier" as this leg's NAME (queue-guard `:268`, `:358`, `:442`, `:452`, `:646`, `:736`, code comments `:1420` / `:1546` / `:2261` / `:2470` / `:2560`, and `check-clause2-carriers.mjs:8635`) are an optional tidy and were left alone: widening the diff of a docs-only record to sweep names is not what the FAIL asked for. ### Tier verdict on the FINAL file list ``` node scripts/pm/check-governed-merges.mjs --test .claude/skills/pm-dispatch/references/landing-operations.md scripts/pm/check-governed-queue-guard.mjs ``` → `⛔ GOVERNED — Tier S(席内达档复核落地)`, exit 3; 1 of 2 paths on the register (`.claude/**` ×1 — `landing-operations.md`; `scripts/pm/check-governed-queue-guard.mjs` is not a registered surface). File list unchanged from the reviewed head, so the tier is unchanged. Per Prime Directive #14 this lands on the at-tier review of record — ⛔ no seat approves it and no maintainer click is owed. ### Gates at the new head (exit code captured BEFORE any pipe) The brief's minimum, plus every family `node scripts/pm/dispatch-gates.mjs --commands` derives for this change set — 38 commands, 37 at exit 0: - `check-governed-queue-guard.mjs --self-test` — exit 0, 296 cases (unchanged) - `check-governed-merges.mjs --self-test` — exit 0, 435 assertions (unchanged) - `check:pm-skill-ratchet` exit 0 (69/69, headroom 0) · `check:pm-skill-id-lint` exit 0 (27 clean) · `check:pm-governed-prose` exit 0 (6/6 surfaces, 28 self-test cases) · `check:skill-frame-sync` exit 0 · `check:nul-bytes` exit 0 (9053 files, no raw control bytes) - `node --check` exit 0 · `npx eslint scripts/pm/check-governed-queue-guard.mjs` exit 0 (1 file linted, 0 errors, 0 warnings, read from `--format json`) - `check:pm-dispatch-gates`, `check:pm-governed-merges`, `check:ratchet-remedy-authority`, `check:doc-authoring`, `check:cross-package-test-inputs`, `check-declaration-mirrors`, `check-scripts-symbol-anchors`, `check-self-test-wired`, `check-self-test-workflow-commands`, `check-comment-mask-corpus` and the rest of the derived list — all exit 0 - ⊘ NOT MEASURED — `pnpm --filter @objectstack/lint run check:doc-formula-expressions` exit 3, PREREQUISITE NOT MET (`@objectstack/formula` and `@objectstack/lint` unbuilt in this worktree). Exit 3 is this repo's NOT-MEASURED code, ⛔ not a finding; the family's population is docs formula expressions, disjoint from this diff's two paths, and CI runs it against a built tree. ⚠️ `dispatch-gates.mjs` prints a STALE TREE warning: this branch is ≥55 commits behind `origin/main` and 15 files the derivation reads changed across that range. The gate list above is therefore derived from this branch's tree, which is what the review record is anchored to; ⛔ it was not refreshed by a rebase. CI on the merge group derives from the merged tree. ### ⚠️ `check-clause2-carriers.mjs --pair 19379` reads 2 (UNJUDGED) — measured, and it is the BRANCH NAME Reproduced at the new head: `PM_SWEEP_REPO=objectstack-ai/objectstack node scripts/pm/check-clause2-carriers.mjs --pair 19379` → exit 2, 「the card's NEWEST claim comment (5754245926) matches the claim marker but its `Branch:` directive parses to ZERO branches」. The stored line 2 really is `` Branch: `claude/pm-superseded-references-tier` `` on a line of its own, so the printed remedy — "name the branch on a `Branch:` line of its OWN" — is already satisfied and cannot clear it. The cause is not the regex named in the dispatching brief. `BRANCH_TOKEN` (`check-clause2-carriers.mjs:3278`) reads the `Implemented-by:` VALUE of a review record; it never sees a claim's `Branch:` directive. That directive is read by the sibling `check-half-states.mjs:5407` `claimedBranches`, through `CLAIM_BRANCH_SHAPE` (`:5358`): ``` /claude\/issue-\d+-[A-Za-z0-9][A-Za-z0-9._-]*/g ``` which REQUIRES a literal `issue-` plus digits segment. Measured on the real stored comment body and two controls: | input | `claimedBranches()` | | --- | --- | | the live comment `5754245926`, as stored | `[]` | | the same comment, branch swapped to `claude/issue-19146-superseded-references-tier` | `["claude/issue-19146-superseded-references-tier"]` | | `Branch: `claude/issue-abc-slug`` (no digits) | `[]` | Only the branch NAME differs across those rows, so the marker, the backticks, the line position and the directive shape are all fine. `claimGovernance` on that one-comment thread returns `governing: null` with `malformed: { id: 5754245926 }` — which `cardDeclaration` turns into `claim-branch-unparsed`, i.e. exit 2. The narrow shape is DELIBERATE where it was written (`CLAIM_BRANCH_SHAPE`'s own docblock: a `Branch:` line naming some other shape "is deliberately left unmatched, which puts the card out of this row's scope entirely" — under-reporting beats manufacturing findings out of typos). The consequence in THIS reader is not out-of-scope, though: Prime Directive #14 makes `--pair` at 0 part of the Tier S landing predicate, so a Tier S PR on a branch without an `issue-`digits segment cannot satisfy it by any act of the claiming seat short of renaming the branch — which would strand this review record. ⛔ Not repaired here: `check-clause2-carriers.mjs` is ⛔ out of this PR's scope and the branch is ⛔ not renamed. Reported for the seat. --- 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01AmH9bKvGoLjiY86Q4Z3og2 --- _Generated by [Claude Code](https://claude.ai/code/session_01AmH9bKvGoLjiY86Q4Z3og2)_ --- _Generated by [Claude Code](https://claude.ai/code)_ --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 48f5200 commit 1f53b0b

2 files changed

Lines changed: 25 additions & 12 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
- 契约复核 PASS 落地的 PR 到窗口时已 ready 且 auto-merge 在挂,见 `contract-review.md`。
2525
- 窗口自身权责不变:跟到 MERGED、踢出处置、落地后对账。
2626
- 转 ready/入队前跑 `check-governed-merges.mjs --pr N`:受管面照两层;>5000 行(含生成物)照规则层。
27-
- 受管路径全在本技能 `references/` 者事实层:席内达档复核过落地前检三条即转正式入队。
28-
- 其余为规则层:四件套留 draft 等人批,⛔ 不翻正式不入队;获授权批准后认领席落地。
27+
- 受管路径全在 `.claude/**` 者 Tier S:席内达档复核过落地前检三条即转正式入队。
28+
- Tier H(其余受管面)者:四件套留 draft 等人批,⛔ 不翻正式不入队;获授权批准后认领席落地。
2929
- ⛔ 两层不由席位批准;清标即落地同受此闸,漏判会被队列守卫在 merge group 里拒收。
3030
- 再读 `mergeable_state`:`dirty` ⇒ 先 merge `origin/main` 再挂;生成物在面上按 A 的固定序。
3131
- ready + 全绿 ≠ 已入队:队列从不主动拉 PR,入队是显式动作。

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

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -279,19 +279,31 @@
279279
* — answered 「我点头」. The other half of that boundary, the 规则层, is every
280280
* remaining governed path and is quoted in full on #17950; ⛔ it is NOT excerpted
281281
* here, because a partial rules-layer list read as the whole one is precisely
282-
* the under-claim `check-governed-prose` exists to stop. The register is the
283-
* enumeration; this leg only asks whether a path is under the ONE prefix above. The charter text landed as PR #18018; this leg is what
284-
* makes it ENFORCED rather than declared, which is the whole of #18020.
282+
* the under-claim `check-governed-prose` exists to stop. The charter text landed
283+
* as PR #18018; this leg is what made it ENFORCED rather than declared, which is
284+
* the whole of #18020 — narrowly, for the one prefix quoted above.
285285
*
286-
* So a governed diff whose governed paths ALL lie under
287-
* `.claude/skills/pm-dispatch/references/` may land on a REVIEW OF RECORD in
288-
* place of the authorized approval: the `## Contract review` comment — on the
286+
* ⭐ SUPERSEDED 2026-09-18 (#19133, ruled 「同意改规则。」 on the skills seat's
287+
* proposal; the amendment moved `.claude/settings.json` and `.claude/hooks/**`
288+
* over too: 「我觉得这些我也没必要确认」): the quote above is reproduced as the
289+
* ruling that STARTED this leg, not as the population it enforces today. #19133
290+
* widened that population from the one prefix quoted above to the WHOLE of
291+
* `.claude/**` — Tier S, in the register's own words — leaving Tier H as exactly
292+
* the register's other rows. The register's `tier` field is the enumeration now;
293+
* this leg asks `governedTierFor` for Tier S, never a prefix repeated here — see
294+
* the "landing TIER" section below for the enforced definition, and read it live
295+
* with `node scripts/pm/check-governed-merges.mjs --test <paths>` rather than
296+
* trusting a prefix copied into prose, which is exactly what went stale once.
297+
*
298+
* So a governed diff whose governed paths are ALL Tier S — today, the whole of
299+
* `.claude/**` — may land on a REVIEW OF RECORD in place of the authorized
300+
* approval: the `## Contract review` comment — on the
289301
* PULL REQUEST'S THREAD **or on its CARD'S** — that names the pull request's
290302
* CURRENT head, carries a `Reviewed-by:` line, and declares a `Served-tier:`
291303
* reading that STANDS -- its token being the NAME `CONTRACT_REVIEW_TIER`,
292304
* ⛔ never a model identifier, which `AGENTS.md` lets land in no comment and a
293-
* record IS one (#18060). Every other governed path is the rules layer and
294-
* keeps the predicate above byte-for-byte.
305+
* record IS one (#18060). Every governed path outside Tier S is Tier H, the
306+
* rules layer, and keeps the predicate above byte-for-byte.
295307
*
296308
* ⭐ THE TWO CARRIERS ARE ONE DELIVERY, and the location is the governed text's
297309
* to decide rather than this file's — quoted, untranslated, because it IS the
@@ -4553,8 +4565,9 @@ export async function selfTest() {
45534565
'fail-closed on an unreadable label set and on a group naming no pull request, enumerated per commit so a ' +
45544566
'bare PR cannot carry a gated sibling through, silent and read-free on the pull_request leg, and replayed ' +
45554567
'against the eleven measured enqueues of 2026-09-09 — five refused, six passed, that second number being ' +
4556-
'the boundary a label reader cannot cross — and the #18020 references TIER: a governed diff whose governed ' +
4557-
'paths all lie under the one ruled prefix lands on the skills seat\'s review of record instead of an ' +
4568+
'the boundary a label reader cannot cross — and the #18020 references TIER, re-keyed to Tier S by #19133: a ' +
4569+
'governed diff whose governed paths are ALL Tier S — the register\'s `.claude/**` row, asked through ' +
4570+
'`governedTierFor`, never a prefix repeated here — lands on the owning seat\'s review of record instead of an ' +
45584571
'authorized approval, with the record recognisers IMPORTED through a lazy load whose precondition (no ' +
45594572
'top-level await in this file\'s dispatch) is pinned against this file\'s own source, refused on an older ' +
45604573
'head, on a missing or below-tier or partially-stamped `Served-tier:`, on an unsigned record, on no record ' +

0 commit comments

Comments
 (0)