Repository navigation
pm: the governed-merges sweep lists low-risk arm landings apart and judges each on a same-head at-tier PASS record - #33711
Conversation
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier:
Check-runs on the head when this was written: 24 success, 23 skipped, 0 failed; ① Derived judgments
② Semver level
③ Boundary flagsThe dev report carries no
④ Design judgmentNo must-fix. Two should-fix, both in S1 (should-fix) — a landing the maintainer cleared is reported as a BREACH. In the queue, an entry the arm reads Tier S is cleared by an authorized approval or an authorized enqueue BEFORE the record leg runs ( S2 (should-fix) — the record's head is never tied to the landed commit. The PR is taken from the commit subject ( Nits (no effect on a correct, honest run; follow-up or accepted deviation):
Held against the break list: a record on another head, below the tier, unsigned, FAIL, or posted after the landing is a Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-15T07:15Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
9d13278 to
42323f3
Compare
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: DELTA review from Check-runs on this head when this was written: 45 runs; 13 success, 22 skipped, 0 failed, 10 still in progress. Pending: ① Derived judgments
② Semver levelUnchanged: ③ Boundary flags
④ Design judgmentNo must-fix. One should-fix, new at this head, and two nits. S3 (should-fix) — the audit's record leg does not apply the guard's author binding. Main moved under this branch: #33687 (card #33541) made Nits:
Held against the break list for the delta: an enqueue or approval by a seat account, an unauthorized account, or after the landing clears nothing (pinned); an unread review list, timeline, pull or merge is Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-15T07:48Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
…udges each on a same-head at-tier PASS record; verifier residuals The sweep reads every skills landing again with the queue guard's own arm and record readers on the landed commit: an arm landing is listed apart from the maintainer's merges, PASS on a same-head at-tier PASS record that existed when it landed, BREACH without one; a read that fails is NOT MEASURED and the sweep INCOMPLETE. Neither dispatch awaits at module scope, so the lazy guard import cannot deadlock. verify-review-tier compares advisorModel and refuses a run that hands work to another agent (its turns are in another file). post-stamped's spawn of the verifier self-test carries a timeout and relays the child's failure lines. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5kXwEA8abP4hMhtodW
…m its own card Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5kXwEA8abP4hMhtodW
…d name Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5kXwEA8abP4hMhtodW
… ties a record to the landed commit, and drops rows edited after it The sweep now reads the guard's own leg order on an arm landing: an authorized approval, then an authorized enqueue, then the record. A cleared landing stays on the maintainer's list. Reviews and timeline events count only strictly before merged_at (the queue's removal shares the merge's instant), comments only when created and last edited by then. A record counts only on a pull GitHub says landed as this commit. The verifier's sub-agent refusal now asks for the reviewing agent's transcript. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5kXwEA8abP4hMhtodW
…REACH names a record edited after the landing The sweep's record leg drops a comment its author does not earn with the guard's own recordAuthorTrusted, beside the time filter, so a record any commenter posted cannot excuse a landing and an untrusted row cannot shadow a trusted one. A trusted record dropped for an edit after the landing is named in the BREACH reason. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5kXwEA8abP4hMhtodW
42323f3 to
c48e9f1
Compare
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier: DELTA review from Check-runs on this head when this was written: 43 runs; 7 success, 22 skipped, 1 cancelled, 0 failed, 13 still in progress. Pending: ① Derived judgments
② Semver levelUnchanged: ③ Boundary flags
④ Design judgmentNo must-fix. No should-fix. Three new nits.
Held against the break list for the delta: a record by an author outside the relay and Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-15T08:13Z · isolated sub-agent at CONTRACT_REVIEW_TIER (served model verified by the seat) · Ruling-ref: Leehom card cmsg_01TenzsRopZj4jMbvjX8uz1XFhuiZmTH8VFgMmHRmpiGAb, option A, tapped 2026-11-14T15:37Z |
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb 席位核对Verdict: ACCEPT, seat lands (ungoverned, scripts/pm/)** · head
|
… and a dismissed approval as it stood, and the verifier refuses skill and connector hand-offs (objectstack-ai#33762) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XL2xU3RxQwgawwt8cWF1NtV)_ Fixes objectstack-ai#33729 Clause-②: no Metadata-protocol: none domain:skills#1 · os-project-manager · session_01FEkQ5nqeu4RWPfV6S5jfCq ## 维护者速读 - 改了什么:合后审计 `check-governed-merges.mjs` 的 skills arm 一腿收紧 PR objectstack-ai#33711 评审留下的六处 nit:arm 需要的 git 读取失败或 fork 判定没测到时记 NOT MEASURED(不再折成 Tier H);合并后才被撤销的授权批准按合并时的状态读;"合并后被编辑"一句挂在每种 BREACH 理由上,且只点名本该被读成记录的那条;没有受信作者名单记 NOT MEASURED,被作者绑定丢掉的评论按守卫原话计数。校验器 `verify-review-tier.mjs` 另拒 `Skill` 和向别的线程、会话、触发器发消息或启动它们的连接器工具。N6 以理由关闭,不改代码。 - 为什么改:卡 objectstack-ai#33729 是 objectstack-ai#33711 三份复核记录(6890932729、6891274033、6891542450)的 nit 清单,按 objectstack-ai#33718 裁决 B 一卡一 PR。 - 风险与回滚:只动两个 `scripts/pm/` 工具文件,不发布。方向全部是收紧:Tier H 可能变 NOT MEASURED(整轮 INCOMPLETE,退出 2);唯一由 BREACH 变 cleared 的是 N8 点名的情形(合并后撤销的授权批准),这是该项本身要的。校验器多拒一类转录。回滚即还原本 PR。 - 先看:`scripts/pm/check-governed-merges.mjs` 的 `readArmLanding`、`armReadsNotMeasured`、`reviewsAsLanded`;`scripts/pm/verify-review-tier.mjs` 的 `SUB_AGENT_TOOL_SHAPES`。 - 两分钟验证:`node scripts/pm/check-governed-merges.mjs --self-test && node scripts/pm/verify-review-tier.mjs --self-test`,预期两行成功判定(741 条断言;30 个用例)。 - 需要你做的:无,席位落地。 ## What changes Card objectstack-ai#33729's checklist, item by item. Every reading still goes through the queue guard's exports (`ARM_READER_EXPORTS`, now with `ignoredAuthorLines`); no second parser. | Item | Verdict | Where | |:--|:--|:--| | N3 `SUB_AGENT_TOOLS` is an exact-name list | Fixed. `handsWorkToAnotherAgent` adds `SUB_AGENT_TOOL_SHAPES`: `Skill` (a skill can fork into a sub-agent and reads the same in the file either way), and a connector tool `mcp__SERVER__TOOL` whose tool name starts with `send`, `message`, `start`, `fire`, `spawn`, `dispatch` or `delegate`, or names a trigger. The `mcp__SERVER__TOOL` spelling was measured in a session transcript (`mcp__hearthbot__message_thread`). Fail closed: a read-only connector tool that fits the shape refuses too. | `verify-review-tier.mjs`, 3 pin rows | | N5 a git-side read failing in the arm folds into `tier-h` | Fixed. `readArmLanding` hands the arm a git reader that records every throw; when the arm reads H with a recorded throw, or with the fork predicate not measured, the landing is `not-measured` with the failed read and the arm's reasons (`armReadsNotMeasured`). One exception, read rather than assumed: `git show SHA:PATH` throws for a changeset the commit deleted, and the arm reads that H by itself; an empty `git ls-tree` of that path at that commit proves the deletion, so it stays a measured Tier H. The Tier H cell now says how many reasons it did not print (`(+N more)`). | `check-governed-merges.mjs`, 5 pin rows | | N6 `baseRef` is the first parent, not the merge group's base | Closed with a reason, no code change. `baseRef` is read only by the carry test (`regenCarry` in `record-recognisers.mjs`), through `git merge-base BASE HEAD`. Between the merge group's base and the landed commit's first parent lie only the squash commits of entries ahead in the same group. A head that contains one of those was pushed after that entry landed, which takes it out of the queue, so its next group's base already holds it. Either way `git merge-base` of the two bases with a queued head names the same commit, and the carry reads the same. The reasoning is in `readArmLanding`'s jsdoc. | jsdoc | | N8 an approval dismissed after the landing no longer clears | Fixed. `reviewsAsLanded` puts a review that now reads DISMISSED back in the state the timeline's `review_dismissed` event names (`dismissed_review.state`, matched by `dismissed_review.review_id`) when that event is dated at or after the landing. A dismissal before the landing, with no event, or of a non-approval clears nothing. The event's shape is GitHub's documented timeline shape; no live dismissal was found to measure it on, and a shape that does not match leaves the review DISMISSED (toward BREACH, as today). | `check-governed-merges.mjs`, 2 pin rows | | N9 the edited-after clause rides only `absent` | Fixed. It is appended to every BREACH reason (`absent`, `below-tier`, `unsigned`, `not-pass`). | 1 pin row | | N10 the clause names any trusted comment edited after the landing; "A, B was edited" | Fixed with the guard's own reader, no new recogniser: the record leg runs once more, read-only, on the threads with the edited rows put back (`guard.recordVerdict` on `unedited`), and the clause names the edited row only when that run would have read it as the record. So a claim or report edited after the merge is never named, and the clause names one comment. | 2 pin rows | | N11 no row for unavailable recognisers or a set without `trustedAuthors`; an untrusted PASS reads like no record | Fixed. A recogniser set with no trusted-author list (null or empty) is now `not-measured` before any thread is read, where it read BREACH (every row dropped); both readings fail closed, and a missing reading is NOT MEASURED. The comments the author binding dropped (those existing at the landing) are counted on `pass` and `breach` rows in the guard's own words (`ignoredAuthorLines`). | 3 pin rows | Direction check against the order ("nothing here may make the audit read `pass` where it reads BREACH or NOT MEASURED today unless the item says so"): no state moves to `pass`. N5 and N11 move `tier-h` and `breach` to `not-measured`. N8 moves a `breach` to `cleared` only for an authorized approval dismissed after the landing, which is what N8 asks. ## Tests <details><summary>Self-tests on head 9177c4e</summary> - `node scripts/pm/check-governed-merges.mjs --self-test`: exit 0, `✓ check-governed-merges --self-test: 741 assertions`. The `⚖️ objectstack-ai#33603` battery has 51 cases (floor 38 to 51): the 13 new rows above. - `node scripts/pm/verify-review-tier.mjs --self-test`: exit 0, `✓ verify-review-tier self-test: 30 cases pass across 6 batteries` (battery floor 7 to 10). </details> <details><summary>Ablations (each through scripts/ablation-replace.mjs, anchor hit once, restored to the HEAD blob with an empty git diff HEAD)</summary> | Mutation | Red rows | |:--|:--| | `if (false && unread.length > 0)` (N5) | the three N5 NOT MEASURED rows | | delete `if (listed === '') continue;` (N5 deletion probe) | the deleted-changeset control | | `restored.set` removed (N8) | the dismissed-after-landing row | | trusted-author check disabled (N11) | the no-trusted-author-list row | | clause on any edited row (N10) | the edited-claim row | | clause dropped from the reason (N9) | the N9 row, the N10 one-record row and the existing N7 row | | delete the `Skill` shape (N3) | the Skill row | | delete the trigger shape (N3) | the connector-tool row | </details> ## Acceptance notes - N8's restore reads only GitHub-written timeline events, and only to restore a state the queue saw; it never invents an approval. - N3 widens what the verifier refuses, so an honest review run that calls `Skill` now refuses; the remedy is the existing one (review in an agent that calls no other). - Carried elsewhere, unchanged: raw relay comment tier objectstack-ai#33715, `contract-review.md` session evidence objectstack-ai#33716, weekly audit owner objectstack-ai#33717. ## Verification <details><summary>Derived gates on head 9177c4e: 33 of 33 exit 0 (dispatch-gates --ran: 33 derived, 33 run, 0 NOT MEASURED)</summary> ```text node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-declaration-mirrors.mjs :: exit 0 node scripts/check-declaration-mirrors.mjs --self-test :: exit 0 node scripts/check-self-test-wired.mjs :: exit 0 node scripts/check-self-test-wired.mjs --self-test :: exit 0 node scripts/check-self-test-workflow-commands.mjs :: exit 0 node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0 node scripts/check-skills-token-ratchet.mjs :: exit 0 node scripts/check-skills-token-ratchet.mjs --self-test :: exit 0 node scripts/check-whole-set-label-write.mjs :: exit 0 node scripts/check-whole-set-label-write.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:bash32-floor :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:cli-command-ids :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:entry-guard :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:parse-guard :: exit 0 pnpm check:pm-dispatch-gates :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pnpm-filter-targets :: exit 0 pnpm check:pnpm-flag-spellings :: exit 0 pnpm check:ratchet-remedy-authority :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:scripts-symbol-anchors :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` Also run: both scripts' own `--self-test` (exit 0, outside the derivation), and `ui/scripts/__tests__/check-governed-queue-guard.test.ts`, the one test file naming `check-governed-merges.mjs` (`VERDICT command-exit 0`, 10/10). </details> - `node scripts/pm/dispatch-gates.mjs --tier`: no path-derived mandate (the surface hits none of the 4 declared globs); 205 changed lines, under 3000. - `node scripts/pm/check-governed-merges.mjs --branch claude/project-thread-qz1fgc`: 0 of 2 paths hit the register, NOT governed; size 205 (+183 / −22). - `skip-changeset`: two `scripts/pm/**` tools, nothing published. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5nqeu4RWPfV6S5jfCq)_ <!-- signed: domain:skills#1 · os-project-manager · session_01FEkQ5nqeu4RWPfV6S5jfCq --> Co-authored-by: Claude <noreply@anthropic.com>
…n open must-fix or should-fix (objectstack-ai#33736) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XLnqJDfSWuHodQt1yWeTRqD)_ Fixes objectstack-ai#33604 domain:skills#1 · os-project-manager · session_01FEkQ5pJkb8Rbcrj6yEXfiA Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:合并队列守卫对 Tier S 的复核记录多读三件事:记录虽写 PASS 但同时列着未结的 must-fix 或 should-fix,不放行;记录别处(任一标题、小写/列表/表格/标题里的 verdict 行、单独一行 FAIL)写着 FAIL,不放行;题头之上的 `VERDICT:` 行也计数。同一 head 上后一条把它们关掉的 delta 记录才放行(引用前一条记录的等级、写明 closed 的不算未结)。规则文字的一句(contract-review.md ①)由 objectstack-ai#33731 带,本 PR 不碰该文件。 - **为什么改**:规则说 should-fix 要先做 delta 复核再落地,守卫却只认 PASS 这个词,带着未结 should-fix 的 PASS 记录能直接入队(卡 objectstack-ai#33604,加上 objectstack-ai#33687 复核记录 6890532571 的 N2、N3)。 - **风险与回滚**:只收紧放行面,不放宽:原来清不了的照样清不了。读不懂的等级一律不放行(fail closed),复核者要按 `S1 (should-fix)` 或 `No must-fix, no should-fix.` 的写法落记录,简报模板已同步写明。回滚即 revert。 - **先看**:`scripts/pm/check-half-states.mjs` 的 `contractReviewRecordReading`(唯一读法);`scripts/pm/check-governed-queue-guard.mjs` 的 `recordPassVerdict`;`record-recognisers.mjs` 的 `BRIEF_GRADE_LINES`(教复核者的写法)。 - **两分钟验证**:`node scripts/pm/check-governed-queue-guard.mjs --self-test && node scripts/pm/check-half-states.mjs --self-test && node scripts/pm/record-recognisers.mjs --self-test`,预期三个全绿(526 / 5268 / 389 例)。 - **需要你做的**:无,席位落地(非受管面)。 ## What changes 1. **One reader, `contractReviewRecordReading`** (`scripts/pm/check-half-states.mjs`, beside `contractReviewVerdictLines`, on the same regexes; ⛔ no second parser). For a comment with a `## Contract review` heading it returns: - `verdicts`: every explicit `VERDICT:` line's word, over the WHOLE comment (N3: lines above the heading count). `contractReviewVerdictLines` is now a view of this. - `failSpellings`: lines that read FAIL outside the explicit form (N2), in every verdict-bearing shape measured: a caps FAIL anywhere in any `## Contract review` heading's tail; a `verdict` key in any case under a heading mark, quote, bullet or emphasis, after up to two words (`Overall verdict:`), with a parenthetical (`Verdict (delta):`), with `:`, a dash, `=` or `is`, reading FAIL, FAILED or FAILS; a table row with a verdict cell and a FAIL cell in either order; a bare `FAIL` line followed only by a separator, a full stop or `!`. Prose that merely mentions FAIL (`- Newest FAIL over an older PASS`, `FAIL, none or two refuse`) is not one. - `findings`: per mention of the hyphenated grade word: `open` (named with its grade at the line's lead: `**S1 (should-fix) — …**`, `- **S2 (should-fix) — …**`, `M1 (must-fix, …)`, `- should-fix: …`); `closed` (a named finding whose line goes on to say closed and ENDS there: only closing emphasis, `.`, `;` or `on this head` / `at this head` / `here` may follow, and a full stop that closes the bold title may lead a new sentence: `- **S1 (should-fix): closed.**`); `none` (`must-fix: none`, same terms); a title that merely opens with either word (`closed in part`, `Closed PRs …`, `none of …`) stays OPEN; `cited` (inside `(record ID: …)`, the measured delta preamble); negated (`No must-fix, no should-fix.`, `No new should-fix.`, `Neither must-fix nor should-fix.`, `0 must-fix`, a second grade carried by `or` or `/`; after a comma or `and` the second grade needs its own `no`); or `unreadable` (any other mention, e.g. `Two should-fix, both …` or `No must-fix, should-fix S1 and S2 below.`). 2. **The guard decides** (`recordPassVerdict`, every Tier S leg including the low-risk arm): after the existing one-PASS-line rule, a record also refuses (`not-pass`, naming the comment id) when it carries a FAIL spelling, names an open must-fix or should-fix, has an unattributable grade, or its reading lacks the grade fields (fail closed). The recogniser loader now requires `reading` (re-exported by `record-recognisers.mjs`) in place of `verdictLines`. A later same-head delta record that cites the prior record's grades, names what it closes (`S1: closed`, `S1 (should-fix): closed`) and raises nothing new clears, because the locator already reads the newest same-head record. The unattributable refusal names the shapes the reader takes; it never asks for a sentence the record may already carry. 3. **The brief teaches the grammar** (`record-recognisers.mjs` `BRIEF_GRADE_LINES`, +3 lines): spell a finding `S1 (should-fix) — …`, a clean round `No must-fix, no should-fix.`, and close by id alone. ## Acceptance notes - **Round 3 (review 6892305129, S1 and N2).** S1: the round-2 closed/none reading took the first word after the grade, so `S1 (should-fix): closed in part, still open for X`, `**S2 (should-fix) — Closed PRs are still read as merged…**`, `- **S2 (should-fix) — none of the three ablations ran…**`, `S1 (should-fix) — closed on the prior head, reopened by this delta` and `- should-fix: none of S1, S2 is fixed` cleared; the state word must now end the finding, and each of those six refuses again (pinned, with a control that `closed here.`, a closed bold title followed by a sentence, and `closed;` still clear). N2 (cheap ones taken): `Verdict: FAILED`, `Verdict is FAIL`, `Verdict (delta): FAIL`, `| FAIL | Verdict |`, `FAIL!` and a late FAIL in a heading tail (`— PASS withdrawn, FAIL`) now refuse. Not taken: a verdict column carried by a header row (needs table state). Accepted nits N1, N3, N4 unchanged; N3's `- Leg verdict: fail-closed …` refusal stands (fail closed). - **Round 2 (review 6891926185, S1 and S2).** S1: the clean delta 6891542450 (objectstack-ai#33711's final record, nits only) was refused for its preamble `(record 6891274033: PASS, should-fix S3, nits N7 and N8)`; citations, named-and-closed lines and `No new should-fix.` now read clean, pinned on the measured preamble. S2: `### VERDICT: FAIL`, `## Verdict: FAIL`, `| Verdict | FAIL |`, `Overall verdict: FAIL`, `Verdict — FAIL`, `FAIL.` and `**FAIL.**` now refuse beside one PASS line, and `No must-fix, should-fix S1 and S2 below.` is unreadable (fail closed), one pin each. Nits taken: N1 (`Neither … nor`, `0 must-fix`, `must-fix: none`, `- should-fix: none` read clean), N3 (every heading's tail is read). Not taken: N2 (the grade is read off the hyphenated word only; the brief spells it and every measured record uses it), N4 (a prose bullet opening `- FAIL — …` refuses; fail closed, a repost cures it). - **Grammar measured, not assumed.** Read on the real records of PRs objectstack-ai#33686 (6890432656), objectstack-ai#33687 (6890532571), objectstack-ai#33688 (6890622635 round 1, 6890939010 delta) and objectstack-ai#33711 (6890932729) with the new reader, plus the review's own measurement of objectstack-ai#33711's deltas 6891274033 and 6891542450, objectstack-ai#33720 (6891083453) and objectstack-ai#33726 (6891576194): - objectstack-ai#33686, objectstack-ai#33687: one PASS, no FAIL spelling, no open grade, nothing unreadable → still clear. - objectstack-ai#33688 round 1: S1, S2 should-fix open → refused (correct: they earned a delta). - objectstack-ai#33688 delta 6890939010: S1, S2, N1 closed (`- **S1: closed.**`, no grade word), but it raises **S3 (should-fix, the seat's, no head change)** on the PR body → refused. If objectstack-ai#33688 is still queued when this lands, it needs a later same-head record closing S3. - objectstack-ai#33711 round 1: S1, S2 should-fix open plus the count line `No must-fix. Two should-fix, both …` (unreadable) → refused; delta 6891274033 raises S3 → refused; delta 6891542450 (cites the prior grades, closes S3, `No must-fix. No should-fix.`) → clears. - objectstack-ai#33720, objectstack-ai#33726: nits only → clear. - **Rule sentence owed, carried by PR objectstack-ai#33731.** The seat moved `contract-review.md` to objectstack-ai#33718 (PR objectstack-ai#33731) mid-round, so this PR leaves it untouched. The sentence the rule owes, measured to fit line 51 in place (63/63 lines, 119/120 bytes, paid by dropping 「两条」 and the second 「Tier」): `- 请审/求批与落地前检,过则 Tier S 入队、H 等人批:① 现 head 同形达档 PASS 在案,无前两级。` (前两级 = must-fix/should-fix, the term line 45 already uses). `check-skill-line-ratchet` was green with it on an earlier head (148b0ce6, dropped). - **Fail closed costs a wording rule.** A record that quotes the grade word in prose (`the should-fix rule says …`) is refused as unreadable. The brief now names the two shapes the reader accepts; a seat can always repost a clean record. - **Not changed:** the H43 patrol (`contractReviewVerdictOf`, first match under the heading) and `check-owed-reviews.mjs` still read no grades; that is follow-up F1 of record 6890532571, not this card. - Ablation, round 3 (on 38cc292, guard self-test, restored, `git diff HEAD` empty): the state-word tail reverted to `(closed|none)\b` → the r3 titled-open row red (all six CLEARED); the heading-tail caps FAIL deleted → the r3 N2 row red. - Ablation, round 2 (each reader branch mutated on 7c2fb52, guard self-test run, restored, `git diff HEAD` empty): citation off → the measured-delta row red; closed/none state off → 2 rows red; table-cell regex off → the S2 FAIL-forms row red; comma carrying the denial → the S2 comma row red. - Ablation, round 1 (each guard branch mutated with `scripts/ablation-replace.mjs`, run, restored; `git diff HEAD` empty after each): open-grade branch off → 3 objectstack-ai#33604 rows red; FAIL-spelling branch off → 2 N2 rows red; unattributable branch off → 1 row red; reading below the heading only → the N3 row red. ## Verification - `dispatch-gates --tier`: no path-derived model mandate (floor sonnet, default opus); built on the claim's default. - `check-governed-merges --branch claude/project-thread-78jrbs`: **NOT governed** (0 of 3 paths on the register; `scripts/pm/**` is not a row); 190 changed lines, under 3000. Ordinary queue landing. - Self-tests on the final head 38cc292: `check-governed-queue-guard --self-test` 526 pass; `check-half-states --self-test` 5268 pass (11 new H43 rows); `record-recognisers --self-test` 389 pass (1 new cross-tool pin: the brief's shapes are the guard's). <details><summary>Derived gate list on head 38cc292: 49 derived, 49 run green, 0 NOT MEASURED</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` on head 38cc292 (round 3, after merging `origin/main` again at 34c6eec; main's nine new commits touch none of the three files), each exit captured before any pipe; `--ran` reconciliation: "49 derived famil(ies) accounted for — 49 run, 0 NOT-MEASURED". `check:doc-formula-expressions` ran after `pnpm --filter "@objectstack/lint..." build` under the verify lock. The two `check-closing-keyword-parity` runs overlapped a five-second ablation window of the reader, a file they do not read; both were re-run on the restored tree, exit 0. ```text node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-declaration-mirrors.mjs :: exit 0 node scripts/check-declaration-mirrors.mjs --self-test :: exit 0 node scripts/check-issue-citations.mjs :: exit 0 node scripts/check-platform-checklist-watchdog.mjs :: exit 0 node scripts/check-platform-checklist-watchdog.mjs --self-test :: exit 0 node scripts/check-release-section-coverage.mjs :: exit 0 node scripts/check-release-section-coverage.mjs --strict :: exit 0 node scripts/check-self-test-wired.mjs :: exit 0 node scripts/check-self-test-wired.mjs --self-test :: exit 0 node scripts/check-self-test-workflow-commands.mjs :: exit 0 node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0 node scripts/check-whole-set-label-write.mjs :: exit 0 node scripts/check-whole-set-label-write.mjs --self-test :: exit 0 node scripts/ci/plan-test-core-shards.mjs --self-test :: exit 0 node scripts/ci/scheduled-full-run.mjs --self-test :: exit 0 node scripts/pm/bare-root-worklist.mjs --self-test :: exit 0 node scripts/pm/board-snapshot.mjs --self-test :: exit 0 node scripts/pm/check-governed-queue-guard.mjs --self-test :: exit 0 node scripts/pm/sweep-closed-cards.mjs --self-test :: exit 0 node scripts/render-release-coverage-anchor.mjs --self-test :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:bash32-floor :: exit 0 pnpm check:ci-filter-parity :: exit 0 pnpm check:cli-command-ids :: exit 0 pnpm check:closing-target-claim :: exit 0 pnpm check:commit-card-trailers :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:entry-guard :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:issue-citations :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:parse-guard :: exit 0 pnpm check:partof-closing-keyword :: exit 0 pnpm check:platform-checklist :: exit 0 pnpm check:pm-dispatch-gates :: exit 0 pnpm check:pm-half-states :: exit 0 pnpm check:pm-post-stamped :: exit 0 pnpm check:pm-record-recognisers :: exit 0 pnpm check:pnpm-filter-targets :: exit 0 pnpm check:pnpm-flag-spellings :: exit 0 pnpm check:ratchet-remedy-authority :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:scripts-symbol-anchors :: exit 0 pnpm check:single-claim-paths :: exit 0 pnpm check:watch-hint-literal :: exit 0 ``` - Rounds 1 and 2 ran the same 49 on bbe4fba and 7c2fb52, all green; an earlier pass on 148b0ce6 (with the `contract-review.md` line, since dropped) was stopped at 41 of 55, all green. </details> - Every family CI runs beyond the derived list: read off this PR's check-runs. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5pJkb8Rbcrj6yEXfiA)_ <!-- signed: domain:skills#1 · os-project-manager · session_01FEkQ5pJkb8Rbcrj6yEXfiA --> --------- Co-authored-by: Claude <noreply@anthropic.com>
…3766) <!-- claude-projects-attribution: {"github_login":"os-project-manager"} --> _Requested by **Leehom** · [project thread](https://claude.ai/code/project/chan_01TenzsRopZj4jMbvjX8uz1X?thread=cmsg_01TenzsRopZj4jMbvjX8uz1XBbeqTDBizjSe5fUrtDQ4Kj)_ Fixes objectstack-ai#33717 domain:skills#1 · os-project-manager · session_01FEkQ5mSZZN2eYXjy9RHmAu Clause-②: no Metadata-protocol: none ## 维护者速读 - **改了什么**:`fleet-patrols.yml` 加第五个任务 `governed-merges-audit`,每周日 23:31 UTC(周一 07:31 北京时间)对过去一周的 `main` 跑合并后受管面审计(`check-governed-merges.mjs`,不改脚本)。干净的一周什么都不写;出现低风险技能臂的 ⛔ BREACH,或这一周有读不到的部分(NOT MEASURED),就开或更新同一张给你的卡。 - **为什么改**:你在 objectstack-ai#33717 选了「每周定时工作流」:objectstack-ai#33711 合并后加一个每周任务,只在发现违规或读不到时开一张卡给你。在此之前审计只靠被审计的 skills 席位自己手跑。 - **风险与回滚**:不进必过检查、不挡任何 PR、任何席位的开工都不以它为前提(避开 objectstack-ai#208 的坑)。读不全的那周会让本任务变红并开卡;BREACH 开卡但任务保持绿。卡挂 `governed-merges-audit` 身份标签加 `pm:awaiting-maintainer`,正文带 `Maintainer-action:` 行,席位不会派发它。卡开着时,之后的坏周会把卡上尚未处理的 BREACH 行原样带进新正文,并在卡上留一条评论通知;BREACH 行靠你在卡上记下的裁定了结(重跑永远读不成干净),只有 NOT MEASURED 行靠手动重跑读干净了结;全部了结后由你关卡。关卡即视为卡上各行已裁定:之后窗口内再读到同一行,只列在「Already ruled on card #N」下,不再当新违规报给你;若只剩已裁定的行且没有读不到的部分,就不开卡。回滚即 revert 本 PR。 - **先看**:`.github/workflows/fleet-patrols.yml` 文件末尾新任务的头注释与 `File or refresh the audit card` 一步(写卡的唯一一步,PR 运行与非 main 分支都不写);其次 `on.schedule` 里新加的 cron。 - **两分钟验证**:看本 PR 上 Fleet Patrols 的 `Weekly governed-merges audit` 检查:它在 PR 上只扫 24 小时、不写卡,摘要里应写 `verdict clean` 并列出条目数。 - **需要你做的**:审阅后合并(Tier H,工作流面)。合并后席位会请你在 Actions 里手动触发一次 `patrol = governed-merges-audit` 读首个整周结果;首个定时运行转绿前,skills 席位照旧每周手跑。 ## What changes One file, `.github/workflows/fleet-patrols.yml`: a fifth job, `governed-merges-audit`, beside the four daily patrols, plus the shared parts a fifth job needs (header table, the `schedule:` cron, the `workflow_dispatch` `patrol` option, the count words "four clocks" / "all four"). - **Clock.** `31 23 * * 0` (Sunday 23:31 UTC), twinned in the job's `if:` and in `PATROL_SCHEDULE`. Hour 23 UTC carries no other scheduled workflow in this repository (inventory of every `cron:` under `.github/workflows/` at bd96ec9); board-snapshot spends the shared `GITHUB_TOKEN` budget at 2/8/14/20 and `stale.yml` runs at 01:00. - **What it reads.** `node scripts/pm/check-governed-merges.mjs --since 7d --repos objectstack --repo-root objectstack=$RUNNER_TEMP/audit-main --json`, over a fresh `--shallow-since` clone (10 days) of `main`, not the job's own checkout: a `pull_request` checkout is a merge ref, and the sweep refuses a window its history does not cover. The script itself runs from the job's checkout, so a PR runs the version it carries. `--repos objectstack` because the runner holds no sibling checkout (an absent checkout reads UNAUDITED by design). `GITHUB_TOKEN` is the script's env channel; no `pnpm install` (the sweep and the queue-guard readers load on builtins and repo-local modules only). - **One retry, for one refusal.** If `main` moves between the clone and the script's own `ls-remote` probe, the sweep refuses the mirror as stale (exit 1, `[stale-mirror]`, before any API read). The step re-fetches and re-runs, at most twice. Every other refusal stands. - **Verdict.** A github-script step reads the JSON: `breach` (an entry whose `arm.state` is `breach`), `unread` (an UNAUDITED repo, a WINDOW EDGE, an attribution error, an arm `not-measured`, exit 1, no or unparseable JSON, or exit and `complete` disagreeing), `breach-and-unread`, or `clean`. It writes the run summary on every trigger. - **Card.** Only on a non-clean verdict, only on `schedule` / `workflow_dispatch`, only on `refs/heads/main` (the card step's `if:` carries the `pull_request` guard the watchdog pin requires). Identity and de-dup copy the platform-checklist watchdog: identity label `governed-merges-audit`, plain-text marker `os-governed-merges-audit`, stable title `governed-merges audit: a BREACH or an unread week on main`. An open card is refreshed in place (body only, labels untouched); a closed one is not reopened, and a new card names it. Labels on create: `governed-merges-audit`, `pm:awaiting-maintainer`; the body's `Maintainer-action: … — done when …` line is the one that state owes (H55). - **Refresh keeps what is unhandled, and says so.** On refresh, every keyed BREACH row (`PR #N` or `commit SHA12`) already on the open card that this run did not read again is carried into the new body, marked as carried; a row leaves only when the card is closed (deleting a row by hand does not retire it: a row still inside the window is read again and returns, and the body says so). NOT MEASURED rows are one run's reading and are not carried. Each refresh also posts one comment: the run link, the BREACH rows new to the card, the counts read again, carried and already ruled, the NOT MEASURED count, and how many lines under the BREACH heading carry no row key (a hand-edited row the carry-forward cannot see). A section is read from its heading to the next heading or the footer's first line, blank lines included, so a row set apart by a blank line is still carried; blank and footer lines are never counted. `issues.createComment` sits in the same guarded step. - **A ruled row is not announced again.** Closing the card is the maintainer's word that every row on it is ruled, so the keys on the newest closed card (closed within `AUDIT_HISTORY_DAYS`, 10, and not as a duplicate; both its BREACH and its already-ruled sections) are read as ruled. The day bound means an old ruling can never hide a reused key. A later run that reads one again inside the 7-day window (a dispatch with `patrol=all`, or the scheduled run's skew overlap) lists it under "Already ruled on card #N", not as a new BREACH; a run whose every BREACH row is ruled and that reads nothing unread files nothing. - **What closes the card.** The `Maintainer-action:` line: rule on each BREACH row (kept, or rolled back) and record the ruling as a comment on the card; re-run the job by hand for any NOT MEASURED row; done when every BREACH row has the ruling recorded on the card and a manual run reads no NOT MEASURED row, then close the card. A BREACH never reads clean on a re-run (the arm reads only evidence that existed before the landing, so the entry reads breach until it leaves the 7-day window), so a clean re-run is asked only of NOT MEASURED rows. - **Colour.** The job goes red when the sweep exit is not 0 (the week was not read in full), after the card is filed. A BREACH files the card and stays green. The sweep step has its own 12-minute timeout (the 7-day sweep measured 222 s), under the job's 20: a timed-out sweep records no exit code and leaves no complete JSON, so it reads NOT MEASURED, files or refreshes the card on `main`, and the run goes red. - **Artifact.** The sweep's JSON and stderr are uploaded as `governed-merges-audit` (30 days), so the card's run link carries the whole reading. - **`pull_request` run.** `AUDIT_SINCE` is `24h` on a pull request: it proves the clone, the token's reads, the JSON contract and the rendering at a few dozen API reads, and writes nothing. ## Why Ruling-ref: Leehom, option 0 「每周定时工作流」 on objectstack-ai#33717 (record comment 6891841310), consequence line 「objectstack-ai#33711 合并后加一个每周任务,只在发现违规或读不到时开一张卡给你。工作流 PR 是 Tier H,由你合并。」. PR objectstack-ai#33711 (card objectstack-ai#33603) gave the sweep its low-risk arm leg (`pass` / `breach` / `cleared` / `tier-h` / `not-measured`); this job is its standing caller. ## Acceptance notes - **Routing of the card (a choice inside the ruling, named for the maintainer).** The ruling says "a card for you". The board's two maintainer-facing states were read: `needs-user-decision` owes a four-facet analysis on the card face (`check-half-states` H62), which a machine cannot write, and its inbox counts rulings owed; `pm:awaiting-maintainer` is "decided, one act of the maintainer's remains" and owes a `Maintainer-action:` line (H55), which this card carries. AGENTS.md Prime Directive 14 already decides a seat landing without its record ("a seat violation, filed and rolled back. No seat judges this"), so the act is the maintainer's. Without `pm:queue` the card is outside H74's population. If the maintainer prefers another route, it is one env value (`ANCHOR_STATE_LABEL`). - **`pull_request` paths filter not widened.** The job names no path beyond this workflow file, the same posture as the watchdog: `check-governed-merges.mjs` and the queue-guard readers change several times a week, `check:pm-governed-merges` already runs their self-test per PR, and a live sweep on each would spend the shared token budget. Widening it would also be an edit to the frozen `PR_TRIGGER_ALLOWED_PATHS` pin, outside this card's surface. Because a `pull_request` run exercises every job, a PR that matches a sibling patrol's path (`scripts/pm/check-half-states.mjs` among them) also runs this job's 24h sweep, writing nothing; the paths comment says so. Consequence: a PR that changes the sweep's `--json` shape does not run this job; the verdict step reads a shape it does not recognise as NOT MEASURED (a card and a red run), never as clean. - **Known gap, stated in the job header.** `--since 7d` on a weekly clock overlaps consecutive runs by the script's 1 h skew budget; a run that does not fire leaves its week unread and nothing here sees it (the Actions run list does). A missed week is re-read by hand with a wider `--since`. - **Token budget, not measured on a runner.** A 7-day sweep measured from a cloud container on 2026-11-15 (base bd96ec9): 1044 mainline commits, 191 governed entries, 71 read on the low-risk arm (16 pass, 28 cleared, 27 tier-h, 0 breach, 0 not-measured), complete, exit 0, 222 s. That is roughly 400 to 550 API reads against `GITHUB_TOKEN`'s per-repository hourly budget. Whether a repository-wide budget leaves room at 23:31 UTC on a Sunday is read by the first full run, and a shortfall surfaces as attribution errors, i.e. NOT MEASURED, never as clean. - **Out of scope, noted.** The sweep judges BREACH only on the low-risk skills arm; the other Tier S legs (`.claude/**`, the workflows split) are listed as governed merges without a record verdict. This job reports what the script reads and does not change it. ## Verification Head `0f23dcd2` (review fixes `a41dcd29`, `86d72352` and `0f23dcd2` on top of `fdffef2a`), base bd96ec9. <details><summary>Live sweep, same flags the job runs (container, 2026-11-15)</summary> - `--since 7d --repos objectstack --json` on a 10-day shallow checkout: exit 0, `complete: true`, 191 entries, arm states `{none: 120, pass: 16, tier-h: 27, cleared: 28}`, 222 s. - `--since 24h --repos objectstack --repo-root objectstack=PATH --json` on a fresh `git clone --no-checkout --single-branch --shallow-since=DATE` (DATE nine days back) of main (187 MB, 31 s): exit 0, complete, 43 entries, horizon "shallow, oldest visible 2026-11-06 (predates the window)". - The sweep and `check-governed-queue-guard.mjs` (with `loadRecordRecognisers`) load from a tree with no `node_modules`. </details> <details><summary>The two github-script bodies, run offline against fixtures</summary> A harness (scratch, not committed) parsed this workflow, ran the verdict step and the card step with stub `core` / `context` / `github`: - the real 7-day JSON: verdict `clean`, no write; - the same JSON with one entry set to `breach` (subject carrying a less-than fragment and an at-sign) and one `not-measured`, exit 2: verdict `breach-and-unread`, one `create` with labels `governed-merges-audit,pm:awaiting-maintainer`, the subject's angle brackets replaced and the at-sign defused, `Maintainer-action:` line present, next deadline computed weekly; - exit 1 with stderr and an open card: `unread`, one `update` of that card, stderr fenced in the body; - unparseable JSON and a closed prior card: `unread`, one `create` naming the prior card; - a four-week chain on one open card (round 1 fixes): week 1 files the card with a BREACH row; week 2 reads only a NOT MEASURED row, and the refresh carries the week-1 row (marked carried) and comments "new to this card: none … carried from earlier runs: 1"; week 3 reads a new BREACH on a body with CRLF line ends, and the body lists the new row plus the carried row with the carried mark exactly once, drops week 2's NOT MEASURED rows, and the comment names the new row; week 4 re-reads the week-1 row, which is listed once and counted as read again, not carried. Every body carries a `Maintainer-action:` line with `done when` and no HTML comment; - ruled rows (round 2 fix): with the week-4 card closed, a run re-reading its row plus a NOT MEASURED row files a card that lists the row only under "Already ruled on card objectstack-ai#41" and keeps the NOT MEASURED section; a run reading only that ruled row files nothing; a row named only in a closed card's already-ruled section still counts as ruled; a card closed as a duplicate is not a ruling (the row files as BREACH); with an open card and a closed one, a row ruled on the closed card is listed as already ruled, not new, and the refresh comment counts one hand-edited line under the BREACH heading. - round 3 fix: two BREACH rows separated by a blank line on an open card are both carried, and the comment counts 0 unkeyed lines (blank and footer lines never count); a card closed 30 days ago, or with no `closed_at`, is not a ruling, so the row files as BREACH. All 27 assertions pass. </details> <details><summary>Governed verdict and tier</summary> - `node scripts/pm/check-governed-merges.mjs --branch HEAD`: exit 3, GOVERNED, landing tier H at `0f23dcd2` (`.github/workflows/**` split by content: a `permissions:` block added, a `secrets.*` reference at `job:governed-merges-audit/step:sweep`, an added `set +e` and `|| true`). The maintainer merges. - `node scripts/pm/dispatch-gates.mjs --tier`: no path-derived model mandate; 578 changed lines (+560 / -18), under the 3000 human-merge line. </details> <details><summary>Derived gates: 42 derived, 42 run, all exit 0</summary> Head `0f23dcd2` (re-run after the review round 3 fix; the derived list is unchanged from `fdffef2a`): `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 42 commands; all 42 ran, all exit 0. `--ran`: "42 derived famil(ies) accounted for — 42 run, 0 NOT-MEASURED". No package is touched, so no build closure is owed and no package test runs (`skip-changeset`: a workflow file publishes nothing). ``` node scripts/check-closing-keyword-parity.mjs :: exit 0 node scripts/check-closing-keyword-parity.mjs --self-test :: exit 0 node scripts/check-comment-mask-corpus.mjs :: exit 0 node scripts/check-platform-checklist-watchdog.mjs :: exit 0 node scripts/check-platform-checklist-watchdog.mjs --self-test :: exit 0 node scripts/check-release-section-coverage.mjs :: exit 0 node scripts/check-release-section-coverage.mjs --strict :: exit 0 node scripts/check-self-test-wired.mjs :: exit 0 node scripts/check-self-test-wired.mjs --self-test :: exit 0 node scripts/check-self-test-workflow-commands.mjs :: exit 0 node scripts/check-self-test-workflow-commands.mjs --self-test :: exit 0 node scripts/check-step-collectors.mjs :: exit 0 node scripts/check-step-collectors.mjs --self-test :: exit 0 node scripts/check-whole-set-label-write.mjs :: exit 0 node scripts/check-whole-set-label-write.mjs --self-test :: exit 0 node scripts/docs-audit/check-drift-comment.mjs :: exit 0 node scripts/pm/board-snapshot.mjs --self-test :: exit 0 node scripts/render-release-coverage-anchor.mjs --self-test :: exit 0 pnpm check:agent-test-spelling :: exit 0 pnpm check:aggregator-roster :: exit 0 pnpm check:cross-package-test-inputs :: exit 0 pnpm check:declared-population-live :: exit 0 pnpm check:driver-memory-census :: exit 0 pnpm check:gitlink-declared :: exit 0 pnpm check:node-version :: exit 0 pnpm check:nul-bytes :: exit 0 pnpm check:platform-checklist :: exit 0 pnpm check:pm-dispatch-gates :: exit 0 pnpm check:pm-expected-skips :: exit 0 pnpm check:pm-governed-merges :: exit 0 pnpm check:pm-post-stamped :: exit 0 pnpm check:pm-record-recognisers :: exit 0 pnpm check:pnpm-acquisition :: exit 0 pnpm check:pnpm-filter-targets :: exit 0 pnpm check:refd-timer-probe :: exit 0 pnpm check:required-contexts :: exit 0 pnpm check:shard-attestation :: exit 0 pnpm check:stall-guard-budget :: exit 0 pnpm check:stall-guard-headroom :: exit 0 pnpm check:watch-hint-literal :: exit 0 pnpm check:workflow-status-functions :: exit 0 pnpm check:workflow-step-name-quoting :: exit 0 ``` </details> - Every family CI runs beyond the derived list: read off this PR's check-runs. --- _Generated by [Claude Code](https://claude.ai/code/session_01FEkQ5mSZZN2eYXjy9RHmAu)_ <!-- signed: domain:skills#1 · os-project-manager · session_01FEkQ5mSZZN2eYXjy9RHmAu --> --------- Co-authored-by: Claude <noreply@anthropic.com>
Requested by Leehom · project thread
Fixes #33603
Clause-②: no
Metadata-protocol: none
domain:skills#1 · os-project-manager · session_01FEkQ5kXwEA8abP4hMhtodW
维护者速读
check-governed-merges.mjs现在对每个 skills 合并,用队列守卫自己的 arm 读法和记录读法再读一遍落地提交。按守卫自己的顺序判:合并前有授权批准或授权入队的,算维护者的合并,留在维护者清单并写明谁放行;其余 arm 判为 Tier S 的合并单独列出,每条再查同 head、达档、PASS、出自守卫信任的作者、合并前已存在且未再编辑的复核记录,且该 PR 确实以这个提交落地(merge_commit_sha),缺了就标 ⛔ BREACH。另外修了 feat(pm): a record naming CONTRACT_REVIEW_TIER is written only on a transcript served at the tier #33616 评审留下的三处:校验器比对advisorModel、拒收把复核交给子代理的转录,post-stamped 对校验器自测的 spawn 加超时并转出子进程的失败行。scripts/pm/工具文件,审计仍是只报告;读不到时记 NOT MEASURED、整轮 INCOMPLETE(退出 2),不会把未读的合并报成干净。校验器更严:复核会话里调用过 Agent / Task / Workflow / SendMessage 的转录现在被拒,要传子代理自己的输出。回滚即还原本 PR。scripts/pm/check-governed-merges.mjs的readArmLanding(新,读法全部来自队列守卫)和renderReport的分列;scripts/pm/verify-review-tier.mjs的SUB_AGENT_TOOLS判断。node scripts/pm/check-governed-merges.mjs --since-ref objectstack=b937b75f --repos objectstack,预期 docs(skills): a clashing flow function name leaves the later package's functions and hooks unbound, not refused at install #33668、docs(skills): an owner, assignee or 负责人 in a request is the injected owner_id #33555、docs(skills): four automation, query and ui evals spell their own must_contain literals #33632 三条 skills 合并都留在维护者清单,各带一行「cleared by an authorized enqueue (os-zhuang)」;没有 BREACH。What changes
Part 1, the audit (
scripts/pm/check-governed-merges.mjs).readArmLandingreads every skills landing in the sweep again with the queue guard's own readers on the landed commit (the commit the merge group judged):decomposeGovernedWork,readLowRiskTier(the register'slowRiskArmVerdict),landsOnLowRiskArm, thenrecordAuthorTrusted,recordVerdictandlowRiskRecordVerdict. One reader: no predicate is restated here; the guard is imported lazily (loadArmReaders,ARM_READER_EXPORTS), and a missing export or failed load is NOT MEASURED.pass: the arm reads Tier S and a same-head record that stands at the tier and reads PASS exists.breach: the arm reads Tier S and no such record exists.cleared: the arm reads Tier S, and an authorized approval or enqueue cleared it first.tier-h: the arm reads H (its reasons are printed under the row), or the landing crosses the 3,000-line human-merge line.not-measured: the pull, the timeline or a comment thread could not be read.entrySatisfied): an authorized approval (authorizedApprovalVerdictonmakeReviewReader), then an authorized enqueue (enqueuerFromTimeline,authorizedEnqueueVerdicton the timeline already fetched), then the record. A landing cleared by either of the first two iscleared: the maintainer's merge, kept on the maintainer's list with who cleared it, never a BREACH.merged_at: on a queue merge theremoved_from_merge_queueevent shares the merge's instant (measured on docs(skills): an owner, assignee or 负责人 in a request is the injected owner_id #33555, docs(skills): four automation, query and ui evals spell their own must_contain literals #33632 and feat(pm): a record naming CONTRACT_REVIEW_TIER is written only on a transcript served at the tier #33616), so the post-merge timeline would always read the enqueuer as undetermined. Comments count only from an author the guard trusts (recordAuthorTrustedonrecognisers.trustedAuthors, the pm: the queue guard's Tier S record leg reads the verdict and the record's author #33687 binding: the relay's identity andGOVERNED_APPROVERS), and only when created and last edited (updated_at) at or before the landing. So a record any commenter posted cannot excuse a landing, an untrusted row cannot shadow a trusted one, and a record written or edited after the landing cannot excuse it; a BREACH whose only record was edited after the landing names that comment.merge_commit_sha, and a pull GitHub says is not merged (nomerged_at) or merged as another commit is a BREACH with that reason, neverpass. A failed attribution read is NOT MEASURED. Reads ride the channel that attributed the row (makePullReader,makeTimelineReader,makeCommentReader), and each one counts in the API lookup total.passandbreach) apart, after the maintainer's list, under their own contract lines; the head counts them and their breaches.cleared,tier-handnot-measuredrows stay on the maintainer's list with an arm cell. Anot-measuredrow makes the sweep INCOMPLETE (exit 2) and the banner names it.--jsoncarries the reading asentries[].arm.main().then,selfTest().then): the guard imports this file at module scope, so an awaiting dispatch deadlocks the lazy import (exit 13). The two comments that said the lazy door is shut here were corrected.governedReviewPlan(scripts/pm/fleet-write/execute.mjs) reads the arm with its readers. pm(fleet-write): the relay reads the low-risk skills arm before it summons approvers #33686 has since merged, so the line holds on main.Part 2, the owner. Proposed below; no workflow and no rule line in this PR.
Part 3, the verifier residuals (PR #33616's records 6888257144 N5 and 6888534276 N7 and N10).
advisorModelnot comparedverify-review-tier.mjs, 2 pin rows[1m]recordsmessage.model,requestedModel,advisorModeland the identity attachment without the suffix (129 turns). Accepting a suffix would widen the accept set on an unseen shape. The header says so.Agent,Task,WorkfloworSendMessage(SUB_AGENT_TOOLS) refuses, naming the tool and asking for the transcript of the agent that ran the review, one that called no other agent (a seat that reviewed in-seat beside unrelated agents passes the review's own sub-agent file). Following would need the child's file, which the transcript does not name.verify-review-tier.mjs, 3 pin rowsstop_reason, which this session cannot measure for a sub-agent output; a wrong guess would refuse every at-tier record. Named in the header's boundary.timeout: 120000, andchildRunDetailputs the timeout or signal, the exit and the child's own failing case lines into the case's detail.post-stamped.mjs, 1 pin rowcomment/comment_editop is not judged for tierscripts/pm/fleet-write/(the relay's door), outside this card's file surface and on the same files as #33540. Belongs on its own card.Owner of the weekly audit
Proposed owner: a scheduled workflow, filed by the seat for the maintainer (this PR adds none). Reasons:
--repos objectstack, a topological--since-reffrom the last run's printed tip (or--since 8dfor overlap), and a read token. A ⛔ BREACH ornot-measuredrow can be surfaced in the job summary; making the job red onentries[].arm.state === 'breach'would be a reader of--json, not a change here.The interim, until the workflow lands: the skills seat's patrol runs
node scripts/pm/check-governed-merges.mjs --since 8d --repos objectstackweekly and posts the arm section to the seat post. That line does not fit.claude/skills/pm-dispatch/references/lanes/skills.md: 35 lines against a ceiling of 35, headroom 0 (check-skill-line-ratchet), so it is reported here and not added.Tests
node scripts/pm/check-governed-merges.mjs --self-test: 728 assertions. New battery⚖️ #33603: ...(38 cases, floor 38; roster floor 37 to 38). It loads the REAL guard throughloadArmReadersand drivesreadArmLandingwith fake fetchers and a fake git: pass on the PR thread and on the card; breach for no record, a FAIL record, a record on another head, a record below the tier, an unsigned record, a record from an untrusted author, a record posted after the landing, a record edited after it (the reason names the edited comment), a pull merged as another commit and a pull closed unmerged; an untrusted FAIL after a trusted PASS does not shadow it (and a trusted one does); cleared for an authorized approval and an authorized enqueue on the measured queue-merge timeline, with controls that a seat-account enqueue, a post-landing approval and an unauthorized approval clear nothing; tier-h for asecuritylabel,Clause-②: yes, a path outside the allowlist in the same commit and an oversized landing; not-measured for an unread pull, review list, timeline, comment thread or merge, and for readers that did not load; null without a catalog row or a PR number; the report's head count, its apart section and a cleared row staying on the maintainer's list; the INCOMPLETE banner; and a structural pin that neither dispatch awaits at module scope.node scripts/pm/verify-review-tier.mjs --self-test: 27 cases across 6 batteries (new battery: advisor, sub-agent spawn, and the refusal's advice naming the reviewing agent).node scripts/pm/post-stamped.mjs --self-test: 787 cases across 29 batteries (record-tier battery floor 15 to 16).b937b75f: 8 governed merges. The three skills landings, docs(skills): a clashing flow function name leaves the later package's functions and hooks unbound, not refused at install #33668, docs(skills): an owner, assignee or 负责人 in a request is the injected owner_id #33555 and docs(skills): four automation, query and ui evals spell their own must_contain literals #33632, read Tier S on the arm and were each enqueued byos-zhuangbefore the merge, so each isclearedand stays on the maintainer's list; nothing is listed apart and nothing is a BREACH; exit 0. (Before the review fix, docs(skills): an owner, assignee or 负责人 in a request is the injected owner_id #33555 and docs(skills): four automation, query and ui evals spell their own must_contain literals #33632 were listed apart as PASS.)Ablations, each restored and `git diff` checked empty: the first five on the first commit, the next six on the first review-fix commit, the last two on the second
Acceptance notes
securitylabel is still caught by the timeline.contract-review.md's rule line on session evidence (「卡线程或席内复核」) does not yet say that a session which spawned or messaged a sub-agent is refused; the refusal text says what to pass. Carrier: the skills seat (the file is at its 63-line ceiling).comment/comment_editops not judged for tier: carrier, the skills seat, as its own card (relay files).Verification
Gate list
dispatch-gates --commandson this diff: 35 families, all run locally; results below.dispatch-gates --tier: no path-derived mandate (floor sonnet, default opus, ceiling fable); 449 changed lines, under 3,000.check-governed-merges --branch claude/project-thread-sgww6y: NOT governed (0 of 3 paths on the register).On head c48e9f1 (rebased on main
48e69596, which carries #33686 and #33687), every derived family ran and exited 0:dispatch-gates --ranreconciles 35 derived, 35 run, 0 NOT-MEASURED. One gate went red on the first pass of the first round and was fixed in its own commit:check:pm-dispatch-gatesrefused a helper named like a compound self-test (childSelfTestDetail, not inCOMPOUND_ANCHOR_LEDGER); it is nowchildRunDetail.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01FEkQ5kXwEA8abP4hMhtodW