Skip to content

fix(pm): check-governed-merges hands the guard's readers a git that carries stdin - #37071

Merged
os-zhuang merged 3 commits into
mainfrom
claude/project-thread-wn0hqz
Nov 25, 2026
Merged

os-zhuang merged 3 commits into
mainfrom
claude/project-thread-wn0hqz

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Requested by Irene · project thread

Fixes #37038

Clause-②: no
Metadata-protocol: none

维护者速读

  • 用户能看到什么变化:用户无感;车队席位落地前的预读和合并后的受管审计,现在能正确指出"重生成链里夹带的手改文件",之前一律读成"已解释"。
  • 为什么做:修车队受管合并审计工具里一个读数错误(席位预读与事后审计会漏报夹带手改的重生成 PR)。
  • 出错会怎样:只影响席位预读和事后审计这两份报告,合并队列自己的守卫不受影响;有问题可直接撤回此 PR。
  • 要你做什么:这是守卫工具本身,属人合档,请你审阅后合并。

What changes

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

  • git(root, args, input): takes an optional input. With one, git gets it on a piped stdin; without one, stdin stays 'ignore' exactly as before, so every existing plain caller (tryGit, the enumeration reads) is unchanged. The options live in gitSpawnOptions(root, input) so the self-test can pin them.
  • checkoutGitReader(root) returns (argv, input) => git(root, argv, input), the queue guard's own runGit shape. Both handoffs now use it:
    • --pr into pullRecordStage: was sameCheckout ? (argv) => git(root, argv) : null.
    • the post-merge sweep into readArmLanding: was (argv) => git(root, argv).
  • readArmLanding's two wrappers around that reader (armGit, and the git wrapper in armSettledWithoutUnread) forward input too. Neither carries a stdin read today, but both are git readers handed to guard.readLowRiskTier, so a later stdin read there would hit the same hole.

Every (argv) => git(root, argv) style handoff in this file, as grep finds it at the base 938a48f1:

Line at base Handed to Reaches a stdin command? Changed
runGit: in --pr pullRecordStage → readLowRiskRecordStage → regenCarry → unexplainedPathsBetween (check-attr --stdin) yes yes
runGit: in the sweep's arm leg readArmLanding → record pair → regenCarry → unexplainedPathsBetween yes yes
armGit / armSettledWithoutUnread git guard.readLowRiskTier (show, ls-tree, diff-tree) no, today forwarded anyway
git: into readWorkflowDiff (--branch and --pr) ls-tree, show no no
run: (tryGit) into deriveBranchPaths, pullWorkflowDiff, pullChangesetReading, pullCatalogReading plain reads no no

The only stdin command across record-recognisers.mjs, check-governed-queue-guard.mjs and this file is unexplainedPathsBetween's check-attr --stdin. The guard and the recognisers are not edited, and no regen-carry logic is restated here.

Why

unexplainedPathsBetween passes the moved paths as runGit's second argument to git check-attr --stdin. The handoffs dropped that argument and git() ignored stdin, so check-attr read nothing and every moved path read as explained. That let regenCarry read a false carry in --pr's pre-landing reading and in the post-merge governed audit. The queue guard passes input itself, so the merge gate was never affected.

Tests

Self-test, final head 4d8079f: 972 assertions, exit 0 (base 938a48f: 963)

bash scripts/pm/os-verify-lock.sh -c 'node scripts/pm/check-governed-merges.mjs --self-test' gives VERDICT command-exit 0, 972 assertions. That is 9 new cases:

  • New battery ⭐ the git reader handed to the guard's readers carries STDIN (check-attr --stdin), floor 6. The roster floor goes from 41 to 42. It runs offline, with real git, on a throwaway repo. The repo has .gitattributes routing gen/out.json to merge=os-regen, and a branch that moves scripts/pm/x.mjs and gen/out.json together, then the generated path alone.
    1. check-attr --stdin through checkoutGitReader answers unspecified for the hand path and os-regen for the generated one.
    2. Through the guard's own unexplainedPathsBetween, the moved non-regen path reads unexplained. This is the card's case that fails today.
    3. Control: a hop that moves only the os-regen path reads explained.
    4. A read with no input still answers (empty) on an ignored stdin.
    5. gitSpawnOptions with no input gives stdio[0] === 'ignore' and no input key.
    6. gitSpawnOptions with input gives a piped stdin carrying it byte for byte.
  • The low-risk arm battery gets one seam pin for --pr. pullRecordStage is handed checkoutGitReader(fixture), and the reader the guard's readLowRiskRecordStage receives reads the moved non-regen path as unexplained.
  • The post-merge arm battery gets two seam pins for readArmLanding. First, every git reader it hands the guard (to readLowRiskTier and the record pair given to recordVerdict) passes stdin through. Second, the sweep's checkout reader reaches real git through the landing's wrapper and reads the moved non-regen path as unexplained.
Red before, green after: three ablations on committed head 4d8079f (blob aced0445)

Each leg goes through node scripts/ablation-replace.mjs: the anchor hits once, the mutation lands with its blob moving, and the restore is verified as blob equal to HEAD with an empty git diff HEAD.

  • A: git() drops input, which is origin/main's spawner. Exit 1 with 5 failures: battery cases 1, 2 and 6, the --pr pin, and the sweep real-git pin. Case 2 reads [] in place of scripts/pm/x.mjs.
  • B: the handoff drops its second argument, which is origin/main's (argv) => git(root, argv). Exit 1 with 4 failures: battery cases 1 and 2, the --pr pin, and the sweep real-git pin.
  • C: armGit drops input. Exit 1 with 2 failures: the forward-through pin ({"state":"pass","arm":2,"pair":1}) and the sweep real-git pin.
  • Restored: exit 0, 972 assertions.
The card's repro on PR #36509's real trees

4342cf009..bf71994326, base e4e3bcfe, fetched into a scratch ref that has since been deleted. Run through unexplainedPathsBetween:

  • before, with origin/main's ignored stdin: 0 unexplained
  • after, with checkoutGitReader: 14 unexplained

The 14 begin with packages/spec/src/ui/component.zod.ts, scripts/sdui-manifest.record.json and sdui.manifest.json. This matches the card's measured 14 and 0.

Acceptance notes

  • The two seam pins drive the reader the handoffs are built from (checkoutGitReader) through the real pullRecordStage and readArmLanding. They do not run --pr or the sweep end to end, because both read GitHub. The two call sites themselves are one token each. Ablation B shows that any reader with the old (argv) => git(root, argv) shape reds the battery.
  • pnpm check:i18n-coverage is derived for this path, but it reads packages/cli/dist and the examples' build closure, which are not built here. It exited 3 (PREREQUISITE NOT MET) locally, so it is NOT MEASURED; CI runs it.

Verification

Read first, by risk:

  1. git() / gitSpawnOptions: the no-input branch must stay 'ignore' for every plain caller.
  2. The two runGit: handoffs (--pr, sweep arm leg), now checkoutGitReader(root).
  3. armGit and the armSettledWithoutUnread wrapper, which only forward input.

Two-minute check: node scripts/pm/check-governed-merges.mjs --self-test should print ✓ … 972 assertions, ending in the stdin clause.

Local gates, head 4d8079f
  • node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack derived 63 families. Run reconciliation (--ran) printed ✓ dispatch-gates --ran: 63 derived famil(ies) accounted for — 62 run, 1 NOT-MEASURED.
  • Every derived family exits 0 except pnpm check:i18n-coverage (exit 3, prerequisite not met, above). That includes pnpm check:pm-governed-merges, pnpm check:pm-record-recognisers, node scripts/pm/check-governed-queue-guard.mjs --self-test, pnpm check:pm-dispatch-gates (fast tier, 2273 cases), pnpm check:commit-card-trailers and pnpm check:nul-bytes.
  • ui/scripts/__tests__/check-governed-queue-guard.test.ts spawns this script and passes 10/10.
  • npx eslint --no-inline-config scripts/pm/check-governed-merges.mjs exits 0. The repo-wide pnpm lint is CI's.
  • node scripts/pm/overlap-check.mjs reports VERDICT clean exit 0.

Human Minimum

  • 1. Schemas start as Zod; packages/spec holds no runtime logic. (not touched)
  • 2. Every name I added uses the casing for its kind.
  • 3. No formatter ran; eslint is clean on the file (repo-wide pnpm lint in CI).
  • 4. One issue, one branch off an up-to-date main, one pull request.
  • 5. Publishes nothing (scripts/pm), so skip-changeset; both declaration lines are above.
  • 6. packages/spec not touched.
  • 7. No hand edits to content/docs/references/, packages/*/CHANGELOG.md or content/docs/releases/.
  • 8. Title, body and comments are in English.
  • The Before Submitting list in CONTRIBUTING.md is done.

🤖 Generated with Claude Code

https://claude.ai/code/session_01J8VVAm5Tp3iBkiJk6nMwa5

…arries stdin

git() spawned with stdin ignored and took no input, and --pr (pullRecordStage)
and the sweep (readArmLanding) handed the guard's readers (argv) => git(root, argv),
dropping the second argument. unexplainedPathsBetween feeds the moved paths to
`git check-attr --stdin`, so it read nothing and every moved path read as a
regeneration: regenCarry could carry a record past a hand edit in both readings.

git() now takes an optional input (stdin piped only when one is given, 'ignore'
otherwise), checkoutGitReader(root) is the (argv, input) reader both handoffs use,
and readArmLanding's two wrappers forward input. Self-test: a new battery on a
throwaway repo with real git, plus a seam pin at each handoff.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J8VVAm5Tp3iBkiJk6nMwa5
@objectstack-fleet objectstack-fleet Bot added the skip-changeset PR has no user-facing published change; bypasses the changeset gate label Nov 24, 2026
@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAm5Tp3iBkiJk6nMwa5

Final green head for L1 and L2: 4d8079f9fbb2d775415e54553e499c6b80c9c34e
Checks at that head: 26 success · 23 expected skip · 0 failed · 0 pending (pr-state.mjs --pr 37071); mergeable_state clean.
Diff: scripts/pm/check-governed-merges.mjs only, +152/−11. Guard instrument ⇒ Tier H: L1-a, then a contract-review-tier L2, then the seat's hand-off to the approver.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf
Contract-review-claim: session_01J8VVAkBhKxchpbbRXtA3Mf · head 4d8079f · 2026-11-25T00:06Z

L1-a runs the isolated CONTRACT_REVIEW_TIER subagent on this head, in parallel with its L1 read.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 4d8079f9fbb2d775415e54553e499c6b80c9c34e
Local-runs: none
Scope: scripts/pm/check-governed-merges.mjs + none
Security-touching: no
Rule-change-verified: none

PR #37071 for card #37038. One file in the diff, and it is the hits file; its self-test hunks sit in the same file and were read with it. Read outside the diff, never reviewed: scripts/pm/record-recognisers.mjs (unexplainedPathsBetween, regenCarry), scripts/pm/check-governed-queue-guard.mjs (its git(), its runGit, readLowRiskTier, readLowRiskRecordStage) and scripts/git-env.mjs. main has not moved any of the three guard files since the merge base 938a48f1.

① Derived judgments

  • git(root, args, input) and gitSpawnOptions: right. With no input the options are the old ones key for key (stdio[0] stays ignore, no input key), so every plain caller is unchanged. I read every caller of git() in the head tree: all pass two arguments, and no call hands git itself as a callback, so no caller gains a stdin by accident. With input, stdin is piped, which is the queue guard's own spawner shape.
  • The two handoffs (--pr into pullRecordStage, the sweep into readArmLanding) now pass checkoutGitReader(root): right. pullRecordStage passes runGit to readLowRiskRecordStage unwrapped, and readArmLanding puts the raw runGit on the record pair, so the second argument unexplainedPathsBetween sends to check-attr --stdin now reaches git on both routes.
  • Accept-set effect: a narrowing of two REPORTS, and right. --pr and the post-merge audit stop reading a Regen-provenance: hop that moved a hand-written path as carried; they now read it refused, as the queue already does. Nothing is widened: no path, tier or record reads more permissive than before. The merge gate is untouched (the guard file is not in the diff).
  • New read on the refusing route: merge-base now runs when a non-regen path moved. If it throws, computeRegenCarry answers unreadable, never clean. Right: fail closed.
  • armGit and the wrapper in armSettledWithoutUnread forward input: right and inert today. The guard's readLowRiskTier sends them show, diff-tree and ls-tree only. The wrapper's answer cache is keyed by argv alone, which is sound because favourableArmGitRead answers show and diff-tree only, never a stdin command.
  • Public surface: two new named exports, gitSpawnOptions and checkoutGitReader, on a scripts/pm module that is not published. Additive. Right.
  • Self-test roster: battery floor 6 matches the six assertions inside the battery, and the roster floor moves 41 to 42 with the one new row. Right.

② Semver level

Nothing is published: the diff is one file under scripts/pm. The PR carries skip-changeset, Check Changeset is success on this head, and no changeset is in the file list. That matches.

Clause-②: no. Declared on the PR body and on the card, and it holds: no published schema, no declared capability and no consumer-facing behaviour moves. What narrows is a fleet report's reading, made to agree with the rule the queue already enforces.

③ Boundary flags

  • Deviation, branch claude/project-thread-wn0hqz in place of claude/issue-37038-*: accepted, the seat ordered it in the claim.
  • Deviation, first commit 74c61666 held a syntax error fixed in 4d8079f9: answered. This record is on 4d8079f9 alone, and Lint · scoped · tooling self-tests, Lint · PM dispatch-gates and Lint · repo & tooling gates are success on it.
  • Deviation, pnpm check:i18n-coverage not measured locally: answered by the head's check-runs. Every lint lane is success and Governed Surface Queue Guard is success.
  • Deviation, model-free commit trailers: no contract effect; PR-body guards is success.
  • open_questions: empty. Nothing to answer.
  • Out-of-scope finding, the git: handoffs into readWorkflowDiff and the tryGit readers still drop a second argument: confirmed harmless today. readWorkflowDiff issues ls-tree and show, tryGit takes no input, and check-attr --stdin in unexplainedPathsBetween is the only stdin read across the three files. No card owed.
  • The report's l2_routing says no contract review is owed. It is: this file is on the rules face, and this record is that review. Tier H at landing stands.
  • SQL push-down: not applicable. The diff holds no data access, no id materialisation and no join.

④ Design judgment

No must-fix, no should-fix.

scripts/pm/check-governed-merges.mjs, against the card and the code it cites:

  • The card's defect is real on main and closed on this head. unexplainedPathsBetween sends the moved paths as the reader's second argument; on main both handoffs took one argument and git() ignored stdin, so the answer split to one empty field, the loop never ran and the function returned empty. On this head both halves are fixed, and either half alone would leave the defect.
  • The jsdoc holds sentence by sentence. gitSpawnOptions: stdin dropped does make every moved path read as a regeneration, and a no-input read does stay on ignore. checkoutGitReader: its shape is the guard's own runGit shape, argument for argument, and it names the two handoffs that use it.
  • The card's Expected is met: the battery's second case drives the real unexplainedPathsBetween through the handed reader on real git and reads the moved non-regen path as unexplained, with a control hop that moves only the merge=os-regen path and reads explained. The first case reads the -z triples at the right offsets.
  • Tried to break it. A null input: piped and empty, the same as the guard. An empty-string input: piped and empty. A reader that passes input through a wrapper: both wrappers forward it. A hop whose trees are absent from the checkout: the name-only diff already threw before this change, so no new failure mode. None broke.

Nits, none with any effect on correctness or the contract:

  • N1 (nit) — the battery READS its throwaway repository through checkoutGitReader, so those git children inherit the ambient environment, while buildStdinAttrFixture builds it with gitFreeEnv(). The letter of GIT_ENV_ISOLATION_RULE covers every git child on a throwaway repository. The reads are diff, check-attr and merge-base, so nothing can be written, and under a hook they would fail loudly on unknown shas. main already does the same at its ADR-leg fixture. Accepted deviation; an environment option on the reader would close it for both.
  • N2 (nit) — the two production call sites are not pinned. The seam pins hand checkoutGitReader to pullRecordStage and readArmLanding themselves, so a call site put back to a one-argument reader would stay green. The PR body says so. Follow-up candidate, not owed here.
  • N3 (nit) — the floor comment's 41 → 42 step and the new battery row name no card, where every earlier step does (check-governed-merges: git() drops stdin, so --pr and the post-merge audit read every moved path as explained (check-attr --stdin) #37038).

Implemented-by: claude/project-thread-wn0hqz
Reviewed-by: session_01J8VVAkBhKxchpbbRXtA3Mf

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf

The brief handed to the isolated CONTRACT_REVIEW_TIER subagent whose record is 7148249543 (verify-review-tier PASS: 24 assistant turns, every one at CONTRACT_REVIEW_TIER). The inputs it was given were the card, the PR and the head check-runs, plus read-only git and gh access. It got no L1 conclusions.

Brief
## Contract review brief — PR #37071 @ `4d8079f9fbb2d775415e54553e499c6b80c9c34e` (card #37038)

You review at `CONTRACT_REVIEW_TIER`. Render ONE `## Contract review` record on this head — its shape is
`node scripts/pm/record-recognisers.mjs --template` — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
  · card #37038: its body and EVERY comment (rulings and earlier records included)
  · PR #37071: its body, its file list, and the net diff against `main` at `4d8079f9fbb2d775415e54553e499c6b80c9c34e`
  · the check-runs on `4d8079f9fbb2d775415e54553e499c6b80c9c34e`: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

Scope — the paths `reviewFace` returns as `hits` on this PR's file list: scripts/pm/check-governed-merges.mjs;
  plus every file IN THIS DIFF that directly implements or enforces them — the gate that enforces a rule, the code
  a jsdoc or schema line describes, the validator a skill teaches — reviewed for agreement with the contract.
  Widen it freely, ⛔ never below `hits`; the record's `Scope:` line names the implementing files apart from `hits`.
  The rest of the diff (tests, unrelated modules, lockfiles, generated output, changesets) is the lane seat's
  ACCEPT at `TIER_DEFAULT`, exactly as a standalone PR of those files.
  ④ judges the `hits` files and those implementing files ONLY:
  lockfiles, generated output, changesets and prose elsewhere in the PR are not reviewed;
  code outside the diff is READ to judge them, never reviewed.

Security — if a `hits` path is under `skills/**` or `ui/skills/**` and the change teaches security, auth or permission
  behaviour the path name doesn't show, the record says so and the seat adopting the record adds the `security` label.
  The record says so on its `Security-touching:` line, and the arm lands on `no` alone: write `no` ONLY when no changed
  hunk teaches permission, sharing, credential, token, authentication or other security behaviour, else `yes`.

Rule change — if a `hits` path is under `.claude/**`: the PR body declares `Rule-change:` and you verify it against the diff.
  Write `Rule-change-verified: none` ONLY when no changed hunk alters what an agent may do without the maintainer
  (merge, bypass a check, change repository settings), what gets done and in what order (grading, dispatch, scope), or
  what must go to him (decisions, maintainer actions); process steps, scripts, wording, slimming and file moves are not rule
  changes. Write `ruled` ONLY when every such hunk copies the ruling the PR body quotes on its `Ruling-ref:` line — check the
  copy against the quoted words, do not re-rule it. Otherwise `yes`: the pull request then waits for the maintainer.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
   on the head already answered every derived gate family, and a local run costs more than it returns.
   If ONE probe is unavoidable, the record's `Local-runs:` line says `probe — REASON`; otherwise `none`.
   Scratch space is `/tmp/claude-0/-home-claude/ef739d1c-d61d-5ca9-8e36-44b007f9735a/scratchpad/pr-37071/` alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
  ① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
  ② Semver level — the changeset (or `skip-changeset`) matches what the diff publishes, and the `Clause-②:` line.
  ③ Boundary flags — every dev flag and every `open_questions` entry answered, or escalated.
     On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
     finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
  ④ Design judgment — for EVERY `hits` file: does the change hold against the code it cites and the
     scenario it is accepted against? A skill file against the card's eval prompt and the spec it teaches
     on `main`; a schema file against the ruling or ADR it implements and its first consumer; an ADR
     against its first consumer and its execution plan. For EVERY implementing file in the diff: does the
     code agree with the contract, sentence by sentence? Read the cited code in the live tree, and try to
     break the design.
     Grade each finding must-fix, should-fix or nit — a nit has no effect on correctness or the contract.
     A must-fix is a FAIL; a must-fix or should-fix earns a delta review of its fix; nits alone end the round.
     Spell a must-fix or should-fix with its id and grade, `S1 (should-fix) — …`, and a clean round as
     `No must-fix, no should-fix.`: the queue guard reads a graded finding as OPEN on this head and
     refuses the record; the delta record names those it closes by id alone, `S1: closed`.
     A nit is fixed only on the prose faces, or left as an accepted deviation or a follow-up card: a fix
     anywhere else moves the head, and this record no longer covers it.
     ⛔ Judge the tree, never the PR body's account of it.
Sign `Implemented-by:` with the dev's branch and `Reviewed-by:` with your session id — the value is the FIRST
thing after each colon.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf

L1 review · ACCEPT

Head-sha: 4d8079f9fbb2d775415e54553e499c6b80c9c34e · read 2026-11-25T00:12Z

席位核对

  1. 形态. l1-face.mjs --pr 37071 at 4d8079f9fb: 13 items read, none flagged. It is a draft against main, with Fixes #37038 on its own line and no closing keyword next to another card number (read by eye as well). Clause-②: no · Metadata-protocol: none. One file, scripts/pm/check-governed-merges.mjs, inside f2-C's extended lease. skip-changeset is right because nothing is published. Fixes is right: the card asks for a stdin-carrying reader on both handoffs, plus a self-test that fails today, and both are delivered.
  2. 前提实测. On the head, git() passes stdin only when input is given, and stays 'ignore' otherwise. Both guard handoffs now get checkoutGitReader(root): --pr's pullRecordStage and the sweep's readArmLanding. The armGit and armSettledWithoutUnread wrappers forward input. Two (argv) => git(root, argv) wrappers remain on the head, at the readWorkflowDiff and pullWorkflowDiff callers. Both issue only ls-tree/show/cat-file/merge-base and never stdin, so dropping the second argument there costs nothing. That is the PR's out-of-scope note, confirmed.
  3. 门禁 check-runs. At 4d8079f9fb: 26 success, 23 expected skip, 0 unexpected skip, 0 failed, 0 pending, Governed Surface Queue Guard included. Lint & Repo Gates and TypeScript Type Check both success. I re-ran the self-test on the head: check-governed-merges --self-test passes 972 assertions, exit 0. The new battery runs on real git over a throwaway repository: a moved non-regen path reads unexplained, and a regen-only control reads explained.
  4. 接受的偏差. The L2 record's three nits are accepted as deviations.
    • N1: the battery's reads through checkoutGitReader inherit the ambient git environment. They are read-only, and main has the same pattern.
    • N2: the two production runGit: call sites are pinned only through their seams, which the body discloses.
    • N3: the 41 → 42 floor comment names no card.
  5. 范围外去向. None filed. N2 is a follow-up candidate under filing-gate.md, for the seat's call. Skills-docs: not owed (kind none).
  6. 落地条款. L2 is owed on the rules face, because the file is a guard instrument. It is adopted here: record 7148249543, ## Contract review PASS on this head, Served-tier: CONTRACT_REVIEW_TIER, Scope: scripts/pm/check-governed-merges.mjs + none, which is not narrower than hits. The independence pair holds: an isolated subagent, given the brief beside the record and no L1 conclusions. verify-review-tier PASS. No must-fix, no should-fix. check-governed-merges --pr 37071: governed, 1 of 1 path, 163 changed lines, so this is Tier H. f2-C does not land it. It goes to the seat for the maintainer's approval, and then the seat lands it under the 15:25Z authorization.

席位意见: ACCEPT (Tier H, hand to the seat).

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAm5Tp3iBkiJk6nMwa5

Final green head for the delta review: 1b0344ef90e04725ec1bf7cf13e54bc15b16790e (relay pr_update_branch from 4d8079f9fbb2d775415e54553e499c6b80c9c34e, run 45516486178; main merged because landing K read 45).
Checks at that head: 25 success · 19 expected skip · 0 failed · 0 pending (pr-state.mjs --pr 37071); check-expected-skips.mjs --pr 37071: OK, exit 0. mergeable_state clean.
The PR's own diff is unchanged; the move is main's carry-over only. Owed: L1-a delta + delta contract review on this head, then the seat's Tier H hand-off.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf
Contract-review-claim: session_01J8VVAkBhKxchpbbRXtA3Mf · head 1b0344e · 2026-11-25T00:37Z

Delta contract review of record 7148249543 after the merge of main. L1-a runs the isolated CONTRACT_REVIEW_TIER subagent.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf

Contract review

Served-tier: CONTRACT_REVIEW_TIER
Head-sha: 1b0344ef90e04725ec1bf7cf13e54bc15b16790e
Local-runs: none
Scope: scripts/pm/check-governed-merges.mjs + none
Security-touching: no
Rule-change-verified: none

Delta round on PR #37071 for card #37038. This head is a merge of main (second parent 49c8e0f069a) into the previous head 4d8079f9fb, whose record is comment 7148249543 (PASS, nits N1 to N3). That record still holds on this head, and this is a full record on it. One file is in the diff, and it is the hits file; its self-test hunks sit in the same file and were read with it. Read outside the diff, never reviewed: scripts/pm/record-recognisers.mjs (unexplainedPathsBetween, regenCarry), scripts/pm/check-governed-queue-guard.mjs (its git(), its runGit, readLowRiskTier, readLowRiskRecordStage), scripts/git-env.mjs and .github/workflows/pr-automation.yml.

① Derived judgments

  • The net diff is the one already reviewed, byte for byte. The file's blob on this head is aced0445, the same as on 4d8079f9fb, and main's blob of it is 2914b6fe at both the old merge base 938a48f1 and the new one 49c8e0f0. The diff against the new merge base is one file, +152/−11, as the PR file list says.
  • git(root, args, input) and gitSpawnOptions: right. With no input the options are the old ones key for key (stdio[0] stays ignore, no input key), so every plain caller is unchanged. Every caller of git() in this head's tree passes two arguments, and nothing hands git itself as a callback, so no caller gains a stdin by accident. With input, stdin is piped, which is the queue guard's own spawner shape.
  • The two handoffs (--pr into pullRecordStage, the sweep into readArmLanding) pass checkoutGitReader(root): right. pullRecordStage passes runGit to readLowRiskRecordStage unwrapped, and readArmLanding puts the raw runGit on the record pair, so the second argument unexplainedPathsBetween sends to check-attr --stdin reaches git on both routes.
  • Accept-set effect: a narrowing of two REPORTS, and right. --pr and the post-merge audit stop reading a Regen-provenance: hop that moved a hand-written path as carried; they read it refused, as the queue already does. Nothing is widened: no path, tier or record reads more permissive than before. The merge gate is untouched (the guard file is not in the diff).
  • New read on the refusing route: merge-base runs when a non-regen path moved. If it throws, computeRegenCarry answers unreadable, never clean. Right: fail closed.
  • armGit and the wrapper in armSettledWithoutUnread forward input: right and inert today. readLowRiskTier sends them no stdin command, and the wrapper's answer cache, keyed by argv alone, answers no stdin command either.
  • Public surface: two new named exports, gitSpawnOptions and checkoutGitReader, on a scripts/pm module that is not published. Additive. Right. main's move added no importer of either name and no second definition of them.
  • Self-test roster: battery floor 6 matches the six assertions inside the battery, and the roster floor moves 41 to 42 with the one new row. main's move added no battery to this file, so 42 is still the right count on this head.

② Semver level

Nothing is published: the diff is one file under scripts/pm. The PR carries the skip-changeset label and no changeset is in the file list. Check Changeset reads skipped on this head where it read success on the previous one; that is the job's own condition in pr-automation.yml, which does not run on a pull request already labelled skip-changeset, so the skip is the exemption and not an unread gate. That matches.

Clause-②: no. Declared on the PR body and on the card, and it holds: no published schema, no declared capability and no consumer-facing behaviour moves. What narrows is a fleet report's reading, made to agree with the rule the queue already enforces.

③ Boundary flags

  • Check-runs on this head: 44 runs, 25 success, 19 skipped, none failed and none pending. Governed Surface Queue Guard, Lint · PM dispatch-gates, Lint · scoped · tooling self-tests, Lint · repo & tooling gates, PR-body guards and every type-check lane are success. The skipped runs are the UI, docs, build, opt-in and queue lanes that this path does not derive, plus Check Changeset as read in ②.
  • Deviation, branch claude/project-thread-wn0hqz in place of claude/issue-37038-*: accepted, the seat ordered it in the claim.
  • Deviation, first commit 74c61666 held a syntax error fixed in 4d8079f9: answered. The tree on this head is the fixed one, and the self-test lanes are success on it.
  • Deviation, pnpm check:i18n-coverage not measured locally: answered by this head's check-runs, every lint lane success.
  • Deviation, model-free commit trailers: no contract effect; PR-body guards is success.
  • The PR body's test and ablation readings name head 4d8079f9 and base 938a48f1. They are not re-taken on this head and are not this record's evidence: the blob they were taken on is the blob on this head, and this head's check-runs are the gate verdicts.
  • open_questions: empty. Nothing to answer.
  • Out-of-scope finding, the git: handoffs into readWorkflowDiff and pullWorkflowDiff and the tryGit readers still drop a second argument: confirmed harmless on this head. They issue ls-tree, show and plain reads, and check-attr --stdin in unexplainedPathsBetween is still the only stdin read across the three files. No card owed.
  • The report's l2_routing says no contract review is owed. It is: this file is on the rules face, and this record is that review. Tier H at landing stands.
  • SQL push-down: not applicable. The diff holds no data access, no id materialisation and no join.

④ Design judgment

No must-fix, no should-fix.

What main brought between 938a48f1 and 49c8e0f0, and why it does not affect the change:

  • None of the modules the hits file imports or loads moved: record-recognisers.mjs, check-governed-queue-guard.mjs, git-env.mjs, git-history.mjs, clause2-line.mjs, import-prerequisite.mjs, invoked-as.mjs and check-half-states.mjs are identical at both merge bases. So unexplainedPathsBetween, regenCarry and the guard's runGit shape are the code the previous record read. Nothing under .github, no .gitattributes and no root package.json moved either, so the lanes that run the self-test are the same lanes.
  • Of the modules that import this file, six moved: dispatch-gates.mjs, dispatch-gates.self-test.mjs, fleet-write/execute.mjs, fleet-write/ops.mjs, fleet-write/validate.mjs and post-stamped.mjs (check-skills-token-ratchet.mjs moved too). I read their imports on this head: they take GOVERNED_REPOS, HUMAN_MERGE_LINE_THRESHOLD, SELF_REPO_ID, parseNumstat, sizeVerdict and generatedExceptionFor. None takes git, a git reader, pullRecordStage or readArmLanding, and no changed line in main's move names a governed-merges symbol. The diff changes none of the names they import.
  • .claude/skills/pm-dispatch/references/area-lease.md moved and names check-governed-merges.mjs --pr N as the read an area takes before landing. That is the --pr reading this change corrects; the sentence asks for nothing the change does not give, and it is not in this diff.
  • The rest of the merge is product and UI code with no path into scripts/pm.

scripts/pm/check-governed-merges.mjs, against the card and the code it cites on this head:

  • The card's defect is real on main and closed on this head. unexplainedPathsBetween sends the moved paths as the reader's second argument; on main both handoffs still take one argument and git() still ignores stdin, so the answer splits to one empty field, the loop never runs and the function returns empty. On this head both halves are fixed, and either half alone would leave the defect.
  • The jsdoc holds sentence by sentence. gitSpawnOptions: stdin dropped does make every moved path read as a regeneration, and a no-input read does stay on ignore. checkoutGitReader: its shape is the guard's own runGit shape, argument for argument, and it names the two handoffs that use it.
  • The card's Expected is met: the battery's second case drives the real unexplainedPathsBetween through the handed reader on real git and reads the moved non-regen path as unexplained, with a control hop that moves only the merge=os-regen path and reads explained. I walked the fixture against the function: the hop from..to moves both paths, the attribute read leaves scripts/pm/x.mjs, and the pull request's own delta at to names it, so one path is returned; the first case reads the -z triples at the right offsets.
  • Tried to break it again on this head. A null or empty-string input: piped and empty, the same as the guard. A reader that passes input through a wrapper: both wrappers forward it. A hop whose trees are absent from the checkout: the name-only diff threw before this change too. A caller of git() that main added with a stray third argument: there is none. None broke.

Nits carried from 7148249543, unchanged because the file is unchanged; none has any effect on correctness or the contract:

  • N1 (nit) — the battery READS its throwaway repository through checkoutGitReader, so those git children inherit the ambient environment, while buildStdinAttrFixture builds it with gitFreeEnv(). The reads are diff, check-attr and merge-base, so nothing can be written. Accepted deviation, as the L1 record took it.
  • N2 (nit) — the two production call sites are not pinned; the seam pins hand checkoutGitReader to pullRecordStage and readArmLanding themselves. The PR body says so. Follow-up candidate, not owed here.
  • N3 (nit) — the floor comment's 41 → 42 step and the new battery row name no card (check-governed-merges: git() drops stdin, so --pr and the post-merge audit read every moved path as explained (check-attr --stdin) #37038).

Implemented-by: claude/project-thread-wn0hqz
Reviewed-by: session_01J8VVAkBhKxchpbbRXtA3Mf

VERDICT: PASS

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf

The brief handed to the isolated CONTRACT_REVIEW_TIER subagent whose delta record is 7148767275 (verify-review-tier PASS: 27 assistant turns, every one at CONTRACT_REVIEW_TIER). It got no L1 conclusions.

Brief
## Contract review brief — PR #37071 @ `1b0344ef90e04725ec1bf7cf13e54bc15b16790e` (card #37038)

You review at `CONTRACT_REVIEW_TIER`. Render ONE `## Contract review` record on this head — its shape is
`node scripts/pm/record-recognisers.mjs --template` — with a PASS or FAIL verdict, and post it as ONE comment
on the PR or its card.

Inputs — these and nothing else:
  · card #37038: its body and EVERY comment (rulings and earlier records included)
  · PR #37071: its body, its file list, and the net diff against `main` at `1b0344ef90e04725ec1bf7cf13e54bc15b16790e`
  · the check-runs on `1b0344ef90e04725ec1bf7cf13e54bc15b16790e`: their conclusions ARE the gate verdicts
⛔ Not the dispatch order, ⛔ not the dispatching seat's own conclusions — this brief is adversarial by design.

Scope — the paths `reviewFace` returns as `hits` on this PR's file list: scripts/pm/check-governed-merges.mjs;
  plus every file IN THIS DIFF that directly implements or enforces them — the gate that enforces a rule, the code
  a jsdoc or schema line describes, the validator a skill teaches — reviewed for agreement with the contract.
  Widen it freely, ⛔ never below `hits`; the record's `Scope:` line names the implementing files apart from `hits`.
  The rest of the diff (tests, unrelated modules, lockfiles, generated output, changesets) is the lane seat's
  ACCEPT at `TIER_DEFAULT`, exactly as a standalone PR of those files.
  ④ judges the `hits` files and those implementing files ONLY:
  lockfiles, generated output, changesets and prose elsewhere in the PR are not reviewed;
  code outside the diff is READ to judge them, never reviewed.

Security — if a `hits` path is under `skills/**` or `ui/skills/**` and the change teaches security, auth or permission
  behaviour the path name doesn't show, the record says so and the seat adopting the record adds the `security` label.
  The record says so on its `Security-touching:` line, and the arm lands on `no` alone: write `no` ONLY when no changed
  hunk teaches permission, sharing, credential, token, authentication or other security behaviour, else `yes`.

Rule change — if a `hits` path is under `.claude/**`: the PR body declares `Rule-change:` and you verify it against the diff.
  Write `Rule-change-verified: none` ONLY when no changed hunk alters what an agent may do without the maintainer
  (merge, bypass a check, change repository settings), what gets done and in what order (grading, dispatch, scope), or
  what must go to him (decisions, maintainer actions); process steps, scripts, wording, slimming and file moves are not rule
  changes. Write `ruled` ONLY when every such hunk copies the ruling the PR body quotes on its `Ruling-ref:` line — check the
  copy against the quoted words, do not re-rule it. Otherwise `yes`: the pull request then waits for the maintainer.

⛔ READ-ONLY. No worktree, no checkout, no build, no test run, no gate re-run, no ablation: the check-runs
   on the head already answered every derived gate family, and a local run costs more than it returns.
   If ONE probe is unavoidable, the record's `Local-runs:` line says `probe — REASON`; otherwise `none`.
   Scratch space is `/tmp/claude-0/-home-claude/ef739d1c-d61d-5ca9-8e36-44b007f9735a/scratchpad/pr-37071/` alone; nothing there you did not write this round is read.

Judge, in the record's own sections:
  ① Derived judgments — every accept-set and public-surface change the diff implies, each named right or wrong.
  ② Semver level — the changeset (or `skip-changeset`) matches what the diff publishes, and the `Clause-②:` line.
  ③ Boundary flags — every dev flag and every `open_questions` entry answered, or escalated.
     On every face, SQL push-down: a new id materialisation or in-app join where SQL could push down is a
     finding unless a reason is given (AGENTS.md, Prime Directive 5: SQL first).
  ④ Design judgment — for EVERY `hits` file: does the change hold against the code it cites and the
     scenario it is accepted against? A skill file against the card's eval prompt and the spec it teaches
     on `main`; a schema file against the ruling or ADR it implements and its first consumer; an ADR
     against its first consumer and its execution plan. For EVERY implementing file in the diff: does the
     code agree with the contract, sentence by sentence? Read the cited code in the live tree, and try to
     break the design.
     Grade each finding must-fix, should-fix or nit — a nit has no effect on correctness or the contract.
     A must-fix is a FAIL; a must-fix or should-fix earns a delta review of its fix; nits alone end the round.
     Spell a must-fix or should-fix with its id and grade, `S1 (should-fix) — …`, and a clean round as
     `No must-fix, no should-fix.`: the queue guard reads a graded finding as OPEN on this head and
     refuses the record; the delta record names those it closes by id alone, `S1: closed`.
     A nit is fixed only on the prose faces, or left as an accepted deviation or a follow-up card: a fix
     anywhere else moves the head, and this record no longer covers it.
     ⛔ Judge the tree, never the PR body's account of it.
Sign `Implemented-by:` with the dev's branch and `Reviewed-by:` with your session id — the value is the FIRST
thing after each colon.

Delta round — this head is a merge of `main` into the PR (second parent `49c8e0f069ac5e21b11ba40d8bbbbfd8cd2eced2`), moved from `4d8079f9fbb2d775415e54553e499c6b80c9c34e`, whose full record is PR comment 7148249543 (PASS, nits N1–N3 only).
  Judge whether that record still holds on this head: the PR's net diff against its new merge-base, whether main's move
  changed any code the `hits` file calls or is called by (record-recognisers.mjs, check-governed-queue-guard.mjs,
  git-env.mjs and anything else it imports), and the check-runs on this head. Render a full record of the same shape
  on THIS head; name in ④ what main brought that you read and why it does or does not affect the change.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAkBhKxchpbbRXtA3Mf

席位核对

ACCEPT — PR #37071 re-accepted on the merge-main head (L1-a, delta of ACCEPT 7148271983).

Head-sha: 1b0344ef90e04725ec1bf7cf13e54bc15b16790e · read 2026-11-25T00:41Z

  1. 形态. l1-face.mjs --pr 37071 at 1b0344ef90: CLEAN, 13 items read, none flagged. mergeable_state clean. Fixes #37038, Clause-②: no · Metadata-protocol: none, and skip-changeset are unchanged.
  2. 前提实测. The head is a merge of main (second parent 49c8e0f069ac) into 4d8079f9fbb2. scripts/pm/check-governed-merges.mjs is blob aced04457fc7 on both heads, and main still holds 2914b6fe2039. The net diff against the new merge-base is that one file, +152/-11, the same as at the ACCEPT. Nothing the file imports moved on main (read in the delta record).
  3. 门禁 check-runs. At 1b0344ef90: 25 success, 19 expected skip, 0 unexpected skip, 0 failed, 0 pending. Lint & Repo Gates and TypeScript Type Check success. check-expected-skips --pr 37071: OK, exit 0. Check Changeset reads skipped now. Its if: exempts a PR labelled skip-changeset, and it is in main's roster.
  4. 接受的偏差. N1–N3 (nits) carried unchanged, as at 7148271983.
  5. 范围外去向. None filed here. N2 goes into pm: after the .claude/** declaration split lands, the relay review plan and the patrol landing row still read the raw Tier S and never ask the maintainer #35612's PR, per the seat.
  6. 落地条款. Delta L2 adopted: record 7148767275, ## Contract review PASS on this head, Served-tier: CONTRACT_REVIEW_TIER, Scope: scripts/pm/check-governed-merges.mjs + none (not narrower than hits). The reviewer was an isolated subagent, with its brief beside the record. verify-review-tier PASS. No must-fix, no should-fix. Governed, Tier H: this goes to the seat for the hand-off to the maintainer.

@objectstack-fleet

Copy link
Copy Markdown
Contributor Author

repo:objectstack#2 · huangyiirene · session_01J8VVAm8Y73VGNq3PkTe3dc

维护者速读

  • 改了什么:scripts/pm/check-governed-merges.mjs 的 git() 原来丢掉 stdin,现在会把它传过去;git check-attr --stdin 因此能真正读到被移动的路径(+152/−11,Fixes check-governed-merges: git() drops stdin, so --pr and the post-merge audit read every moved path as explained (check-attr --stdin) #37038)。
  • 为什么改:席位落地前跑的 --pr 预读和合并后的受管审计,原来把重生成链里夹带的手改文件一律读成"已解释";卡上的复现是修复前 0 条、修复后 14 条。
  • 风险与回滚:只影响这两份报告;合并队列的守卫本来就自己传 stdin,不受影响。revert 这一个合并即可。
  • 先看:git() 的 stdin 传递,以及新增自测里在修复前会红的那一例。
  • 两分钟验证:node scripts/pm/check-governed-merges.mjs --self-test,972 个用例通过。
  • 需要你做的:在当前 head 1b0344ef90e04725ec1bf7cf13e54bc15b16790e 上点一次 Approve(守卫工具属 Tier H);批准后本席经队列落地。

Approval requested on head 1b0344ef: Tier H (guard instrument, +152/−11). Main is merged in (K = 2), and the file's blob is unchanged across that merge. Contract review: PASS 7148249543, plus delta PASS 7148767275 on this head. L1 re-ACCEPT 7148789636. All checks are green (25 success, 19 expected skip). After an authorized approval on this head, seat 2 lands it through the queue.

@objectstack-fleet objectstack-fleet Bot added the pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue label Nov 25, 2026
@os-zhuang
os-zhuang marked this pull request as ready for review November 25, 2026 01:45
@os-zhuang
os-zhuang added this pull request to the merge queue Nov 25, 2026
Merged via the queue into main with commit 753aae6 Nov 25, 2026
50 checks passed
@os-zhuang
os-zhuang deleted the claude/project-thread-wn0hqz branch November 25, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pm:awaiting-merge PR only: landing waits on the maintainer's own review and merge (SKILL.md 复核 ②); never on an issue size/m skip-changeset PR has no user-facing published change; bypasses the changeset gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

check-governed-merges: git() drops stdin, so --pr and the post-merge audit read every moved path as explained (check-attr --stdin)

3 participants