You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 35e2b22
Browse filesBrowse the repository at this point in the historyBrowse files
chore(governance): drop the skills CODEOWNERS rows; the mirror exempts low-risk arm rows (#33948)
<!-- claude-projects-attribution: {"github_login":"os-steve"} -->
_Requested by **Steve** · [project
thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi94Bm1UetTUkAru2JFLUkZvZ)_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「删除这两行(排在审计之后)」。审计工作流已上线(#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 #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.
<details><summary>Ablations at 3aaac4f (one-off, ablation-replace.mjs,
restored to the HEAD blob each time; the guard file is byte-identical at
eb771b5)</summary>
- A. Restore the removed line-check (`armedIn` forced false, so arm rows
owe a line again): mutation landed (blob f65808d → 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 f65808d → 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.
</details>
## Acceptance notes
- Precondition of the ruling: #33717 is closed and the weekly
governed-merges audit job is on main (PR #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`.
<!-- signed: domain:skills#2 · os-steve ·
session_01ADHkmPFUAMcPYPfnirkUSn -->
---------
Co-authored-by: Claude <noreply@anthropic.com>
assert('⛔ an-unmeasured-reading-is-Tier-H-with-its-own-reason', tier([SK], { measured: false, reason: 'the pull could not be read' }) === GOVERNED_TIER_H && /the pull could not be read/.test(renderTestVerdict(testVerdict([SK], { repo: REPO, lowRisk: { measured: false, reason: 'the pull could not be read' } }))));
problems.push(`CODEOWNERS line ${row.line} routes \`${row.pattern}\`, a Tier H row (\`${arm.id}\`) carrying the low-risk arm in this repository — the relay's per-pull plan decides who is asked there, and a static line summons both approvers on every pull, the low-risk ones too`);
if(tierS)problems.push(`CODEOWNERS line ${row.line} routes \`${row.pattern}\`, a Tier S row (\`${tierS.id}\`) that lands on a seat's review of record — a code-owner request there asks the maintainer for a landing that is not his`);
829
846
elseif(!sameOwners(row.owners))problems.push(`CODEOWNERS line ${row.line} \`${row.pattern}\` (an enforcement-chain row) names ${row.owners.join(' ')||'nobody'}, not every GOVERNED_APPROVERS account (${wanted.join(' ')})`);
830
847
}
831
848
if(!/GOVERNED_APPROVERS/.test(String(text??'')))problems.push('the file never names `GOVERNED_APPROVERS` — its header must say which constant the owner list mirrors');
0 commit comments