Repository navigation
pm: the governed-merges audit reads unread arm inputs as NOT MEASURED and a dismissed approval as it stood, and the verifier refuses skill and connector hand-offs - #33762
Conversation
…, a dismissed approval as it stood at the landing, and the verifier refuses skills and connector hand-offs The post-merge audit's low-risk arm leg (review follow-ups of the audit PR): - a git read the arm needed that threw, or a fork predicate not measured, is NOT MEASURED instead of Tier H; a changeset the commit deleted stays a measured Tier H (ls-tree proves the deletion); - the Tier H cell says how many reasons it did not print; - an authorized approval dismissed after the landing is read in the state the timeline's review_dismissed event names; - the edited-after clause rides every BREACH reason and names only the row the record leg would have read; - a recogniser set with no trusted-author list is NOT MEASURED, and comments the author binding dropped are counted in the guard's own words. verify-review-tier refuses Skill and connector tools that message or start another thread, session or trigger. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FEkQ5nqeu4RWPfV6S5jfCq
|
domain:skills#1 · os-project-manager · session_01FEkQ5pjSPT7ui2EUcunaVb Contract reviewServed-tier:
Check-runs on the head when this was written: 15 success, 0 failed, 8 still in progress ( ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentItem by item, against the words of the record that raised it and the code at this head. No must-fix, no should-fix.
Nits, none affecting a verdict:
Implemented-by: VERDICT: PASS Adopted by the seat 2026-11-15T09:42Z · 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
|
…, names an edited carry hop, and the verifier refuses hand-offs in any spelling (objectstack-ai#33951) <!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9AD2VXSxnSHsMRpLTGUwyMF)_ Fixes objectstack-ai#33765 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:受管合并审计的低风险臂读数在“有读不到的输入、但已读到的输入本身就足以判 Tier H”时,改记 Tier H(并点名没读到什么),不再整条记为 NOT MEASURED;标签列表没读到也算“没读到”;被改过的 `Regen-provenance:` 承接行会在 BREACH 原因里点名;审稿档位校验器能识别驼峰、连字符写法和其他动词下的转交工具。 - 为什么改:objectstack-ai#33762 评审留下的七条小尾巴(N-a…N-g),都朝“更保守/更说清楚”的方向收口,不改变今天任何一条判定的严格度。 - 风险与回滚:只动 `scripts/pm/` 下两个审计/校验脚本,不发布任何包;回滚即 revert 本 PR。 - 先看:`scripts/pm/check-governed-merges.mjs` 的 `armSettledWithoutUnread` 与 `readArmLanding` 的 N-e 段;`scripts/pm/verify-review-tier.mjs` 的 `connectorHandsOff`。 - 两分钟验证:`node scripts/pm/check-governed-merges.mjs --self-test && node scripts/pm/verify-review-tier.mjs --self-test`,预期分别 756 条断言通过、33 个用例通过。 - 需要你做的:无,席位落地。 ## What changes Every hunk, by file and line range on the head (no hunk near the register/arm regions objectstack-ai#33539 holds, L519 and L1339): `scripts/pm/check-governed-merges.mjs` - L4466-4467 — `readArmLanding` jsdoc: one sentence naming the objectstack-ai#33765 items. - L4509-4517 — **N-a, N-b**: when the arm reads H and some input was unread, `armSettledWithoutUnread` decides whether the measured inputs alone settle it. If they do, the entry is `tier-h` with those reasons and an `unread` list; otherwise it stays `not-measured` with the old words. - L4545-4547 — **N-c**: the N11 no-trusted-author-list branch's comment says it is defensive only (`loadRecordRecognisers` answers `available: false` instead, and a list it builds always holds the relay's login). No code change; `record-recognisers.mjs` untouched. - L4592-4602 — **N-e**: when the unedited threads would have reached the record through a carry, each other edited row is left out of the unedited threads once; if that changes what the record leg would have read, the row is named on the BREACH reason as a `Regen-provenance:` hop. - L4616-4618 — **N-g**: `reviewsAsLanded` jsdoc says a same-second dismissal is read as after the landing (pinned as is). - L4641-4724 — **N-a, N-b, N-f** helpers: `armReadsNotMeasured` keeps its export and words (new optional `labels` argument), built on `armUnreadInputs`. `ARM_CHANGESET_SHOW` is the one spelling of the guard's `show SHA:PATH` read, used by the deletion exception and by `favourableArmGitRead`. `armSettledWithoutUnread` re-runs the guard's own `decomposeGovernedWork` → `readLowRiskTier` → `landsOnLowRiskArm`, answering each unread input the way that gives the arm no reason: a clean changeset, every path a modified regular file, no fork, no labels. - L4736-4737 — `armCell`: a settled Tier H row also names what it was settled without. - L9278-9323 — self-test: 11 new pins in the objectstack-ai#33603 battery. `scripts/pm/verify-review-tier.mjs` - L99-127 — **N-d**: `connectorToolWords` / `connectorHandsOff`. A connector tool's name is split into words (`_`, `-`, camelCase). It refuses when the first word is a hand-off verb (`send`, `message`, `start`, `fire`, `spawn`, `dispatch`, `delegate`, `interrupt`), or when it names a hand-off target (`session`, `agent`, `subagent`, `copilot`, `thread`, `trigger`, `worker`) under any first word except a read verb. - L130 — `handsWorkToAnotherAgent` ORs the new check onto the exact names and the existing regexes. Nothing that refused before now passes. - L299-307 — self-test: 3 new cases. **Direction held.** No current Tier H verdict moves to S, and no not-measured verdict moves to measured S. N-a can only turn not-measured into `tier-h`, and only when the arm still reads H with every unread input answered its way. The arm's verdict is a conjunction of conditions, so the reasons that remain come from measured inputs. A read with no favourable answer (anything other than the guard's `show` or `diff-tree`), or a read that fails again, stays NOT MEASURED. N-b only moves `tier-h` to `not-measured`, or to `tier-h` when N-a settles it. N-d only adds refusals. N-e changes a BREACH reason's words, not its state. N-c and N-g are comments plus a pin. **N-g: harmless, pinned as is.** GitHub times are whole seconds, so the order of a same-second dismissal and the landing cannot be known. The approval it restores is an authorized one, so the entry reads `cleared` (the maintainer's merge), never `pass`. Flipping it would turn a cleared row into a BREACH on a guess, so the behaviour is pinned instead. ## Tests - `node scripts/pm/check-governed-merges.mjs --self-test`: 745 → **756** assertions, exit 0 (head `7c84b661`). - `node scripts/pm/verify-review-tier.mjs --self-test`: 30 → **33** cases across 6 batteries, exit 0. - `ui/scripts/__tests__/check-governed-queue-guard.test.ts` (the one test file that spawns `check-governed-merges.mjs`), under the lock: Test Files 1/1, Tests 10/10, VERDICT command-exit 0. - No forced test edits: every existing pin passes unchanged. <details><summary>Ablations: 6 legs, each reds its pins and restores to the HEAD blob</summary> Run through `scripts/ablation-replace.mjs` on 7c84b66. In every leg the anchor hit 1 → 0, and afterwards `git diff HEAD` was 0 bytes. | Leg | Mutation | Self-test | Pins that went red | |:---|:---|:---|:---| | N-a | `if (settled)` → `if (settled && false)` | exit 1, 3 failures | N-a measured-H (diff-tree + security label), N-a changeset/fork pair, N-b labels + Clause-② Tier H | | N-b | delete the `its labels` unread push | exit 1, 1 failure | N-b unread labels alone is NOT MEASURED | | N-e | `if (would?.carriedFrom)` → `… && false` | exit 1, 2 failures | N-e edited hop named, N-e edited claim beside a carry | | N-f | `ARM_CHANGESET_SHOW` → `^refs/…` | exit 1, 4 failures | N-f spelling pin, objectstack-ai#33729 N5 deleted-changeset control, N-a changeset pin, N-a no-favourable-answer pin | | N-g | `at < landed` → `at <= landed` | exit 1, 1 failure | N-g same-second dismissal pinned as is | | N-d | drop `\|\| connectorHandsOff(name)` | exit 1, 2 failures | N-d camelCase/hyphen verbs, N-d hand-off under other verbs | N-c is a comment only, so it has no ablation. </details> ## Acceptance notes - `SELF_TEST_BATTERIES` floors are not raised. The new pins join existing batteries, and raising a floor would be a hunk outside this card's regions. The seat can raise them when it lands. - Same class as N-b, not changed here: a timeline answer that is not an array would still read inside `tier-h` through the guard's "its timeline was not read" reason. `fetchTimeline` throws instead (that path is already NOT MEASURED), so nothing reaches it today. - N-d fails closed, as the existing shapes do. A target word under a non-read first word refuses even when the tool only reads (for example `archive_session`). The remedy is the same one the file already gives: review in an agent that calls none of these. ## Verification Local subset on head `7c84b661` (origin/main `895783a1` unmoved; nothing to merge), after the last commit: - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived **33** families; all 33 were run, plus both scripts' own self-tests. - `dispatch-gates --ran`: `33 derived famil(ies) accounted for — 33 run, 0 NOT-MEASURED (a DERIVED zero — all 33 recorded an exit code and none of them is 3)`. - CI runs every other family on this PR; its check-runs are the record. <details><summary>Each command and its exit code (35)</summary> - `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 - `node scripts/pm/check-governed-merges.mjs --self-test` → exit 0 - `node scripts/pm/verify-review-tier.mjs --self-test` → exit 0 </details> --- _Generated by [Claude Code](https://claude.ai/code/session_01ADHkmRnBQzshoJUDvT6keE)_ Co-authored-by: Claude <noreply@anthropic.com>
Requested by Leehom · project thread
Fixes #33729
Clause-②: no
Metadata-protocol: none
domain:skills#1 · os-project-manager · session_01FEkQ5nqeu4RWPfV6S5jfCq
维护者速读
check-governed-merges.mjs的 skills arm 一腿收紧 PR pm: the governed-merges sweep lists low-risk arm landings apart and judges each on a same-head at-tier PASS record #33711 评审留下的六处 nit:arm 需要的 git 读取失败或 fork 判定没测到时记 NOT MEASURED(不再折成 Tier H);合并后才被撤销的授权批准按合并时的状态读;"合并后被编辑"一句挂在每种 BREACH 理由上,且只点名本该被读成记录的那条;没有受信作者名单记 NOT MEASURED,被作者绑定丢掉的评论按守卫原话计数。校验器verify-review-tier.mjs另拒Skill和向别的线程、会话、触发器发消息或启动它们的连接器工具。N6 以理由关闭,不改代码。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 #33729's checklist, item by item. Every reading still goes through the queue guard's exports (
ARM_READER_EXPORTS, now withignoredAuthorLines); no second parser.SUB_AGENT_TOOLSis an exact-name listhandsWorkToAnotherAgentaddsSUB_AGENT_TOOL_SHAPES:Skill(a skill can fork into a sub-agent and reads the same in the file either way), and a connector toolmcp__SERVER__TOOLwhose tool name starts withsend,message,start,fire,spawn,dispatchordelegate, or names a trigger. Themcp__SERVER__TOOLspelling 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 rowstier-hreadArmLandinghands 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 isnot-measuredwith the failed read and the arm's reasons (armReadsNotMeasured). One exception, read rather than assumed:git show SHA:PATHthrows for a changeset the commit deleted, and the arm reads that H by itself; an emptygit ls-treeof 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 rowsbaseRefis the first parent, not the merge group's basebaseRefis read only by the carry test (regenCarryinrecord-recognisers.mjs), throughgit 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 waygit merge-baseof the two bases with a queued head names the same commit, and the carry reads the same. The reasoning is inreadArmLanding's jsdoc.reviewsAsLandedputs a review that now reads DISMISSED back in the state the timeline'sreview_dismissedevent names (dismissed_review.state, matched bydismissed_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 rowsabsentabsent,below-tier,unsigned,not-pass).guard.recordVerdictonunedited), 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.trustedAuthors; an untrusted PASS reads like no recordnot-measuredbefore 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 onpassandbreachrows in the guard's own words (ignoredAuthorLines).Direction check against the order ("nothing here may make the audit read
passwhere it reads BREACH or NOT MEASURED today unless the item says so"): no state moves topass. N5 and N11 movetier-handbreachtonot-measured. N8 moves abreachtoclearedonly for an authorized approval dismissed after the landing, which is what N8 asks.Tests
Self-tests on head 9177c4e
node scripts/pm/check-governed-merges.mjs --self-test: exit 0,✓ check-governed-merges --self-test: 741 assertions. The⚖️ #33603battery 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).Ablations (each through scripts/ablation-replace.mjs, anchor hit once, restored to the HEAD blob with an empty git diff HEAD)
if (false && unread.length > 0)(N5)if (listed === '') continue;(N5 deletion probe)restored.setremoved (N8)Skillshape (N3)Acceptance notes
Skillnow refuses; the remedy is the existing one (review in an agent that calls no other).contract-review.mdsession evidence pm-dispatch: contract-review.md and the record templates trail the verifier's session-evidence limit and the new SQL push-down ③ check #33716, weekly audit owner pm: give the post-merge governed audit an owner — a weekly scheduled workflow (maintainer) #33717.Verification
Derived gates on head 9177c4e: 33 of 33 exit 0 (dispatch-gates --ran: 33 derived, 33 run, 0 NOT MEASURED)
Also run: both scripts' own
--self-test(exit 0, outside the derivation), andui/scripts/__tests__/check-governed-queue-guard.test.ts, the one test file namingcheck-governed-merges.mjs(VERDICT command-exit 0, 10/10).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: twoscripts/pm/**tools, nothing published.Generated by Claude Code