Skip to content

chore(governance): drop the skills CODEOWNERS rows; the mirror exempts low-risk arm rows - #33948

Merged
os-zhuang merged 4 commits into
mainfrom
claude/project-thread-7k7ewn
Nov 15, 2026
Merged

os-zhuang merged 4 commits into
mainfrom
claude/project-thread-7k7ewn

Conversation

@objectstack-fleet

@objectstack-fleet objectstack-fleet Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Steve · project thread

Fixes #33704
Clause-②: no
Metadata-protocol: none
Ruling-ref: 6891850019

维护者速读

  • 改了什么:删掉 .github/CODEOWNERS 里 /skills/ 和 /ui/skills/ 两行;队列守卫的 CODEOWNERS 镜像检查改为从登记表读「低风险技能臂」,带这个臂的行不再要求有 CODEOWNERS 行,反而有行就报红;同时改写 AGENTS.md 第 14 条里 CODEOWNERS 那句(改为「every Tier H surface but the low-risk catalogs」,中继逐个 PR 请审),并修正 check-governed-merges.mjs 两处注释。
  • 为什么改:按你的裁决 6891850019「删除这两行(排在审计之后)」。审计工作流已上线(ci(fleet-patrols): weekly governed-merges audit job #33766),技能 PR 请谁审改由中继逐个 PR 判断,不再每个技能 PR 都自动请你和 os-zhuang。
  • 风险与回滚:只影响 GitHub 自动请审;落地门槛(Tier H 仍需批准)、审计、中继请审都不变。回滚 = revert 本 PR。
  • 先看:scripts/pm/check-governed-queue-guard.mjs 的 codeownersMirrorVerdict(约 L792–L849);AGENTS.md L306–L307(第 14 条里「CODEOWNERS 路由每个 Tier H 面」改为低风险技能目录除外);再看 .github/CODEOWNERS 的删行与注释。
  • 两分钟验证:node scripts/pm/check-governed-queue-guard.mjs --self-test,预期 534 cases pass。
  • 需要你做的:批准并合并本 PR

What changes

  • .github/CODEOWNERS: the /skills/ and /ui/skills/ lines are removed. The header paragraph that describes what the mirror check enforces and the two group comments above the removed lines say why those rows have no line.
  • scripts/pm/check-governed-queue-guard.mjs, codeownersMirrorVerdict (L792–L849 after the change; docblock and body only): a Tier H row that carries the register's low-risk arm in the repository under test (lowRisk.repos, read off each GOVERNED_SURFACES row; no pattern list is kept here) owes no CODEOWNERS line, and a line at its pattern is a problem naming the row. Rows without the arm are judged exactly as before. The verdict gains armPatterns; tierHPatterns now lists the Tier H patterns the file must carry.
  • The arm is scoped per repository by the register, so a sibling copy the arm does not reach (objectui) still owes the /skills/ line. A pin holds that.
  • AGENTS.md L306–L307 (Prime Directive 14, the "Behind it" sentence): it said CODEOWNERS routes every Tier H surface to the approvers, which this PR makes false. It now reads "CODEOWNERS routes every Tier H surface but the low-risk catalogs to the approvers, the relay asks per pull on drafts (no barrier)". The two lines are rewrapped in place so AGENTS.md stays at its 1050-line ceiling (check:pm-skill-ratchet); to fit, "(a summons, no barrier)" became "(no barrier)" and the audit script is named by file, since its full path is given earlier in the same directive. Added by claim amendment 6896355134.
  • scripts/pm/check-governed-merges.mjs, comment text only (L479–L481, the low-risk arm docblock, and L6189, a self-test comment): both listed the CODEOWNERS mirror among the path-only readers that "answer as before". They now say the mirror reads the arm and keeps both catalog rows out of the file. No code changes. Added by claim amendment 6896370431.
  • Self-test (CODEOWNERS mirror battery, L5914–L5947): no other battery is touched. Line ranges are given because check-governed-queue-guard.mjs is shared with pm: let a seat land an add-only ADR note under the low-risk Tier H ruling (docs/adr/** stays Tier H until then) #33539's low-risk arm reader region; this diff stays inside codeownersMirrorVerdict and its battery.

Forced pin edits (named)

  • the-patterns-are-the-register-rows-root-anchored-prefix-or-exact: the expected list loses /skills/ and /ui/skills/.
  • every-Tier-H-row-that-governs-this-repository-is-a-pattern-the-file-carries → …-or-an-arm-row-it-leaves-out: the count is tierHPatterns + armPatterns, and the arm patterns must be absent from the file.
  • ⛔ a-Tier-H-row-with-no-line-is-a-problem-naming-the-row → ⛔ a-Tier-H-row-with-no-arm-and-no-line-is-a-problem-naming-the-row: re-pointed from /skills/ (now an arm row) to /AGENTS.md (agents-md, no arm).
  • the-ui-patterns-are-root-anchored-under-ui-the-ui-claude-tree-included: the expected /ui/ list loses /ui/skills/; uiRows.length === 6 stays (a register fact) and uiRouted.length === 5 is added.
  • ⛔ without-its-ui-lines-the-file-on-disk-is-short-one-line-per-ui-row → …-without-an-arm: the count is the five ui rows without the arm, and ui-skills-catalog must not be named.

New pins

  • ⭐ the-arm-patterns-are-the-register-rows-carrying-the-low-risk-arm-here: /skills/,/ui/skills/, and equal to the register rows filtered on lowRisk.repos.
  • ⭐ a-per-pull-arm-row-with-no-line-passes.
  • ⛔ a-line-routing-an-arm-row-is-a-problem-naming-the-row-even-with-every-owner.
  • ⛔ the-arm-is-per-repository-a-sibling-copy-it-does-not-reach-still-owes-the-skills-line.

Tests

node scripts/pm/check-governed-queue-guard.mjs --self-test at eb771b5: ✓ check-governed-queue-guard self-test: 534 cases pass (main at 895783a: 530; +4 new pins). The CODEOWNERS battery floor (12) and the roster floor (31) are unchanged.

Ablations at 3aaac4f (one-off, ablation-replace.mjs, restored to the HEAD blob each time; the guard file is byte-identical at eb771b5)
  • A. Restore the removed line-check (armedIn forced false, so arm rows owe a line again): mutation landed (blob f65808de → 809e2a20), self-test 10 of 534 case(s) failed, including the file on disk (skills-catalog / ui-skills-catalog have no line), the arm-pattern pin, a-per-pull-arm-row-with-no-line-passes and the sibling pin. Restored: blob == HEAD, git diff HEAD empty.
  • B. Drop the arm-line problem (the problems.push under if (arm) disabled): mutation landed (blob f65808de → 1d3a69a0), self-test 1 of 534 case(s) failed: ⛔ a-line-routing-an-arm-row-is-a-problem-naming-the-row-even-with-every-owner. Restored: blob == HEAD, git diff HEAD empty.

Acceptance notes

  • Precondition of the ruling: pm: give the post-merge governed audit an owner — a weekly scheduled workflow (maintainer) #33717 is closed and the weekly governed-merges audit job is on main (PR ci(fleet-patrols): weekly governed-merges audit job #33766, .github/workflows/fleet-patrols.yml).
  • The arm-row line is refused, not merely tolerated, for the same reason a Tier S row's line is refused: a static line summons both approvers on every catalog pull, which is what the ruling removes. A reviewer who prefers "optional" deletes the if (arm) branch and pin B's assertion.
  • Out of scope, untouched: the /.github/workflows/ row (its split arm has the same mismatch; it has its own card). The predicate reads lowRisk only, so the workflows line stays required until that card extends it.
  • Tier H on four paths: .github/CODEOWNERS and AGENTS.md are governed register rows; the two scripts/pm/ files are the enforcement chain CODEOWNERS routes to the approvers.
  • ui/scripts/__tests__/check-governed-queue-guard.test.ts tests the ui/ copy of the guard, not this file; nothing in packages/** or ui/** imports this script.

Verification

Head eb771b5. node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack at eb771b5 derived 45 commands (38 at 3aaac4f, plus the AGENTS.md and check-governed-merges.mjs families: check:pm-governed-merges, check:pm-governed-prose, check:pm-skill-id-lint, check:pm-skill-ratchet, check:docs-audit-scope, check-skills-token-ratchet and its self-test). All 45 ran with exit 0 captured before any pipe, and --ran reconciles: 45 derived, 45 run, 0 NOT-MEASURED, 0 UNRUN (a derived zero). check:pm-skill-ratchet: AGENTS.md is 1050 lines (ceiling 1050; headroom 0). pnpm check:pm-dispatch-gates (fast tier): 2205 cases pass.

…s low-risk arm rows

The two published-catalog rows (`/skills/`, `/ui/skills/`) carry the
register's low-risk arm, and who is asked to review such a pull is the
relay's per-pull plan. The static lines summoned both approvers on every
catalog pull marked ready, low-risk ones included.

`codeownersMirrorVerdict` now reads the arm off each register row's
`lowRisk.repos`: a Tier H row carrying it in this repository owes no line
and reds if one is added; a row without the arm still reds when its line
is missing, and a sibling repository the arm does not reach still owes it.

Claude-Session: https://claude.ai/code/session_01ADHkmPFUAMcPYPfnirkUSn
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 15, 2026
…talogs leave CODEOWNERS

The directive's "behind it" list said CODEOWNERS routes every Tier H
surface to the approvers. The two published-catalog rows carrying the
low-risk arm no longer have a CODEOWNERS line; their reviewers are the
relay's per-pull plan.

Claude-Session: https://claude.ai/code/session_01ADHkmPFUAMcPYPfnirkUSn
Co-authored-by: Claude <noreply@anthropic.com>
…two comments say so

The arm's docblock and one self-test comment listed the CODEOWNERS mirror
among the path-only readers that answer as before. The mirror now reads
the arm and keeps the two catalog rows out of the file. Comment text only.

Claude-Session: https://claude.ai/code/session_01ADHkmPFUAMcPYPfnirkUSn
Co-authored-by: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Nov 15, 2026
The previous wording added a line to AGENTS.md, which is at its ratchet
ceiling. The clause now fits the two lines it replaced: the audit script
is named by file (its full path is given earlier in the same directive).

Claude-Session: https://claude.ai/code/session_01ADHkmPFUAMcPYPfnirkUSn
Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: eb771b5569e456122d7f16cccb02568cef777a92
Local-runs: probe — pnpm -s check:pm-skill-ratchet at this head, because the lint job carrying the "PM skill line ratchet" step was still running and the previous head e5362c1 went red on it
Scope: AGENTS.md + .github/CODEOWNERS, scripts/pm/check-governed-queue-guard.mjs, scripts/pm/check-governed-merges.mjs

Read for this record: card #33704 body and all six comments (triage 6891306994, ruling record 6891850019, claim 6896018155, os-dev report 6896339369, claim amendments 6896355134 and 6896370431); PR #33948 body, file list (4 files, +51/-22) and the net diff against main (895783a); the head's 39 check-runs. Code outside the diff was read, not reviewed: the GOVERNED_SURFACES register and lowRiskArmIn in scripts/pm/check-governed-merges.mjs, governedReviewPlan and requestGovernedReview in scripts/pm/fleet-write/execute.mjs, GOVERNED_REVIEW_OPS in scripts/pm/fleet-write/ops.mjs, .github/workflows/fleet-patrols.yml on origin/main, ui/scripts/check-governed-queue-guard.mjs.

① Derived judgments

  • The two rows are removed. .github/CODEOWNERS loses /skills/ and /ui/skills/ and nothing else; no remaining pattern matches either tree, so GitHub requests no code owner on a catalog pull. This is what ruling 6891850019 option 0 orders.
  • codeownersMirrorVerdict and its battery change as the ruling requires. A Tier H row that carries lowRisk for the repository under test owes no line; rows without it are judged by the unchanged loop.
  • The exemption is derived from the register, not a hand-kept list. armedIn reads each row's own lowRisk.repos; on this head the register carries the arm on exactly skills-catalog and ui-skills-catalog, both scoped to objectstack. The literal /skills/,/ui/skills/ appears only in a self-test pin, where a literal is the point.
  • Precondition: measured true as "on main and scheduled". origin/main carries the governed-merges-audit job in .github/workflows/fleet-patrols.yml with cron 31 23 * * 0 (pm: give the post-merge governed audit an owner — a weekly scheduled workflow (maintainer) #33717). Not measured: that a scheduled run has fired. The first Sunday 23:31 UTC slot after it landed is later today.
  • /.github/workflows/ and /ui/.github/workflows/ keep their lines. The predicate reads lowRisk only, never split, so the workflows row is judged as before. Correct: the ruling record gives that mismatch its own card.

② Semver level

skip-changeset is right: the four files are .github/, root AGENTS.md and scripts/pm/, no published package. Check Changeset reads skipped on the label. Clause-②: no and Metadata-protocol: none hold: no schema, no published type, no metadata key.

③ Boundary flags

  • Refuse, not tolerate (the dev's open question). A line at an arm row is a problem, mirroring the Tier S rule. I agree with it: a tolerated line would let the two rows return without any gate noticing, which undoes the ruling silently. The cost for the maintainer to know: no ruleset "require review from Code Owners" can bind to the catalogs while the arm stands.
  • What leaves with the rows. CODEOWNERS was the platform half for a pull readied by hand. A catalog pull that reads Tier H (a skill added, deleted or renamed, a security-named path, a security label) and is readied outside the relay now summons nobody; only the relay's pr_ready follow-up and the seat's hand-off ask. The landing barrier is unchanged (the queue guard still refuses without an authorized approval), and the ruling's consequence line accepts this.
  • objectui. The arm is per repository; a sibling copy still owes /skills/, and a pin holds it. ui/scripts/check-governed-queue-guard.mjs carries no codeownersMirrorVerdict, so nothing in the ui/ copy goes stale.
  • PR body is stale against the tree (S1 below): it cites head 3aaac4f, calls AGENTS.md and check-governed-merges.mjs "not edited here", and its 维护者速读 never mentions the Prime Directive 14 edit.
  • Check-runs on this head. Success: Governed Surface Queue Guard, PR-body guards, Check PR Size, Auto Label, filter, Test UI. Skipped by design: Check Changeset, Queue verdict, Borrowed queue verdict and the UI/E2E/opt-in jobs. Still running when read: all nine Lint jobs (including "docs & code guards", "repo & tooling gates", "scoped · tooling self-tests", "PM dispatch-gates"), all four Type Check jobs, Dogfood Regression Gate, Plan Test Core shards. None failed. The self-test count (534) is the dev's report; no completed check-run confirms it yet.
  • Line ratchet. The probe exits 0: AGENTS.md is 1050 lines against a ceiling of 1050, widest table row 768 against a pin of 768. Zero headroom on both.

④ Design judgment

AGENTS.md (Prime Directive 14).

  • "CODEOWNERS routes every Tier H surface but the low-risk catalogs to the approvers" is true against the tree: the ten remaining Tier H rows that govern objectstack each have a line with both approvers, and the two absent rows are exactly the register's arm rows.
  • "the relay asks per pull on drafts (no barrier)" holds loosely. governedReviewPlan is per pull and reads the arm, but it runs after pr_ready only (GOVERNED_REVIEW_OPS is exactly pr_ready); on a draft the ask is the seat's pr_request_reviewers hand-off through the relay. The "on drafts" compression is inherited from main, not introduced here.
  • Dropping the scripts/pm/ prefix leaves a resolvable reference: the same directive names the full path at L279, and bare script names have precedent in the file (L416, L417). The gate that would object ("Lint · docs & code guards") is still running.

.github/CODEOWNERS. The new header sentence and both group comments are true against the code: arm rows have no line, a line reds, the plan reads the arm.

scripts/pm/check-governed-queue-guard.mjs. Code agrees with its docblock. The pins are sound against the three failure modes asked:

  • Rows re-added to the file: the-file-on-disk-mirrors… and the armPatterns-absent clause red; the fixture pin a-line-routing-an-arm-row… holds the branch itself.
  • Arm dropped from or added to a register row: the file on disk reds, and both literal pattern pins force a conscious edit.
  • A non-arm row losing its line: the re-pointed /AGENTS.md pin, exactly one problem naming agents-md.

scripts/pm/check-governed-merges.mjs. Both comment edits are true: the CODEOWNERS mirror is no longer a path-only reader of the catalog rows. The L1693 comment that still lists the mirror as path-only concerns the workflows split and stays true.

Findings:

  • S1 (should-fix) — PR body, not the tree: refresh it to this head before the maintainer is asked. Name AGENTS.md (Prime Directive 14) and the two check-governed-merges.mjs comments as edited, drop the "out of scope, not edited here" bullet, and update the head sha. He approves governed rules text the 速读 does not currently tell him about.
  • N1 (nit) — .github/CODEOWNERS L1-L2 still titles the file "every Tier H governed surface to every authorized approver" and L10 says the rows mirror the Tier H rows; both are qualified only by the new sentence at L16-L19.
  • N2 (nit) — .github/CODEOWNERS header still says the relay requests "at pr_create and pr_ready"; the code says pr_ready only. Stale on main already, untouched here.
  • N3 (nit) — armedIn restates lowRiskArmIn from check-governed-merges.mjs (not exported) instead of importing it: a second copy of the predicate, though not a second list.

No must-fix. One should-fix (S1), on the PR body.

Implemented-by: claude/project-thread-7k7ewn
Reviewed-by: session_01ADHkmRxXmVQ41fqnaTPGAv

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv

维护者速读

  • 改了什么:删掉 .github/CODEOWNERS 的 /skills/、/ui/skills/ 两行;队列守卫的 CODEOWNERS 镜像检查改为从登记表读「低风险技能臂」,带臂的行不再要求 CODEOWNERS 行,有行反而报红;AGENTS.md 第 14 条 Prime Directive 那句改为「CODEOWNERS 把除低风险目录外的每个 Tier H 面路由给审批人,中继逐个 PR 请审」;check-governed-merges.mjs 两处过时注释同步。
  • 为什么改:你的裁决 6891850019「删除这两行(排在审计之后)」。前提已在 main:pm: give the post-merge governed audit an owner — a weekly scheduled workflow (maintainer) #33717 的每周受管合并审计(fleet-patrols.yml)已上线。
  • 风险与回滚:只影响 GitHub 自动请审;落地门槛(Tier H 仍需批准)、审计、中继请审都不变。手动转 ready、且读成 Tier H 的技能 PR 不再自动请你,只靠中继和席位交接请审(裁决已接受)。回滚 = revert。
  • 先看:scripts/pm/check-governed-queue-guard.mjs 的 codeownersMirrorVerdict,再看 AGENTS.md L306–L307 那一句。
  • 两分钟验证:node scripts/pm/check-governed-queue-guard.mjs --self-test,预期 534 条通过;pnpm check:pm-skill-ratchet,AGENTS.md 1050/1050。
  • 需要你做的:受管面 Tier H(AGENTS.md、CODEOWNERS)。达档(CONTRACT_REVIEW_TIER)复审 6896597849 在本 head PASS,唯一 should-fix(PR 正文过时)已在正文修好。请批准或直接合并。
  • 席位意见:可以合。

席位核对

Verdict: ACCEPT, held for the maintainer · head eb771b5569e456122d7f16cccb02568cef777a92 · card #33704 · report 6896339369 · at-tier contract review 6896597849 (PASS on this head, S1: closed by the body refresh, head unchanged) · read 2026-11-15T15:18Z.

  • Shape: draft → main, Fixes #33704, Ruling-ref: 6891850019. .github/CODEOWNERS, AGENTS.md (Prime Directive 14), scripts/pm/check-governed-queue-guard.mjs, scripts/pm/check-governed-merges.mjs (two comments); skip-changeset. GOVERNED, Tier H; the maintainer merges. Clause-②: no; Metadata-protocol: none.
  • Premise measured: pm: give the post-merge governed audit an owner — a weekly scheduled workflow (maintainer) #33717 closed; governed-merges-audit is on main in .github/workflows/fleet-patrols.yml (weekly cron). The exemption is read off the register's lowRisk.repos, not a hand list; the workflows rows keep their lines (own card).
  • Gates: check-runs on this head: every completed one success or skipped, none failing. The earlier red (PM skill line ratchet on e5362c1, AGENTS.md one line over) is fixed on this head: 1050/1050. Still running at this read: Test Core (1/8) and the PR-body guard re-run for the body edit. Dev: 45 derived, 45 exit 0, --ran reconciles.
  • Accepted deviations: a line at an arm row is refused, not tolerated (agreed: a tolerated line would let the rows return unnoticed). Review nits N1–N3 accepted as written (CODEOWNERS title wording; header's pr_create mention already stale on main; armedIn restates lowRiskArmIn).
  • Out of scope: none filed.
  • Landing: Tier H. The seat does not flip this PR ready or enqueue it. It needs the maintainer's merge, or an authorised APPROVED review after which the seat lands it.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 15, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 15, 2026 16:12
@os-zhuang
os-zhuang enabled auto-merge November 15, 2026 16:12
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit 35e2b22 Nov 15, 2026
54 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-7k7ewn branch November 15, 2026 16:31
os-steve pushed a commit that referenced this pull request Nov 15, 2026
…es the low-risk arm

main's mirror (#33948) reds a CODEOWNERS line on a Tier H row that carries
the low-risk arm, and this branch puts the root `adr` row on the arm. The
`/docs/adr/` line goes, `/ui/docs/adr/` stays, and the two comments naming
the arm's rows follow. The quoted maintainer ruling stays verbatim; one line
under it says it holds for every ADR change except an add-only note. The
guard self-test's expected pattern lists and its one-approver fixture follow.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmRrk1KF2ZJk57PwVU9
scbdzhwl pushed a commit to scbdzhwl/objectstack-analysis that referenced this pull request Nov 16, 2026
…ADR change stays H (objectstack-ai#33975)

Fixes objectstack-ai#33539

<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9DhBTDykFH6f9bchWYkPpus)_

Clause-②: no
Metadata-protocol: none

## 维护者速读

- 改了什么:低风险 Tier H 臂多认一族路径 `docs/adr/**`,只放行“只增注释”:每个 hunk 只加不删、不加 Status
行、不在 Decision/Status 节下加行、不新建/改名/删除 ADR 文件。本 PR 同时删掉
`.github/CODEOWNERS` 的 `/docs/adr/` 行(main 的 objectstack-ai#33948 规定带臂的行不得有 CODEOWNERS
行;`/ui/docs/adr/` 保留),头注释里逐字引的裁决「adr 只能由维护者自己确认,人工合并,ai
不得擅自合并。」原样保留,其下加一行:该裁决因此收窄到“只增注释以外”的 ADR 改动。
- 为什么改:卡 objectstack-ai#33539,席位要能按 objectstack-ai#33501 同一裁决自行落地 ADR 补注,而不必每次等两位 approver。
- 风险与回滚:只读器全部 fail-closed(读不出就是 H);回滚即 revert 本 PR,`adr` 行回到普通 Tier H。
删掉 `/docs/adr/` 的 CODEOWNERS 行后,根 ADR 的 PR 若以 ready 状态打开(或手动转
ready),GitHub 不再自动发 code-owner 审查请求;对“只增注释以外”的 ADR 改动,裁决改由队列守卫(无
GOVERNED_APPROVERS 批准即拒)和中继逐 PR 请求两位批准人来守住。
- 先看:`scripts/pm/check-governed-merges.mjs` 的 `addOnlyNoteReasons` 与
`lowRiskArmVerdict` 改动,再看队列守卫 `catalogFilesOf`。
- 两分钟验证:`node scripts/pm/check-governed-merges.mjs --self-test` 与 `node
scripts/pm/check-governed-queue-guard.mjs --self-test`,看 ADR 两组电池。
- 需要你做的:本 PR 动 governed 面,请按 GOVERNED_APPROVERS 审批。批准新 head 即是确认上面那条 ADR
裁决收窄到“只增注释以外”(只增注释走低风险臂,Ruling-ref Leehom「同意 把低风险的 Tier H 放权给座位」)。

## What changes

- **Register** (`scripts/pm/check-governed-merges.mjs`): the `adr` row
(`docs/adr/**`, Tier H) gains `lowRisk: { repos: ['objectstack'],
addOnly: true }`. It is one more path family under the same low-risk arm
(objectstack-ai#33501 ruling), not a new arm: the arm's conditions stay as they are
(no contract, no security label or name, no fork, same-head PASS
record).
- **The add-only reading** (`addOnlyNoteReasons`), from a full-context
diff of merge base to head (`addOnlyDiffArgv`: `--no-renames
--no-ext-diff --no-textconv --unified=1000000`, literal pathspec). A
modified `docs/adr/NNNN-*.md` reads S only when:
- the single hunk starts at line 1/1, adds lines and removes none, and
its counts match its header;
- every added non-blank line is on an **allowlist**: a plain ATX heading
(`#`…`######`, one space, plain text of ASCII letters and digits, Han
characters and plain punctuation: no other script, emphasis, code, link,
HTML, `#` or `\`), or plain prose at column 0, optionally `> `-quoted
and behind one list marker, starting on a letter, digit, opening quote
or bracket. No `<` (raw HTML, autolinks), fence marker, tab or character
reference anywhere. Anything else reads H;
- no added line is a status line: any line starting with a status word
after markup and opening punctuation are stripped (`Status (date): …`,
`(Status): …`, `Superseded by`, `Deprecated:`, `**状态**:…`), or carrying
`… status:` / `…状态:` anywhere;
- the ruled words are also read with spaces and punctuation squeezed out
(`D e c i s i o n`, `S.t.a.t.u.s`) — a reading used only to refuse,
never to decide that a record names a ruled heading, and no added line
sits directly above an existing setext heading (it would join that
heading's text);
- no added line sits under a heading that names the decision or the
status (`Decision`, `Status`, `Decided`, `Ruling`, `Resolution`,
决策/决定/裁决/状态 and the traditional 決策/決定/裁決/狀態), and no added heading names
one;
- every existing line keeps its heading and section (old and new sides
are both rebuilt from the hunk and their heading readings compared), so
an added heading, fence, frontmatter or setext underline cannot re-scope
existing text;
- a run inside a ruled section opens with a bare ATX heading at that
section's level or above, with a blank line above it;
- no added line carries a default-ignorable character or a Latin word
mixed with Greek/Cyrillic letters;
- the existing record carries no shape the heading reader does not model
(a list-borne or indented fence, a raw HTML block outside a fence); a
fence opened in a block quote ends with the quote;
- the record has a ruled heading at all (a record with none always reads
H), and the run is below the header block.
- An ADR file created, renamed, deleted, re-moded or not Markdown reads
H through the arm's existing mode checks plus a new "not Markdown"
reason. An ADR-only change owes no changeset; a skills path beside it
still does.
- **Queue guard** (`scripts/pm/check-governed-queue-guard.mjs`):
`catalogFilesOf` reads each queued ADR file's commit diff with the same
argv (`diff-tree -p -m --first-parent`), so the merge_group leg passes
such a PR on the same rule and its PASS record carries over as before.
- **Relay / `--pr` / post-merge sweep**: all read through
`pullCatalogReading`, which now attaches the ADR patch; no second
reader, and `scripts/pm/fleet-write/execute.mjs` logic is untouched.
- **`.github/CODEOWNERS`** (claim amendment 6898158057): the
`/docs/adr/` line is deleted, because main's mirror (objectstack-ai#33948, ruling
record 6891850019) reds a CODEOWNERS line on a Tier H row carrying the
low-risk arm; `/ui/docs/adr/` keeps its line. The verbatim maintainer
ruling in the header stays, with one line under it: it holds for every
ADR change except an add-only note. The guard self-test's expected
pattern lists and its one-approver fixture (now on `/ui/docs/adr/`)
follow.
- **AGENTS.md PD14 and pm-dispatch** name the ADR leg
(`lowRiskArmVerdict`). Line counts unchanged (AGENTS.md 1050,
pm-dispatch 320).

## Why

Card objectstack-ai#33539: a seat should be able to land an add-only ADR note on the
low-risk arm's Tier S path, while any change to an ADR's ruling or
status stays Tier H.

## Verification

- Self-test rows, both directions. The card's six
(`check-governed-merges`, battery "⚖️ objectstack-ai#33539 …", 52 cases, pinned at
52):
  - add-only passes (S);
- removed line, changed Status, line under Decision, new ADR file,
rename: each H.
- Plus review rows: re-scoping headings, fences, frontmatter, bare CR,
Chinese headings, status spellings, README/subfolder, hunk not at 1,
phantom setext, raw HTML, link definitions,
zero-width/homoglyph/inline-markup/entity/soft-hyphen Decision headings,
an opener with no blank line; a real-git fixture; the
`pullCatalogReading` path.
- Contract review round 4 (comment 6896800633): one row per probe
string, M1 (quoted fence), M2 (list-borne headings), M3 (empty link /
empty HTML element in a heading), S1 (inline HTML), S2 (Chinese and
dated status), N1 (list-borne link definition), each H; plus a row that
plain notes (quoted, listed, emphasised, linked, Chinese) still pass.
Round 5 (comment 6897145164): S3 (a line joined onto a setext heading),
S4 (look-alike and letter-spaced ruled headings) and N3 (status words
behind punctuation or after a word) each have an H row; round 6 (comment
6897472749) adds S5 (traditional Chinese ruled words) and S6 (`## Stat
usage` names no ruled heading); the ADR battery is pinned at 52. Probe
over the 155 shipped records: an appended plain note reads S on 149; the
6 others name no decision or status heading, so they read H.
- Queue guard battery "⚖️ the ADR leg at the queue …" (12 cases).
- Relay row: a `docs/adr/**` + `packages/core/**` diff reads the arm
(timeline GET), still plans Tier H and requests both approvers.
- `node scripts/pm/dispatch-gates.mjs --commands` on the final head:
every listed command run and reconciled with `--ran`; plus the importer
self-tests.
- Independent review: three rounds; the last one passed with no
must-fix. Its should-fix and nits were fixed in 1d110f5. The at-tier
contract review then failed round 4. The reader moved from a denylist to
the allowlist above in d038e0d; the delta round passed, and its two
should-fixes and N3 are closed in 8850e1f, and round 6's S5 and S6 in
9a9d920.
- Forced self-test edits in my own rows: a balanced code block added in
Context and a `## **Notes**` heading now read H (they read S before the
allowlist).

### Forced test edits (named)

- `scripts/pm/fleet-write/execute.mjs` (self-test only, surface added by
the seat's claim amendment): the Tier H fixture `tierHFiles` and the
`twoPages` fixture used `docs/adr/**`, which now reads the arm. Both
move to `docs/NORTH-STAR.md` (still Tier H, no arm); the three expected
strings follow. One new row pins the ADR + core behaviour above.
- `check-governed-merges` existing arm tests: the arm-rows test now
expects `adr,skills-catalog,ui-skills-catalog`, with `addOnly` only on
`adr`; the `lowRiskRowHit` test follows.
- Battery floors: merges `SELF_TEST_BATTERY_FLOOR` 39 → 40 after the
merge of main (main's objectstack-ai#33814 took 38 → 39; the ADR battery itself pinned
at 52), guard 31 → 32.

### Notes for the reviewer

- **AGENTS.md PD14** paid its added words by deleting "; the post-merge
audit is the compensating control". Its surviving home is the same PD14
paragraph ("Behind it: … the post-merge audit … lists every
governed-surface merge … a Tier S merge without a PASS record is a seat
violation").
- **pm-dispatch**: "`.github/workflows/**`" became "本仓 workflows" (the
glob survives at the register line, L184), and "(技能独占)" became "(该面独占)".
- The arm's security-name test also runs on ADR file names, so an ADR
whose name carries a security word stays H (fail-closed, left as is).
- Left fail-closed by design: a git read with trimmed output gives a
false H (the count check guards it); anything off the allowlist (any
`<`, fences, tables, nested lists, headings with markup) reads H;
records with no ruled heading always read H.
- `ui/docs/adr/**` is not on the arm and stays H.

## Human Minimum

- [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic.
(not touched)
- [x] 2. Every name I added uses the casing for its kind.
- [ ] 3. No formatter ran; `pnpm lint` passes. (no formatter ran; `pnpm
lint` was not run here, since no package source changed: the derived
gate list and the script self-tests ran instead)
- [x] 4. One issue, one branch off an up-to-date `main`, one pull
request.
- [x] 5. A change that publishes carries a changeset, and both
declaration lines are filled in here and in the changeset. (nothing
publishes: `skip-changeset`)
- [x] 6. `packages/spec` touched: its generated artifacts are
regenerated and committed. (not touched)
- [x] 7. No hand edits to `content/docs/references/`,
`packages/*/CHANGELOG.md` or `content/docs/releases/`.
- [x] 8. Title, body and comments are in English. (except the required
维护者速读 block)
- [x] The *Before Submitting* list in CONTRIBUTING.md is done.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01ADHkmRrk1KF2ZJk57PwVU9

<!-- signed: domain:skills#1 · os-steve ·
session_01ADHkmRrk1KF2ZJk57PwVU9 -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
@objectstack-fleet objectstack-fleet Bot removed the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/s skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CODEOWNERS still requests both maintainers on a low-risk skills PR the relay no longer summons them for

2 participants