Skip to content

Commit 77d7f52

Browse files
chore(pm): governed approvers are os-zhuang alone (hotlong removed) (#34671)
<!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9MvxuzfDMfyAL28bsgrUsox)_ Fixes #34626 Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:受管改动的批准账号从 os-zhuang 加 hotlong 两个,减成只有 os-zhuang。改在批准账号常量、它在 ui/ 下的副本、CODEOWNERS,以及跟着两人写死的自测。 - **为什么改**:你 2026-11-17 在分诊会话里的原话「hotlong 从批准账户中去掉,只保留 os-zhuang」。hotlong 在跑席位,而批准账号不能跑席位。 - **风险与回滚**:落地后 hotlong 的批准、入队都不再放行受管 PR,hotlong 账号写在 GitHub 上的评论也不再被工具当作维护者亲笔或可信记录。现在开着的 PR 里没有一个只靠 hotlong 批准。回滚就是 revert 本 PR。 - **先看**:`scripts/pm/check-governed-queue-guard.mjs`(常量和新裁决说明)、`.github/CODEOWNERS`、`scripts/pm/fleet-write/execute.mjs`(中继的自测注入口)。 - **两分钟验证**:`node scripts/pm/check-governed-queue-guard.mjs --self-test`,预期 581+ 例全过,其中一例写明「只有 hotlong 批准的 head 读作未批准」。 - **需要你做的**:用 os-zhuang 批准本 PR(受管面,Tier H),席位随后落地。 ## What changes The maintainer's order, given in the triage session on 2026-11-17 at about 03:50Z, verbatim: 「hotlong 从批准账户中去掉,只保留 os-zhuang」. It supersedes the membership of the 2026-08-27 set (「os-zhuang hotlong 批准算数」); every docblock that quoted that ruling keeps it as history, marked superseded, and cites the new one with its date. - `scripts/pm/check-governed-queue-guard.mjs`: `GOVERNED_APPROVERS` is `['os-zhuang']`. The header gains a fourth dated layer (2026-11-17), the 2026-08-27 and 2026-10-26 passages say which half the new order superseded, and the two rendered remedy lines that named the old set now name the new one. Self-test: the membership pin is the one account; new cases pin that a head approved only by `hotlong` reads unapproved, that an enqueue by `hotlong` reads unauthorized, and that `hotlong` is not in the set. Cases that used `hotlong` as an authorized login, or indexed `GOVERNED_APPROVERS[1]`, use `os-zhuang` (the CODEOWNERS mirror's negative cases use the removed login as the wrong owner). - `scripts/pm/check-governed-merges.mjs`: the weekly-audit N10 cases read the approver list through `loadAuditRulingAccounts()` (the guard's constant, as the job loads it) instead of a second literal `['os-zhuang', 'hotlong']`, with a pin that it equals `os-zhuang`; a hand close by `hotlong` is pinned as ruling nothing. Cases that used `hotlong` as the authorizing login use `os-zhuang`. - `ui/scripts/check-governed-queue-guard.mjs`: the ui copy of `GOVERNED_APPROVERS` moves with the root one, its docblock records the 2026-11-17 order, and its self-test pins the one account and refuses a `hotlong`-only approval. Each copy has its own pin to the ruling, so neither can drift silently. - `.github/CODEOWNERS`: every governed row names `@os-zhuang` only; the header records the new order with its date and keeps the old one and the old `hotlong` verification as history. - `scripts/pm/check-half-states.mjs` (overlap-check against open #34110: clean): the two comments that named the pair now read the 2026-11-17 set, and the H43 fixture `APP43` is marked as an injected two-account set, not the live roster. ### Forced test changes (named) - `scripts/pm/check-half-states.mjs`, case `H43 register: the imported matcher answers governed and clear, and the approver set is non-empty`: it asserted `approvers.length >= 2`; it now asserts a non-empty set, which is what its title says. - `scripts/pm/fleet-write/execute.mjs`, battery `the governed-review follow-up`: 16 cases destructured `const [A1, A2] = GOVERNED_APPROVERS` and went red with one account. The relay's follow-up gains an `approvers` deps seam (default `GOVERNED_APPROVERS`; no behaviour change for the relay), and the battery runs against an injected pair whose first member is the live constant's first account, so the two-account union and the author-identity branch stay exercised. Two new cases pin the live wiring with nothing injected: the plan and an end-to-end `pr_ready` request `os-zhuang` alone. ## Acceptance notes - **Who else reads the constant.** `GOVERNED_APPROVERS` is also the trusted-author half of `recordTrustedAuthors` (records read by the queue guard, `check-owed-reviews`, `label-write`, the H43 hand-off), the mailbox knock authors (`readMailboxComment`) and the audit's ruling closes. From this merge a comment or close authored by `hotlong` on GitHub is no longer read as the maintainer's or as a trusted record. Records a seat writes through the relay (`objectstack-fleet[bot]`) are unaffected. Records `hotlong` writes directly are not: for example the `Claim:` on #34659 (comment 6939887560, authored by `hotlong` on 2026-11-17T05:47Z) is a direct write, and from this merge only a record written through the relay counts; a `hotlong`-authored one is no longer trusted, consistent with #33541. The importers' self-tests pass unchanged. - **In-flight governed PRs.** Measured 2026-11-17 ~05:40Z with the search API: no open PR in this repository carries a review by `hotlong` (`reviewed-by:hotlong` → 0), so no head loses its only approval. Four open PRs still list `hotlong` as a requested reviewer: #34612, #34600 (which requested both `os-zhuang` and `hotlong`), #34524 and the Version Packages PR #33849. A pending request does not count for anything; after this lands, only an `os-zhuang` approval lands them. The seat re-reads this list at merge time. - **Seats running as `hotlong`** (triage#1, repo:cloud#5, the local coordinator) become compliant with the account rule that an approver never runs a seat. No seat change is needed. - **#33011** (named on the card as "one open PR has a `hotlong` review") is an open p3 issue in this repository, not a pull request, and carries no review. No PR with that number exists to list. - Follow-up: #34680 (the second `GOVERNED_APPROVERS` table in `ui/scripts/check-governed-queue-guard.mjs`; this PR only aligns its value). - Not touched: `scripts/pm/check-governed-merges.mjs:1049` (a dated reading, `merged_by: hotlong`), `check-prior-rulings.mjs` and `fleet-roster.mjs` fixtures, and ADR-0130's evidence line. They record history or use the login as plain data, not as an approver. ## Verification Head `fd6c64c745b2d22d5ec0145a53f2dd390a9f0134` (main e533651 merged in). <details><summary>Self-tests of every script that reads GOVERNED_APPROVERS</summary> ``` node scripts/pm/check-owed-reviews.mjs --self-test :: exit 0 ✓ check-owed-reviews self-test: 91 cases pass in 10 batteries (the owed face from paths, the Clause-② line… node ui/scripts/check-governed-queue-guard.mjs --self-test :: exit 0 OK check-governed-queue-guard self-test: 183 cases pass (the six ruled surfaces pinned in both directions incl… node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0 ✓ check-governed-queue-guard self-test: 581 cases pass (register-driven verdicts, the queue/PR event split,… node scripts/pm/fleet-write/execute.mjs --self-test :: exit 0 ✓ fleet-write/execute self-test: 426 cases pass across 30 batteries — the sender gate from the target repo… node scripts/pm/check-governed-merges.mjs --self-test :: exit 0 ✓ check-governed-merges --self-test: 911 assertions (the unified governed predicate + near misses, subject… node scripts/pm/check-half-states.mjs --self-test :: exit 0 ✓ check-half-states self-test: 5313 cases pass. Batteries: H66 released queue card 182/172, H19 judged-set f… node scripts/pm/label-write.mjs --self-test :: exit 0 ✓ label-write self-test: 277 cases pass across 17 batteries — the union/difference arithmetic, the ONE-OF… node scripts/pm/record-recognisers.mjs --self-test :: exit 0 ✓ record-recognisers self-test: 451 cases pass (the locator on either thread with its recognition dialects,… npx eslint scripts/pm/check-governed-queue-guard.mjs scripts/pm/check-governed-merges.mjs scripts/pm/check-half-states.mjs scripts/pm/fleet-write/execute.mjs ui/scripts/check-governed-queue-guard.mjs :: exit 0 ``` </details> <details><summary>Derived gate round (dispatch-gates --commands, 82 commands)</summary> Every command ran on head `fd6c64c745` with stdin closed; exit codes captured before any pipe. The record is `objectstack-seat2/34626-gates-ran.txt` on the project share. ``` dispatch-gates --commands → 82 commands 80 :: exit 0 on the first pass pnpm check:i18n-coverage :: exit 3 (prerequisite: no CLI build) → after a full `pnpm build` (lock VERDICT command-exit 0, 12m49s) :: exit 0 pnpm --dir ui exec vitest run scripts/ :: exit 1 (56 failures, all reading an unbuilt @objectstack/spec / ui dist) → after the build :: exit 0, Tests 5077 passed | 2 skipped dispatch-gates --ran → 82 derived, 82 run, 0 NOT-MEASURED, 0 UNRUN ``` CI on the same head: every required context green, including `Governed Surface Queue Guard`, `Lint & Repo Gates`, `Test Core`, `Test UI` and `Dogfood Regression Gate`. </details> <details><summary>overlap-check</summary> ``` node scripts/pm/overlap-check.mjs --pr=34110 → VERDICT clean exit 0 (with the half-states commit on the branch) node scripts/pm/overlap-check.mjs → VERDICT clean exit 0 ``` </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmQ6PjSaHTK32B2RjNT)_ <!-- signed: repo:objectstack#2 · os-steve · session_01ADHkmQ6PjSaHTK32B2RjNT --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 0d0a088 commit 77d7f52

6 files changed

Lines changed: 216 additions & 148 deletions

File tree

‎.github/CODEOWNERS‎

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@
1010
#
1111
# The owner list on EVERY row mirrors `GOVERNED_APPROVERS` in
1212
# scripts/pm/check-governed-queue-guard.mjs — the one list of accounts whose
13-
# APPROVED review lands a Tier H surface (「os-zhuang hotlong 批准算数」). The
14-
# rows mirror the Tier H rows of `GOVERNED_SURFACES` in
15-
# scripts/pm/check-governed-merges.mjs. This file is static and can import
13+
# APPROVED review lands a Tier H surface. Since 2026-11-17 that is `os-zhuang`
14+
# alone (maintainer, triage session, verbatim: 「hotlong 从批准账户中去掉,只保留
15+
# os-zhuang」), superseding the membership of 2026-08-27 (「os-zhuang hotlong
16+
# 批准算数」), which this line carried until then. The rows mirror the Tier H
17+
# rows of `GOVERNED_SURFACES` in scripts/pm/check-governed-merges.mjs. This file is static and can import
1618
# neither, so the two stay in step the only way a static file can:
1719
# `node scripts/pm/check-governed-queue-guard.mjs --self-test` reads this file
1820
# (`codeownersMirrorVerdict`) and reds when a Tier H row has no line here, when
@@ -36,10 +38,12 @@
3638
# code owner without write access is ignored by GitHub without a word:
3739
# `GET /repos/{owner}/{repo}/codeowners/errors` reads this file's own verdict.
3840
#
39-
# Both logins are verified, not assumed: `hotlong` authors the bulk of main's
40-
# history as 50353452+hotlong@users.noreply.github.com (GitHub's {id}+{login}
41-
# noreply form ties the login to the account); `os-zhuang` is named by the
42-
# ruling above and has readied and reviewed this repository's pulls.
41+
# The login is verified, not assumed: `os-zhuang` is named by both rulings
42+
# above and has readied and reviewed this repository's pulls. Until 2026-11-17
43+
# every row also named `@hotlong` (verified then as the account authoring the
44+
# bulk of main's history, 50353452+hotlong@users.noreply.github.com); the
45+
# 2026-11-17 ruling removed it, because `hotlong` runs seats and an approver
46+
# account never does.
4347
#
4448
# The enforcement chain is routed the same way, deliberately: a PR that edits
4549
# the audit script, the approver constant or this file is a governance change —
@@ -48,21 +52,21 @@
4852

4953
# Tier H governed surfaces — the register's rows with tier H, less the
5054
# low-risk arm's `/docs/adr/` and `/skills/` rows (see the header)
51-
/AGENTS.md @os-zhuang @hotlong
52-
/CLAUDE.md @os-zhuang @hotlong
53-
/docs/NORTH-STAR.md @os-zhuang @hotlong
54-
/.github/workflows/ @os-zhuang @hotlong
55+
/AGENTS.md @os-zhuang
56+
/CLAUDE.md @os-zhuang
57+
/docs/NORTH-STAR.md @os-zhuang
58+
/.github/workflows/ @os-zhuang
5559

5660
# Tier H governed surfaces of the nested `ui/` workspace (#25712) — the same
5761
# register rows, under `ui/`; `ui/.claude/` is Tier H, unlike the root tree;
5862
# `/ui/skills/` carries the low-risk arm too and has no line
59-
/ui/docs/adr/ @os-zhuang @hotlong
60-
/ui/.claude/ @os-zhuang @hotlong
61-
/ui/AGENTS.md @os-zhuang @hotlong
62-
/ui/CLAUDE.md @os-zhuang @hotlong
63-
/ui/.github/workflows/ @os-zhuang @hotlong
63+
/ui/docs/adr/ @os-zhuang
64+
/ui/.claude/ @os-zhuang
65+
/ui/AGENTS.md @os-zhuang
66+
/ui/CLAUDE.md @os-zhuang
67+
/ui/.github/workflows/ @os-zhuang
6468

6569
# The enforcement chain
66-
/.github/CODEOWNERS @os-zhuang @hotlong
67-
/scripts/pm/check-governed-merges.mjs @os-zhuang @hotlong
68-
/scripts/pm/check-governed-queue-guard.mjs @os-zhuang @hotlong
70+
/.github/CODEOWNERS @os-zhuang
71+
/scripts/pm/check-governed-merges.mjs @os-zhuang
72+
/scripts/pm/check-governed-queue-guard.mjs @os-zhuang

‎scripts/pm/check-governed-merges.mjs‎

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9675,13 +9675,13 @@ async function selfTest() {
96759675
sizeLimbFires(sizeVerdict(overSize, enqueued('undetermined', null))) === true &&
96769676
sizeLiftFrom({ state: 'unapproved', approvals: [], enqueue: { state: 'authorized', login: '' } }) === null);
96779677
assert('an-authorized-APPROVAL-is-the-lift-read-first-even-with-an-authorized-enqueue-beside-it',
9678-
sizeLiftFrom(authorizedVerdict([{ login: 'hotlong', commitId: LIFT_SHA }], { enqueue: { state: 'authorized', login: 'os-zhuang' } })).ruling === SIZE_LIFT_RULING);
9678+
sizeLiftFrom(authorizedVerdict([{ login: 'os-zhuang', commitId: LIFT_SHA }], { enqueue: { state: 'authorized', login: 'os-zhuang' } })).ruling === SIZE_LIFT_RULING);
96799679
assert('an-approval-under-the-line-lifts-nothing-because-there-is-nothing-to-lift',
9680-
sizeVerdict({ additions: 10, deletions: 2 }, authorizedVerdict([{ login: 'hotlong', commitId: LIFT_SHA }])).lifted === null && sizeVerdict(null, authorizedVerdict([{ login: 'hotlong', commitId: LIFT_SHA }])).lifted === null);
9681-
const liftedGoverned = testVerdict(['AGENTS.md'], { repo: REPO, size: overSize, approval: authorizedVerdict([{ login: 'hotlong', commitId: LIFT_SHA }]) });
9680+
sizeVerdict({ additions: 10, deletions: 2 }, authorizedVerdict([{ login: 'os-zhuang', commitId: LIFT_SHA }])).lifted === null && sizeVerdict(null, authorizedVerdict([{ login: 'os-zhuang', commitId: LIFT_SHA }])).lifted === null);
9681+
const liftedGoverned = testVerdict(['AGENTS.md'], { repo: REPO, size: overSize, approval: authorizedVerdict([{ login: 'os-zhuang', commitId: LIFT_SHA }]) });
96829682
assert('⭐ the-lift-moves-the-SIZE-limb-only-a-governed-PATH-still-lands-per-its-tier-and-a-FORK-head-is-untouched',
96839683
liftedGoverned.governed === true && landsByHumanMerge(liftedGoverned) === true && liftedGoverned.size.lifted !== null &&
9684-
landsByHumanMerge(testVerdict(['x.ts'], { repo: REPO, size: overSize, approval: authorizedVerdict([{ login: 'hotlong', commitId: LIFT_SHA }]), fork: forkVerdict({ base: { repo: { full_name: 'o/r' } }, head: { repo: { full_name: 'f/r' } } }) })) === true);
9684+
landsByHumanMerge(testVerdict(['x.ts'], { repo: REPO, size: overSize, approval: authorizedVerdict([{ login: 'os-zhuang', commitId: LIFT_SHA }]), fork: forkVerdict({ base: { repo: { full_name: 'o/r' } }, head: { repo: { full_name: 'f/r' } } }) })) === true);
96859685
assert('⭐ the-post-merge-sweep-hands-in-NO-approval-so-an-oversized-landing-is-STILL-listed',
96869686
classifyCommit({ sha: 'b'.repeat(40), date: '2026-09-27T02:02:33Z', subject: 'feat!: retire the saved-report stack (#20125)' }, ['packages/x.ts'], GOVERNED_REPOS[0], { additions: 10764, deletions: 999 }) !== null);
96879687
assert('and-the-not-lifted-words-name-BOTH-landings-the-authorized-approval-and-the-maintainers-merge',
@@ -11043,7 +11043,12 @@ async function selfTest() {
1104311043
// N10: a close is a ruling only by an authorized approver's hand.
1104411044
const now = Date.parse('2026-11-15T23:40:00Z');
1104511045
const closedCard = (number, close, more = {}) => ({ number, body: card(['- PR #50 — ruled row']), state_reason: 'completed', closed_at: '2026-11-12T00:00:00Z', close, ...more });
11046-
const approvers = ['os-zhuang', 'hotlong'];
11046+
// The approver list is the queue guard's own `GOVERNED_APPROVERS`, loaded exactly as the job loads it: no second
11047+
// literal list here to drift from the constant (2026-11-17 removed `hotlong` from it — 「hotlong 从批准账户中去掉,只保留
11048+
// os-zhuang」 — and that account's hand close is pinned below as ruling nothing).
11049+
const rulingAccounts = await loadAuditRulingAccounts();
11050+
const approvers = rulingAccounts.accounts;
11051+
assert('N10-the-approver-list-is-the-queue-guards-GOVERNED_APPROVERS-not-a-copy', rulingAccounts.available && approvers.join() === 'os-zhuang', JSON.stringify(rulingAccounts));
1104711052
const byHand = ruledAuditRows([closedCard(910, { actor: 'os-zhuang', commitId: null, app: null })], { now, approvers });
1104811053
assert('⭐ N10-an-approvers-hand-close-rules-its-rows', byHand.ruled.get('PR #50') === 910 && byHand.unruled.length === 0, JSON.stringify([...byHand.ruled]));
1104911054
for (const [name, c, more] of [
@@ -11052,22 +11057,23 @@ async function selfTest() {
1105211057
['the-stale-bot', { actor: 'github-actions[bot]', commitId: null, app: null }, { state_reason: 'not_planned' }],
1105311058
['an-unreadable-close-event', null, {}],
1105411059
['a-duplicate-close', { actor: 'os-zhuang', commitId: null, app: null }, { state_reason: 'duplicate' }],
11060+
['a-hand-close-by-the-account-removed-from-the-approvers-2026-11-17', { actor: 'hotlong', commitId: null, app: null }, {}],
1105511061
]) {
1105611062
const r = ruledAuditRows([closedCard(911, c, more)], { now, approvers });
1105711063
assert(`⭐ N10-${name}-rules-nothing`, r.ruled.size === 0 && r.unruled[0]?.number === 911, JSON.stringify(r.unruled));
1105811064
}
1105911065
// Review S1: the app field is read by PRESENCE. An object (named or not) rules nothing, an absent key is an
1106011066
// unreadable event, and null (what the platform serves on every close today) leaves the login test to decide.
11061-
const viaApp = ruledAuditRows([closedCard(913, { actor: 'hotlong', commitId: null, app: { slug: 'claude' } }), closedCard(916, { actor: 'hotlong', commitId: null, app: {} })], { now, approvers });
11062-
assert('⭐ S1-a-close-with-an-app-object-named-or-not-rules-nothing', viaApp.ruled.size === 0 && viaApp.unruled.length === 2 && viaApp.unruled.every((u) => /closed through a GitHub App on hotlong/.test(u.why)), JSON.stringify(viaApp.unruled));
11063-
const noKey = ruledAuditRows([closedCard(917, { actor: 'hotlong', commitId: null })], { now, approvers });
11067+
const viaApp = ruledAuditRows([closedCard(913, { actor: 'os-zhuang', commitId: null, app: { slug: 'claude' } }), closedCard(916, { actor: 'os-zhuang', commitId: null, app: {} })], { now, approvers });
11068+
assert('⭐ S1-a-close-with-an-app-object-named-or-not-rules-nothing', viaApp.ruled.size === 0 && viaApp.unruled.length === 2 && viaApp.unruled.every((u) => /closed through a GitHub App on os-zhuang/.test(u.why)), JSON.stringify(viaApp.unruled));
11069+
const noKey = ruledAuditRows([closedCard(917, { actor: 'os-zhuang', commitId: null })], { now, approvers });
1106411070
assert('⭐ S1-a-close-event-without-the-app-key-is-unreadable-and-rules-nothing', noKey.ruled.size === 0 && /does not carry `performed_via_github_app`/.test(noKey.unruled[0]?.why ?? ''), JSON.stringify(noKey.unruled));
11065-
assert('S1-control-the-same-account-closing-with-a-null-app-rules', ruledAuditRows([closedCard(914, { actor: 'hotlong', commitId: null, app: null })], { now, approvers }).ruled.size === 1);
11071+
assert('S1-control-the-same-account-closing-with-a-null-app-rules', ruledAuditRows([closedCard(914, { actor: 'os-zhuang', commitId: null, app: null })], { now, approvers }).ruled.size === 1);
1106611072
assert('S1-the-job-passes-the-app-field-through-by-presence-not-by-name', /'performed_via_github_app' in last/.test(cardStep) && !/performed_via_github_app\?\.(slug|name)/.test(cardStep), cardStep.slice(0, 200));
1106711073
assert('N10-no-approver-list-rules-nothing', ruledAuditRows([closedCard(912, { actor: 'os-zhuang', commitId: null, app: null })], { now, approvers: [] }).ruled.size === 0);
1106811074

1106911075
// N12: every ruled card counts, not only the newest.
11070-
const newerUnreadOnly = { number: 920, body: [`${AUDIT_CARD.unreadHeading} — 1`, '', '- PR #60 low-risk arm NOT MEASURED: x', '', `${AUDIT_CARD.footer} x`].join('\n'), state_reason: 'completed', closed_at: '2026-11-14T00:00:00Z', close: { actor: 'hotlong', commitId: null, app: null } };
11076+
const newerUnreadOnly = { number: 920, body: [`${AUDIT_CARD.unreadHeading} — 1`, '', '- PR #60 low-risk arm NOT MEASURED: x', '', `${AUDIT_CARD.footer} x`].join('\n'), state_reason: 'completed', closed_at: '2026-11-14T00:00:00Z', close: { actor: 'os-zhuang', commitId: null, app: null } };
1107111077
const older = closedCard(915, { actor: 'os-zhuang', commitId: null, app: null });
1107211078
const both = ruledAuditRows([newerUnreadOnly, older], { now, approvers });
1107311079
assert('⭐ N12-an-older-ruling-behind-a-newer-NOT-MEASURED-only-close-still-rules', both.ruled.get('PR #50') === 915 && !both.ruled.has('PR #60'), JSON.stringify([...both.ruled]));

0 commit comments

Comments
 (0)