From 74c61666c20939eb873d735bca5521ec5f192a6e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 18:01:09 +0000 Subject: [PATCH 1/2] fix(pm): check-governed-merges hands the guard's readers a git that carries 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 Claude-Session: https://claude.ai/code/session_01J8VVAm5Tp3iBkiJk6nMwa5 --- scripts/pm/check-governed-merges.mjs | 163 +++++++++++++++++++++++++-- 1 file changed, 152 insertions(+), 11 deletions(-) diff --git a/scripts/pm/check-governed-merges.mjs b/scripts/pm/check-governed-merges.mjs index 2914b6fe203..38e9ec21049 100644 --- a/scripts/pm/check-governed-merges.mjs +++ b/scripts/pm/check-governed-merges.mjs @@ -1263,6 +1263,9 @@ const SELF_TEST_BATTERIES = Object.freeze({ // 40 → 44 (#35612, N1 of #35610): a record the queue's record leg refuses — a FAIL, below its tier, or a leg not // read — keeps the split at Tier H however its `Rule-change-verified:` line reads; one case pins the words. '⚖️ #35321: the guard instruments are Tier H, and `.claude/**` splits by declaration': 44, + // The reader this file hands the guard's readers passes `check-attr --stdin` its paths; the --pr and sweep handoffs + // are pinned beside their own batteries' readers. + '⭐ the git reader handed to the guard\'s readers carries STDIN (`check-attr --stdin`)': 6, }); // DELETING an entry silences that battery's floor exactly as effectively as @@ -1270,8 +1273,9 @@ const SELF_TEST_BATTERIES = Object.freeze({ // workflows split battery (ruling record 6722205630): one battery, one row. // Raised 36 → 37 with the low-risk skills arm battery (#33501), 37 → 38 with its post-merge leg (#33603), // 38 → 39 with the weekly audit card's battery (#33814), 39 → 40 with the arm's ADR leg (#33539), -// 40 → 41 with the guard-instrument rows and the `.claude/**` declaration split (#35321). -const SELF_TEST_BATTERY_FLOOR = 41; +// 40 → 41 with the guard-instrument rows and the `.claude/**` declaration split (#35321), 41 → 42 with the +// stdin-carrying git reader. +const SELF_TEST_BATTERY_FLOOR = 42; // The key an assertion is filed under when no battery is open. It is not a // declared battery, so it reds by the same set difference rather than silently @@ -4304,8 +4308,28 @@ export async function recomputeProvenanceFor(root, hitsByEntry, { allPaths = [], // ── local git (enumeration + diff paths; zero API) ────────────────────────── -function git(root, args) { - return execFileSync('git', args, { cwd: root, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024, stdio: ['ignore', 'pipe', 'pipe'] }); +function git(root, args, input) { + return execFileSync('git', args, gitSpawnOptions(root, input)); +} + +/** + * `git()`'s spawn options. `input`, when given, is git's STDIN — `check-attr --stdin` reads its paths there, and with + * stdin dropped git answers nothing, so the guard's `unexplainedPathsBetween` reads every moved path as a regeneration + * and `regenCarry` can read a false carry. With no `input`, stdin stays `'ignore'`: a plain read never waits on a + * terminal. Exported only as the self-test's seam. + */ +export function gitSpawnOptions(root, input) { + const base = { cwd: root, encoding: 'utf8', maxBuffer: 64 * 1024 * 1024 }; + return input === undefined ? { ...base, stdio: ['ignore', 'pipe', 'pipe'] } : { ...base, input, stdio: ['pipe', 'pipe', 'pipe'] }; +} + +/** + * The git reader this file hands the queue guard's readers (`--pr`'s `pullRecordStage`, the sweep's `readArmLanding`): + * `(argv, input) => stdout`, the guard's own `runGit` shape, so the `input` a reader passes reaches git's stdin. + * ⛔ Never `(argv) => git(root, argv)` there — that drops the second argument, and `check-attr --stdin` answers nothing. + */ +export function checkoutGitReader(root) { + return (argv, input) => git(root, argv, input); } /** @@ -5392,9 +5416,9 @@ export async function readArmLanding(entry, { paths, repo, readers, fetchers, ru // N5: every git read the arm takes is recorded when it throws. The guard folds such a read into Tier H with a // reason (fail closed in the queue), but here an H read on a failed read cannot say whether the queue read S. const gitFailures = []; - const armGit = (argv) => { + const armGit = (argv, input) => { try { - return runGit(argv); + return runGit(argv, input); } catch (error) { gitFailures.push({ argv, why: why(error) }); throw error; @@ -5692,11 +5716,11 @@ function armSettledWithoutUnread({ guard, entry, paths, repo, head, events, runG const [work] = guard.decomposeGovernedWork([{ pr: entry.pr, sha: entry.sha, subject: entry.subject, paths }], repo).governed; if (!work) return null; const failures = []; - const git = (argv) => { + const git = (argv, input) => { const key = JSON.stringify(argv); if (answers.has(key)) return answers.get(key); try { - return runGit(argv); + return runGit(argv, input); } catch (error) { failures.push({ argv, why: String(error?.message ?? error).split('\n')[0] }); throw error; @@ -6807,7 +6831,7 @@ async function runPullMode(args) { const api = { ...apiContext(process.env), slug: target.slug, token }; return { fetchComments: guard.makeCommentReader(api), fetchLabels: guard.makeLabelReader(api), fetchTimeline: guard.makeTimelineReader(api) }; }, - runGit: sameCheckout ? (argv) => git(root, argv) : null, + runGit: sameCheckout ? checkoutGitReader(root) : null, }); return await emitVerdict(derived.paths, args, derived.derivation, derived.size, { fork: derived.fork, checks: derived.checks }, repo, workflowDiff, staged); } @@ -7268,7 +7292,7 @@ async function main() { ? { fetchPull: counted(armReaders.guard.makePullReader(api)), fetchReviews: counted(armReaders.guard.makeReviewReader(api)), fetchTimeline: counted(armReaders.guard.makeTimelineReader(api)), fetchComments: counted(armReaders.guard.makeCommentReader(api)), fetchLabels: counted(armReaders.guard.makeLabelReader(api)) } : null; const root = repoById.get(entry.repoId)?.path; - entry.arm = await readArmLanding(entry, { paths: pathsBySha.get(entry.sha) ?? [], repo: entry.repoId, readers: armReaders, fetchers, runGit: (argv) => git(root, argv), attribution: entry.attribution ?? null }); + entry.arm = await readArmLanding(entry, { paths: pathsBySha.get(entry.sha) ?? [], repo: entry.repoId, readers: armReaders, fetchers, runGit: checkoutGitReader(root), attribution: entry.attribution ?? null }); if (entry.arm?.state === 'not-measured') armUnmeasured += 1; } @@ -7975,6 +7999,25 @@ async function selfTest() { assert('--pr-reads-no-record-stage-and-loads-no-reader-unless-the-stage-is-pending', (await stagePr({ reading: labelled })) === labelled && (await stagePr({ reading: null })) === null && (await stagePr({ reading: walked.lowRisk })) === walked.lowRisk && calls.length === 0 && loads === 0 && (await stagePr()) !== withCs(walked.lowRisk) && loads === 1, `${calls.join()} loads=${loads}`); + // ⭐ The reader `--pr` hands the record stage in this checkout is the stdin-carrying one: what the guard's + // reader receives answers `check-attr --stdin`, so a hand edit inside a regeneration chain reads unexplained. + assert('⭐ --pr-HANDS-THE-RECORD-STAGE-A-GIT-READER-THAT-CARRIES-STDIN-so-a-moved-non-regen-path-reads-unexplained', await (async () => { + const { unexplainedPathsBetween } = await import('./record-recognisers.mjs'); + const fx = buildStdinAttrFixture(); + try { + let handed = null; + const spy = { ...armReaders, guard: { ...armReaders.guard, readLowRiskRecordStage: async (o) => { handed = o.runGit; return armReaders.guard.readLowRiskRecordStage(o); } } }; + await pullRecordStage({ + lowRisk: withCs(walked.lowRisk), paths: walked.paths, repo: REPO, pullHead: { number: 2, body: 'Fixes #69\n\nClause-②: no\nMetadata-protocol: none', head: { ref: 'claude/project-thread-x' } }, + derivation: { pull: 2, headSha: PRHEAD, baseSha: null }, readers: () => spy, runGit: checkoutGitReader(fx.root), + fetchers: { fetchComments: async () => [], fetchLabels: async () => [], fetchTimeline: async () => [] }, + }); + const hand = typeof handed === 'function' ? unexplainedPathsBetween(handed, { from: fx.from, to: fx.to, base: 'main' }) : null; + return Array.isArray(hand) && hand.join() === STDIN_FX_HAND ? true : JSON.stringify(hand); + } finally { + fx.cleanup(); + } + })() === true); } const removed = await walk([SK, CS], [{ event: 'labeled', label: { name: 'security' } }, { event: 'unlabeled', label: { name: 'security' } }]); assert('⛔ S1-a-security-label-REMOVED-in-the-timeline-the-pull-object-no-longer-shows-is-H', tier(removed.paths, withCs(removed.lowRisk)) === GOVERNED_TIER_H && /`security` label removed/.test(lowRiskArmVerdict(governedPathsIn(removed.paths, REPO), REPO, withCs(removed.lowRisk)).reasons.join())); @@ -11255,6 +11298,30 @@ async function selfTest() { assert('⛔ readers-that-did-not-load-are-NOT-MEASURED', await unmeasured({ rd: { available: false, reason: 'no guard' } }, /no guard/) === true); assert('no-catalog-row-or-no-PR-number-is-no-arm-reading', (await run({ paths: ['AGENTS.md'] })) === null && (await readArmLanding({ ...entryOf(), pr: null }, { paths: [SK], repo: 'objectstack', readers, fetchers: {}, runGit })) === null); + // ⭐ Every git reader the landing hands the guard — the arm's (`readLowRiskTier`) and the record pair's + // (`recordVerdict`, where a `Regen-provenance:` chain is re-tested) — passes the caller's STDIN through. + { + const handed = { arm: [], pair: [] }; + const spy = { ...readers, guard: { ...readers.guard, + readLowRiskTier: (...a) => { handed.arm.push(a[3]?.runGit); return readers.guard.readLowRiskTier(...a); }, + recordVerdict: (o) => { handed.pair.push(o?.pair?.runGit); return readers.guard.recordVerdict(o); } } }; + const echo = (args, input) => (args[0] === 'check-attr' ? `stdin:${input}` : runGit(args)); + const echoed = await run({ rd: spy, git: echo }); + const all = [...handed.arm, ...handed.pair]; + assert('⭐ the-landing-hands-every-guard-reader-a-git-that-passes-STDIN-through-the-arm-and-the-record-pair', + echoed?.state === 'pass' && handed.arm.length > 0 && handed.pair.length > 0 && all.every((g) => typeof g === 'function' && g(['check-attr', '--stdin'], 'a\0b') === 'stdin:a\0b'), JSON.stringify({ state: echoed?.state, arm: handed.arm.length, pair: handed.pair.length })); + const { unexplainedPathsBetween } = await import('./record-recognisers.mjs'); + const fx = buildStdinAttrFixture(); + try { + handed.arm.length = 0; + await run({ rd: spy, git: checkoutGitReader(fx.root) }); + const hand = typeof handed.arm[0] === 'function' ? unexplainedPathsBetween(handed.arm[0], { from: fx.from, to: fx.to, base: 'main' }) : null; + assert('⭐ the-sweeps-checkout-reader-reaches-real-git-through-the-landings-wrapper-and-a-moved-non-regen-path-reads-unexplained', + Array.isArray(hand) && hand.join() === STDIN_FX_HAND, JSON.stringify(hand)); + } finally { + fx.cleanup(); + } + } // The arm's RECORD STAGE, as the queue read it at the landing: a record that stands and reads PASS must also carry // the arm's line, and the card must have been free of `security` THEN. A stage at Tier H is a BREACH flagged @@ -11676,6 +11743,40 @@ async function selfTest() { assert('the-swept-line-names-the-next-weekly-deadline-and-refuses-an-unreadable-cron', auditSweptExpectation('31 23 * * 0', new Date('2026-11-15T23:40:00Z')).includes('next by 2026-11-22T23:31Z') && auditSweptExpectation('*/5 * * * *', new Date()).includes('UNSTATED')); } + // ── The git reader the guard's readers are handed carries STDIN ────────── + // + // `unexplainedPathsBetween` hands the moved paths to `git check-attr --stdin` as `runGit`'s SECOND argument. A + // reader that drops it answers nothing, and an empty answer reads every moved path as a regeneration — so `--pr` + // and the post-merge audit read a hand edit inside a `Regen-provenance:` chain as carried. Real git, offline, over + // a throwaway repository: the reader this file hands out, never a stub of it. + battery('⭐ the git reader handed to the guard\'s readers carries STDIN (`check-attr --stdin`)'); + { + const { unexplainedPathsBetween } = await import('./record-recognisers.mjs'); + const fx = buildStdinAttrFixture(); + try { + const read = checkoutGitReader(fx.root); + const attrs = String(read(['check-attr', '--source', fx.to, '-z', 'merge', '--stdin'], [STDIN_FX_HAND, STDIN_FX_REGEN].join('\0'))).split('\0'); + assert('⭐ the reader hands git its STDIN: `check-attr --stdin` answers each path it is handed (`unspecified` for the hand-written one, `os-regen` for the generated one)', + attrs[0] === STDIN_FX_HAND && attrs[2] === 'unspecified' && attrs[3] === STDIN_FX_REGEN && attrs[5] === 'os-regen', JSON.stringify(attrs)); + const hand = unexplainedPathsBetween(read, { from: fx.from, to: fx.to, base: 'main' }); + assert('⛔ through the guard\'s own reader, a moved path whose attribute is NOT `os-regen` reads UNEXPLAINED (a reader that drops stdin reads it explained)', + hand.join() === STDIN_FX_HAND, JSON.stringify(hand)); + const regenOnly = unexplainedPathsBetween(read, { from: fx.to, to: fx.regenOnly, base: 'main' }); + assert('control: a hop that moved ONLY the `merge=os-regen` path reads explained, so the reading above is the attribute\'s and not a blanket refusal', + regenOnly.length === 0, JSON.stringify(regenOnly)); + assert('⛔ a read that passes NO input still answers, on an ignored stdin: `check-attr --stdin` returns empty rather than waiting on a terminal', + String(read(['check-attr', '-z', 'merge', '--stdin'])) === ''); + } finally { + fx.cleanup(); + } + const plain = gitSpawnOptions('/r'); + const fed = gitSpawnOptions('/r', 'a\0b'); + assert('⛔ a caller that passes no input keeps stdin `ignore` and hands git no `input`', + plain.stdio[0] === 'ignore' && !('input' in plain) && plain.cwd === '/r', JSON.stringify(plain)); + assert('a caller that passes input gets it on a PIPED stdin, byte for byte', + fed.stdio[0] === 'pipe' && fed.input === 'a\0b' && fed.cwd === '/r', JSON.stringify(fed)); + } + // ── The floor: every declared battery RAN, and ran its cases (#13489) ──── // // Evaluated after every battery has had its chance and BEFORE the verdict, so @@ -11689,11 +11790,51 @@ async function selfTest() { for (const failure of failures) console.error(` • ${failure}`); process.exit(1); } - console.log(`✓ check-governed-merges --self-test: ${checked} assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 landing window — the QS-7 regression pin in both directions, the topological close beyond the budget, the unproven-boundary EDGE, the listed-or-INCOMPLETE invariant over every fixture, the escalating floors, per-repo --since-ref resolution and its named fallback, and the window words — the replay fixtures, the five-repo resolution incl. absent/wrong-origin/relocated checkouts, the attribution channel chain + its proxy-transport re-arm plan and its one named fallback line, the three-way attribution column (resolved · every-channel-failed · NOT LOOKED UP, and the note pointer that belongs to the middle one alone), the --test pre-arm predicate, the generated-artifact provenance exception — the register's invariants incl. the RETIRED #9866 row staying retired (no row lifts anything under .claude/**, and the audit workflow is plainly governed again), a row with no recompute failing closed, lift/reject/absent-provenance semantics, the untouched mixed-diff rule, named-rows-not-a-class, the #11084 generator co-edit fence in both directions incl. a row with no instrument tree, and its render words — the #11705 generator-owned rows inside skills/** (a genuine generated file passes, the same path hand-edited does not, a path no generator declares is hand-authored content, per-row fences, and the enumeration read from the real generator), the exit table, the report wording pins, and the #13307 remote-reachability leg — the pure freshness verdicts in every branch (unreachable · a remote naming no commit · an unreadable local tip · a mirror behind its remote · the two-unreadable-shas degenerate case that must never read as a match), the report words in both directions (an unreachable repo never renders the tick, a reachable one still says a MEASURED zero, and a row with no remote reading never claims one), and the REAL prober on local bare-repo fixtures over the file transport — a live remote, a deleted one, the --exit-code branch, and a mirror the remote moved past — the #13423 identity leg (an origin no slug parses from refuses, pure and end-to-end, with audited reachable only through a parsed matching slug), the #13424 per-repo window resolution (a sibling-only pin resolves in its own repo, the self-only control still errors, and the end-to-end sibling-pin sweep reports instead of exiting 1), the #13307 sweep-code provenance line in all three branches, and the #13836 attribution set — every refusal carries its precondition category on the row, in the footer, and in --json; the shallow-clone path in both directions; and the run-1-vs-run-2 flip reproduced on real fixtures with zero local writes — and the live battery's own PREREQUISITE, asked before a single case runs: an uninstalled checkout refuses with the repo-wide NOT-MEASURED code end to end instead of reporting a shrunken battery, while the floor still names the battery, by itself, for a case that genuinely stopped registering) — and the #15406 replay of PR #15284: the sweep still CLASSIFIES a certified regeneration as a governed merge and still lists it, its row now names the register row it does not recompute and where certification is recorded, and the --test head no longer reports a post-lift zero as if nothing had hit the register — and the #17003 derivation set: the Link walk that ends on rel=next rather than on a short page, a rename reaching the predicate as BOTH of its paths, a walk the PR's own count contradicts refusing rather than answering on a subset, a channel chosen once and never spliced mid-walk, every --branch leg on an injected git incl. the uncomputable merge base that REFUSES instead of falling back to two-dot, and the card's own reproduction run end to end on a real repo — a branch behind a main that has since touched a governed path answers GOVERNED two-dot and NOT governed three-dot, a rename out of a governed path is a hit only because the diff is taken --no-renames, the merge-base refusal prints no verdict at all, and the verdict is byte-identical through --branch and through --test on the same list. — and the #18055 banner set: the INCOMPLETE banner is BUILT on the attribution-failure path instead of throwing while it is built, it still returns EXIT_INCOMPLETE, the proxy hint renders from the plan the sweep now binds and stays empty both when the plan says no hint and when the incompleteness is not about attribution, and a real sweep whose every attribution channel fails prints the banner on STDERR and exits 2 — and the #19133 landing tiers: every register row carries H or S, Tier S is exactly the .claude/** row, a list is S only when every governed path is S (empty or ungoverned answers H), the verdict line and --json carry the tier while both tiers share exit 3, and the tier is recomputed on the lifted slice. — and the 2026-09-18 SIZE predicate: the ruled line, 3,000 since the maintainer's 2026-10-09 word, declared once and pinned on both sides and on the PR that prompted it; the number read off --pr's own GET (its absence a refusal), off --branch's --numstat on the range it lists (binary files at zero, a failed read a refusal), or off --additions/--deletions handed to --test (half a pair refused, the pair refused where the mode reads it itself); NOT MEASURED said on stdout when nothing read it; a certified regeneration lifting the path and not the size; and the verdict still ONE emitter — the governed code for either limb, byte-identical across --branch and --test on the same list and numbers. — and the #18989 guard set: the re-exec guard is the CALLER's name — the default is still this file's own, a caller that names its own guard is suppressed by that one alone, and the patrol's name does not silence this file any more — a suppressed run SPEAKS, naming the variable to unset, the 401 the silence would be read as and the proxy the request was supposed to take, while the Actions-runner leg stays inert and an already-flagged run is still answered by the FLAG; and the plan is declared a MIRROR pinned to its OWNER's source: the patrol's spelling, the patrol's own caller-guard parameter, and the module-scope await that is the measured REASON this is a copy rather than an import. — and the #19036 audit half: the sweep classifies on the SAME predicate the queue and the pre-check answer with (\`landsByHumanMerge\` on \`testVerdict\`), the size read LOCALLY off the landed diff by one \`git diff-tree --numstat\` per mainline commit that also lists its paths (byte-identical to the old \`--name-only\` list, a merge commit read against its first parent, a binary row at zero), so an oversized landing with NO governed path is an entry on the size limb alone — counted apart in the head, listed with the ⛔ SIZE row and the same attribution column, GitHub's pair printed beside the landed number only when it differs, exactly the threshold NOT listed, a governed AND oversized row carrying both limbs, a row classified with no size rendering as it did — and a REAL sweep over a fixture repo listing the over-by-one landing and not the at-threshold one, on stdout and in --json. — and the 2026-09-21 FORK predicate: a fork head (or a deleted fork repo) lands by human merge through the Tier H terminal with its own reason sentence, a same-repo head changes nothing on either tier, --test / --branch say NOT MEASURED for a head they cannot see, ZERO check runs read NOT MEASURED and never green, and both readings ride --pr's own GET. — and the closed argv: each mode reads a closed flag set and refuses every other on exit 1 (an unknown flag, another mode's flag, an equals spelling, a --repo, which prescribes the qualified --pr spelling), a bare --pr beside a PM_SWEEP_REPO naming another repository is refused with both qualified spellings, and the card's own invocation table replayed against a recording fake API: every refusal READS NOTHING, the qualified spelling answers from the repository it names, byte-identical with PM_SWEEP_REPO set. — and the #30718 rename-aware size: --branch and the sweep count a moved file by its \`-M\` numstat, as GitHub does (a 400-line move with one edit reads +1 / -1 over one file, a \`diff.renames=false\` config notwithstanding), while both PATH lists keep \`--no-renames\` and so still carry both paths. — and the weekly audit card's readings (#33814), each pinned with its control: a PR-less governed landing reads NOT MEASURED, a carried row names the state this run read it in, the body is fitted under the issue-body limit with its counts taken on the card, a close rules only when its event's actor is an authorized approver and it names no commit (an app object or an absent app key rules nothing) and every such card within the horizon counts, the section reader ignores fences (closed only by their own marker, an unclosed one reported), counts stray rows and stops at the last footer, and every BREACH row that does not fit is named.\n ${liveNote}`); + console.log(`✓ check-governed-merges --self-test: ${checked} assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 landing window — the QS-7 regression pin in both directions, the topological close beyond the budget, the unproven-boundary EDGE, the listed-or-INCOMPLETE invariant over every fixture, the escalating floors, per-repo --since-ref resolution and its named fallback, and the window words — the replay fixtures, the five-repo resolution incl. absent/wrong-origin/relocated checkouts, the attribution channel chain + its proxy-transport re-arm plan and its one named fallback line, the three-way attribution column (resolved · every-channel-failed · NOT LOOKED UP, and the note pointer that belongs to the middle one alone), the --test pre-arm predicate, the generated-artifact provenance exception — the register's invariants incl. the RETIRED #9866 row staying retired (no row lifts anything under .claude/**, and the audit workflow is plainly governed again), a row with no recompute failing closed, lift/reject/absent-provenance semantics, the untouched mixed-diff rule, named-rows-not-a-class, the #11084 generator co-edit fence in both directions incl. a row with no instrument tree, and its render words — the #11705 generator-owned rows inside skills/** (a genuine generated file passes, the same path hand-edited does not, a path no generator declares is hand-authored content, per-row fences, and the enumeration read from the real generator), the exit table, the report wording pins, and the #13307 remote-reachability leg — the pure freshness verdicts in every branch (unreachable · a remote naming no commit · an unreadable local tip · a mirror behind its remote · the two-unreadable-shas degenerate case that must never read as a match), the report words in both directions (an unreachable repo never renders the tick, a reachable one still says a MEASURED zero, and a row with no remote reading never claims one), and the REAL prober on local bare-repo fixtures over the file transport — a live remote, a deleted one, the --exit-code branch, and a mirror the remote moved past — the #13423 identity leg (an origin no slug parses from refuses, pure and end-to-end, with audited reachable only through a parsed matching slug), the #13424 per-repo window resolution (a sibling-only pin resolves in its own repo, the self-only control still errors, and the end-to-end sibling-pin sweep reports instead of exiting 1), the #13307 sweep-code provenance line in all three branches, and the #13836 attribution set — every refusal carries its precondition category on the row, in the footer, and in --json; the shallow-clone path in both directions; and the run-1-vs-run-2 flip reproduced on real fixtures with zero local writes — and the live battery's own PREREQUISITE, asked before a single case runs: an uninstalled checkout refuses with the repo-wide NOT-MEASURED code end to end instead of reporting a shrunken battery, while the floor still names the battery, by itself, for a case that genuinely stopped registering) — and the #15406 replay of PR #15284: the sweep still CLASSIFIES a certified regeneration as a governed merge and still lists it, its row now names the register row it does not recompute and where certification is recorded, and the --test head no longer reports a post-lift zero as if nothing had hit the register — and the #17003 derivation set: the Link walk that ends on rel=next rather than on a short page, a rename reaching the predicate as BOTH of its paths, a walk the PR's own count contradicts refusing rather than answering on a subset, a channel chosen once and never spliced mid-walk, every --branch leg on an injected git incl. the uncomputable merge base that REFUSES instead of falling back to two-dot, and the card's own reproduction run end to end on a real repo — a branch behind a main that has since touched a governed path answers GOVERNED two-dot and NOT governed three-dot, a rename out of a governed path is a hit only because the diff is taken --no-renames, the merge-base refusal prints no verdict at all, and the verdict is byte-identical through --branch and through --test on the same list. — and the #18055 banner set: the INCOMPLETE banner is BUILT on the attribution-failure path instead of throwing while it is built, it still returns EXIT_INCOMPLETE, the proxy hint renders from the plan the sweep now binds and stays empty both when the plan says no hint and when the incompleteness is not about attribution, and a real sweep whose every attribution channel fails prints the banner on STDERR and exits 2 — and the #19133 landing tiers: every register row carries H or S, Tier S is exactly the .claude/** row, a list is S only when every governed path is S (empty or ungoverned answers H), the verdict line and --json carry the tier while both tiers share exit 3, and the tier is recomputed on the lifted slice. — and the 2026-09-18 SIZE predicate: the ruled line, 3,000 since the maintainer's 2026-10-09 word, declared once and pinned on both sides and on the PR that prompted it; the number read off --pr's own GET (its absence a refusal), off --branch's --numstat on the range it lists (binary files at zero, a failed read a refusal), or off --additions/--deletions handed to --test (half a pair refused, the pair refused where the mode reads it itself); NOT MEASURED said on stdout when nothing read it; a certified regeneration lifting the path and not the size; and the verdict still ONE emitter — the governed code for either limb, byte-identical across --branch and --test on the same list and numbers. — and the #18989 guard set: the re-exec guard is the CALLER's name — the default is still this file's own, a caller that names its own guard is suppressed by that one alone, and the patrol's name does not silence this file any more — a suppressed run SPEAKS, naming the variable to unset, the 401 the silence would be read as and the proxy the request was supposed to take, while the Actions-runner leg stays inert and an already-flagged run is still answered by the FLAG; and the plan is declared a MIRROR pinned to its OWNER's source: the patrol's spelling, the patrol's own caller-guard parameter, and the module-scope await that is the measured REASON this is a copy rather than an import. — and the #19036 audit half: the sweep classifies on the SAME predicate the queue and the pre-check answer with (\`landsByHumanMerge\` on \`testVerdict\`), the size read LOCALLY off the landed diff by one \`git diff-tree --numstat\` per mainline commit that also lists its paths (byte-identical to the old \`--name-only\` list, a merge commit read against its first parent, a binary row at zero), so an oversized landing with NO governed path is an entry on the size limb alone — counted apart in the head, listed with the ⛔ SIZE row and the same attribution column, GitHub's pair printed beside the landed number only when it differs, exactly the threshold NOT listed, a governed AND oversized row carrying both limbs, a row classified with no size rendering as it did — and a REAL sweep over a fixture repo listing the over-by-one landing and not the at-threshold one, on stdout and in --json. — and the 2026-09-21 FORK predicate: a fork head (or a deleted fork repo) lands by human merge through the Tier H terminal with its own reason sentence, a same-repo head changes nothing on either tier, --test / --branch say NOT MEASURED for a head they cannot see, ZERO check runs read NOT MEASURED and never green, and both readings ride --pr's own GET. — and the closed argv: each mode reads a closed flag set and refuses every other on exit 1 (an unknown flag, another mode's flag, an equals spelling, a --repo, which prescribes the qualified --pr spelling), a bare --pr beside a PM_SWEEP_REPO naming another repository is refused with both qualified spellings, and the card's own invocation table replayed against a recording fake API: every refusal READS NOTHING, the qualified spelling answers from the repository it names, byte-identical with PM_SWEEP_REPO set. — and the #30718 rename-aware size: --branch and the sweep count a moved file by its \`-M\` numstat, as GitHub does (a 400-line move with one edit reads +1 / -1 over one file, a \`diff.renames=false\` config notwithstanding), while both PATH lists keep \`--no-renames\` and so still carry both paths. — and the weekly audit card's readings (#33814), each pinned with its control: a PR-less governed landing reads NOT MEASURED, a carried row names the state this run read it in, the body is fitted under the issue-body limit with its counts taken on the card, a close rules only when its event's actor is an authorized approver and it names no commit (an app object or an absent app key rules nothing) and every such card within the horizon counts, the section reader ignores fences (closed only by their own marker, an unclosed one reported), counts stray rows and stops at the last footer, and every BREACH row that does not fit is named. — and the git reader this file hands the guard's readers carries STDIN: on real git, `check-attr --stdin` answers each path it is handed, a moved path not routed `merge=os-regen` reads unexplained through `--pr`'s and the sweep's handoffs, and a read with no input keeps stdin ignored.\n ${liveNote}`); return SELF_TEST_VERDICT; } +// The two paths the stdin battery's fixture moves: one hand-written, one routed `merge=os-regen`. +const STDIN_FX_HAND = 'scripts/pm/x.mjs'; +const STDIN_FX_REGEN = 'gen/out.json'; + +/** + * A throwaway repository for the stdin battery: `main` seeds `.gitattributes` (routing `STDIN_FX_REGEN` to + * `merge=os-regen`) and both paths; a branch then commits `from` (an unrelated edit), `to` (both paths moved) and + * `regenOnly` (the generated path alone). Offline, on real git; `cleanup()` removes it. + */ +function buildStdinAttrFixture() { + const dir = mkdtempSync(join(tmpdir(), 'governed-merges-stdin-')); + const root = join(dir, 'repo'); + const g = (...rest) => execFileSync('git', ['-c', 'user.email=t@t.invalid', '-c', 'user.name=t', '-c', 'init.defaultBranch=main', '-c', 'commit.gpgsign=false', ...rest], + { cwd: existsSync(root) ? root : dir, encoding: 'utf8', env: gitFreeEnv(), stdio: ['ignore', 'pipe', 'pipe'] }); + const put = (rel, text) => { + mkdirSync(dirname(join(root, rel)), { recursive: true }); + writeFileSync(join(root, rel), text, 'utf8'); + }; + const commit = (msg) => { + g('add', '-A'); + g('commit', '-qm', msg); + return g('rev-parse', 'HEAD').trim(); + }; + g('init', '-q', root); + put('.gitattributes', `${STDIN_FX_REGEN} merge=os-regen\n`); + put(STDIN_FX_HAND, 'export const x = 1;\n'); + put(STDIN_FX_REGEN, '{"v":1}\n'); + put('README.md', 'seed\n'); + commit('chore: seed'); + g('checkout', '-qb', 'feature'); + put('README.md', 'seed\nfrom\n'); + const from = commit('docs: from'); + put(STDIN_FX_HAND, 'export const x = 2;\n'); + put(STDIN_FX_REGEN, '{"v":2}\n'); + const to = commit('feat: hand edit beside a regeneration'); + put(STDIN_FX_REGEN, '{"v":3}\n'); + const regenOnly = commit('chore: regenerate'); + return { root, from, to, regenOnly, cleanup: () => rmSync(dir, { recursive: true, force: true }) }; +} + /** The exit code `--test` would return for a path list in `repo` — pinned without spawning. */ function runTestModeExitFor(paths, repo, size = null, approval = null) { if (paths.length === 0) return EXIT_CANNOT_SWEEP; From 4d8079f9fbb2d775415e54553e499c6b80c9c34e Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 24 Nov 2026 18:02:38 +0000 Subject: [PATCH 2/2] fix(pm): escape the backticks in check-governed-merges' self-test summary line Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_01J8VVAm5Tp3iBkiJk6nMwa5 --- scripts/pm/check-governed-merges.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pm/check-governed-merges.mjs b/scripts/pm/check-governed-merges.mjs index 38e9ec21049..aced04457fc 100644 --- a/scripts/pm/check-governed-merges.mjs +++ b/scripts/pm/check-governed-merges.mjs @@ -11790,7 +11790,7 @@ async function selfTest() { for (const failure of failures) console.error(` • ${failure}`); process.exit(1); } - console.log(`✓ check-governed-merges --self-test: ${checked} assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 landing window — the QS-7 regression pin in both directions, the topological close beyond the budget, the unproven-boundary EDGE, the listed-or-INCOMPLETE invariant over every fixture, the escalating floors, per-repo --since-ref resolution and its named fallback, and the window words — the replay fixtures, the five-repo resolution incl. absent/wrong-origin/relocated checkouts, the attribution channel chain + its proxy-transport re-arm plan and its one named fallback line, the three-way attribution column (resolved · every-channel-failed · NOT LOOKED UP, and the note pointer that belongs to the middle one alone), the --test pre-arm predicate, the generated-artifact provenance exception — the register's invariants incl. the RETIRED #9866 row staying retired (no row lifts anything under .claude/**, and the audit workflow is plainly governed again), a row with no recompute failing closed, lift/reject/absent-provenance semantics, the untouched mixed-diff rule, named-rows-not-a-class, the #11084 generator co-edit fence in both directions incl. a row with no instrument tree, and its render words — the #11705 generator-owned rows inside skills/** (a genuine generated file passes, the same path hand-edited does not, a path no generator declares is hand-authored content, per-row fences, and the enumeration read from the real generator), the exit table, the report wording pins, and the #13307 remote-reachability leg — the pure freshness verdicts in every branch (unreachable · a remote naming no commit · an unreadable local tip · a mirror behind its remote · the two-unreadable-shas degenerate case that must never read as a match), the report words in both directions (an unreachable repo never renders the tick, a reachable one still says a MEASURED zero, and a row with no remote reading never claims one), and the REAL prober on local bare-repo fixtures over the file transport — a live remote, a deleted one, the --exit-code branch, and a mirror the remote moved past — the #13423 identity leg (an origin no slug parses from refuses, pure and end-to-end, with audited reachable only through a parsed matching slug), the #13424 per-repo window resolution (a sibling-only pin resolves in its own repo, the self-only control still errors, and the end-to-end sibling-pin sweep reports instead of exiting 1), the #13307 sweep-code provenance line in all three branches, and the #13836 attribution set — every refusal carries its precondition category on the row, in the footer, and in --json; the shallow-clone path in both directions; and the run-1-vs-run-2 flip reproduced on real fixtures with zero local writes — and the live battery's own PREREQUISITE, asked before a single case runs: an uninstalled checkout refuses with the repo-wide NOT-MEASURED code end to end instead of reporting a shrunken battery, while the floor still names the battery, by itself, for a case that genuinely stopped registering) — and the #15406 replay of PR #15284: the sweep still CLASSIFIES a certified regeneration as a governed merge and still lists it, its row now names the register row it does not recompute and where certification is recorded, and the --test head no longer reports a post-lift zero as if nothing had hit the register — and the #17003 derivation set: the Link walk that ends on rel=next rather than on a short page, a rename reaching the predicate as BOTH of its paths, a walk the PR's own count contradicts refusing rather than answering on a subset, a channel chosen once and never spliced mid-walk, every --branch leg on an injected git incl. the uncomputable merge base that REFUSES instead of falling back to two-dot, and the card's own reproduction run end to end on a real repo — a branch behind a main that has since touched a governed path answers GOVERNED two-dot and NOT governed three-dot, a rename out of a governed path is a hit only because the diff is taken --no-renames, the merge-base refusal prints no verdict at all, and the verdict is byte-identical through --branch and through --test on the same list. — and the #18055 banner set: the INCOMPLETE banner is BUILT on the attribution-failure path instead of throwing while it is built, it still returns EXIT_INCOMPLETE, the proxy hint renders from the plan the sweep now binds and stays empty both when the plan says no hint and when the incompleteness is not about attribution, and a real sweep whose every attribution channel fails prints the banner on STDERR and exits 2 — and the #19133 landing tiers: every register row carries H or S, Tier S is exactly the .claude/** row, a list is S only when every governed path is S (empty or ungoverned answers H), the verdict line and --json carry the tier while both tiers share exit 3, and the tier is recomputed on the lifted slice. — and the 2026-09-18 SIZE predicate: the ruled line, 3,000 since the maintainer's 2026-10-09 word, declared once and pinned on both sides and on the PR that prompted it; the number read off --pr's own GET (its absence a refusal), off --branch's --numstat on the range it lists (binary files at zero, a failed read a refusal), or off --additions/--deletions handed to --test (half a pair refused, the pair refused where the mode reads it itself); NOT MEASURED said on stdout when nothing read it; a certified regeneration lifting the path and not the size; and the verdict still ONE emitter — the governed code for either limb, byte-identical across --branch and --test on the same list and numbers. — and the #18989 guard set: the re-exec guard is the CALLER's name — the default is still this file's own, a caller that names its own guard is suppressed by that one alone, and the patrol's name does not silence this file any more — a suppressed run SPEAKS, naming the variable to unset, the 401 the silence would be read as and the proxy the request was supposed to take, while the Actions-runner leg stays inert and an already-flagged run is still answered by the FLAG; and the plan is declared a MIRROR pinned to its OWNER's source: the patrol's spelling, the patrol's own caller-guard parameter, and the module-scope await that is the measured REASON this is a copy rather than an import. — and the #19036 audit half: the sweep classifies on the SAME predicate the queue and the pre-check answer with (\`landsByHumanMerge\` on \`testVerdict\`), the size read LOCALLY off the landed diff by one \`git diff-tree --numstat\` per mainline commit that also lists its paths (byte-identical to the old \`--name-only\` list, a merge commit read against its first parent, a binary row at zero), so an oversized landing with NO governed path is an entry on the size limb alone — counted apart in the head, listed with the ⛔ SIZE row and the same attribution column, GitHub's pair printed beside the landed number only when it differs, exactly the threshold NOT listed, a governed AND oversized row carrying both limbs, a row classified with no size rendering as it did — and a REAL sweep over a fixture repo listing the over-by-one landing and not the at-threshold one, on stdout and in --json. — and the 2026-09-21 FORK predicate: a fork head (or a deleted fork repo) lands by human merge through the Tier H terminal with its own reason sentence, a same-repo head changes nothing on either tier, --test / --branch say NOT MEASURED for a head they cannot see, ZERO check runs read NOT MEASURED and never green, and both readings ride --pr's own GET. — and the closed argv: each mode reads a closed flag set and refuses every other on exit 1 (an unknown flag, another mode's flag, an equals spelling, a --repo, which prescribes the qualified --pr spelling), a bare --pr beside a PM_SWEEP_REPO naming another repository is refused with both qualified spellings, and the card's own invocation table replayed against a recording fake API: every refusal READS NOTHING, the qualified spelling answers from the repository it names, byte-identical with PM_SWEEP_REPO set. — and the #30718 rename-aware size: --branch and the sweep count a moved file by its \`-M\` numstat, as GitHub does (a 400-line move with one edit reads +1 / -1 over one file, a \`diff.renames=false\` config notwithstanding), while both PATH lists keep \`--no-renames\` and so still carry both paths. — and the weekly audit card's readings (#33814), each pinned with its control: a PR-less governed landing reads NOT MEASURED, a carried row names the state this run read it in, the body is fitted under the issue-body limit with its counts taken on the card, a close rules only when its event's actor is an authorized approver and it names no commit (an app object or an absent app key rules nothing) and every such card within the horizon counts, the section reader ignores fences (closed only by their own marker, an unclosed one reported), counts stray rows and stops at the last footer, and every BREACH row that does not fit is named. — and the git reader this file hands the guard's readers carries STDIN: on real git, `check-attr --stdin` answers each path it is handed, a moved path not routed `merge=os-regen` reads unexplained through `--pr`'s and the sweep's handoffs, and a read with no input keeps stdin ignored.\n ${liveNote}`); + console.log(`✓ check-governed-merges --self-test: ${checked} assertions (the unified governed predicate + near misses, subject→PR spellings, window parsing, the #12633 landing window — the QS-7 regression pin in both directions, the topological close beyond the budget, the unproven-boundary EDGE, the listed-or-INCOMPLETE invariant over every fixture, the escalating floors, per-repo --since-ref resolution and its named fallback, and the window words — the replay fixtures, the five-repo resolution incl. absent/wrong-origin/relocated checkouts, the attribution channel chain + its proxy-transport re-arm plan and its one named fallback line, the three-way attribution column (resolved · every-channel-failed · NOT LOOKED UP, and the note pointer that belongs to the middle one alone), the --test pre-arm predicate, the generated-artifact provenance exception — the register's invariants incl. the RETIRED #9866 row staying retired (no row lifts anything under .claude/**, and the audit workflow is plainly governed again), a row with no recompute failing closed, lift/reject/absent-provenance semantics, the untouched mixed-diff rule, named-rows-not-a-class, the #11084 generator co-edit fence in both directions incl. a row with no instrument tree, and its render words — the #11705 generator-owned rows inside skills/** (a genuine generated file passes, the same path hand-edited does not, a path no generator declares is hand-authored content, per-row fences, and the enumeration read from the real generator), the exit table, the report wording pins, and the #13307 remote-reachability leg — the pure freshness verdicts in every branch (unreachable · a remote naming no commit · an unreadable local tip · a mirror behind its remote · the two-unreadable-shas degenerate case that must never read as a match), the report words in both directions (an unreachable repo never renders the tick, a reachable one still says a MEASURED zero, and a row with no remote reading never claims one), and the REAL prober on local bare-repo fixtures over the file transport — a live remote, a deleted one, the --exit-code branch, and a mirror the remote moved past — the #13423 identity leg (an origin no slug parses from refuses, pure and end-to-end, with audited reachable only through a parsed matching slug), the #13424 per-repo window resolution (a sibling-only pin resolves in its own repo, the self-only control still errors, and the end-to-end sibling-pin sweep reports instead of exiting 1), the #13307 sweep-code provenance line in all three branches, and the #13836 attribution set — every refusal carries its precondition category on the row, in the footer, and in --json; the shallow-clone path in both directions; and the run-1-vs-run-2 flip reproduced on real fixtures with zero local writes — and the live battery's own PREREQUISITE, asked before a single case runs: an uninstalled checkout refuses with the repo-wide NOT-MEASURED code end to end instead of reporting a shrunken battery, while the floor still names the battery, by itself, for a case that genuinely stopped registering) — and the #15406 replay of PR #15284: the sweep still CLASSIFIES a certified regeneration as a governed merge and still lists it, its row now names the register row it does not recompute and where certification is recorded, and the --test head no longer reports a post-lift zero as if nothing had hit the register — and the #17003 derivation set: the Link walk that ends on rel=next rather than on a short page, a rename reaching the predicate as BOTH of its paths, a walk the PR's own count contradicts refusing rather than answering on a subset, a channel chosen once and never spliced mid-walk, every --branch leg on an injected git incl. the uncomputable merge base that REFUSES instead of falling back to two-dot, and the card's own reproduction run end to end on a real repo — a branch behind a main that has since touched a governed path answers GOVERNED two-dot and NOT governed three-dot, a rename out of a governed path is a hit only because the diff is taken --no-renames, the merge-base refusal prints no verdict at all, and the verdict is byte-identical through --branch and through --test on the same list. — and the #18055 banner set: the INCOMPLETE banner is BUILT on the attribution-failure path instead of throwing while it is built, it still returns EXIT_INCOMPLETE, the proxy hint renders from the plan the sweep now binds and stays empty both when the plan says no hint and when the incompleteness is not about attribution, and a real sweep whose every attribution channel fails prints the banner on STDERR and exits 2 — and the #19133 landing tiers: every register row carries H or S, Tier S is exactly the .claude/** row, a list is S only when every governed path is S (empty or ungoverned answers H), the verdict line and --json carry the tier while both tiers share exit 3, and the tier is recomputed on the lifted slice. — and the 2026-09-18 SIZE predicate: the ruled line, 3,000 since the maintainer's 2026-10-09 word, declared once and pinned on both sides and on the PR that prompted it; the number read off --pr's own GET (its absence a refusal), off --branch's --numstat on the range it lists (binary files at zero, a failed read a refusal), or off --additions/--deletions handed to --test (half a pair refused, the pair refused where the mode reads it itself); NOT MEASURED said on stdout when nothing read it; a certified regeneration lifting the path and not the size; and the verdict still ONE emitter — the governed code for either limb, byte-identical across --branch and --test on the same list and numbers. — and the #18989 guard set: the re-exec guard is the CALLER's name — the default is still this file's own, a caller that names its own guard is suppressed by that one alone, and the patrol's name does not silence this file any more — a suppressed run SPEAKS, naming the variable to unset, the 401 the silence would be read as and the proxy the request was supposed to take, while the Actions-runner leg stays inert and an already-flagged run is still answered by the FLAG; and the plan is declared a MIRROR pinned to its OWNER's source: the patrol's spelling, the patrol's own caller-guard parameter, and the module-scope await that is the measured REASON this is a copy rather than an import. — and the #19036 audit half: the sweep classifies on the SAME predicate the queue and the pre-check answer with (\`landsByHumanMerge\` on \`testVerdict\`), the size read LOCALLY off the landed diff by one \`git diff-tree --numstat\` per mainline commit that also lists its paths (byte-identical to the old \`--name-only\` list, a merge commit read against its first parent, a binary row at zero), so an oversized landing with NO governed path is an entry on the size limb alone — counted apart in the head, listed with the ⛔ SIZE row and the same attribution column, GitHub's pair printed beside the landed number only when it differs, exactly the threshold NOT listed, a governed AND oversized row carrying both limbs, a row classified with no size rendering as it did — and a REAL sweep over a fixture repo listing the over-by-one landing and not the at-threshold one, on stdout and in --json. — and the 2026-09-21 FORK predicate: a fork head (or a deleted fork repo) lands by human merge through the Tier H terminal with its own reason sentence, a same-repo head changes nothing on either tier, --test / --branch say NOT MEASURED for a head they cannot see, ZERO check runs read NOT MEASURED and never green, and both readings ride --pr's own GET. — and the closed argv: each mode reads a closed flag set and refuses every other on exit 1 (an unknown flag, another mode's flag, an equals spelling, a --repo, which prescribes the qualified --pr spelling), a bare --pr beside a PM_SWEEP_REPO naming another repository is refused with both qualified spellings, and the card's own invocation table replayed against a recording fake API: every refusal READS NOTHING, the qualified spelling answers from the repository it names, byte-identical with PM_SWEEP_REPO set. — and the #30718 rename-aware size: --branch and the sweep count a moved file by its \`-M\` numstat, as GitHub does (a 400-line move with one edit reads +1 / -1 over one file, a \`diff.renames=false\` config notwithstanding), while both PATH lists keep \`--no-renames\` and so still carry both paths. — and the weekly audit card's readings (#33814), each pinned with its control: a PR-less governed landing reads NOT MEASURED, a carried row names the state this run read it in, the body is fitted under the issue-body limit with its counts taken on the card, a close rules only when its event's actor is an authorized approver and it names no commit (an app object or an absent app key rules nothing) and every such card within the horizon counts, the section reader ignores fences (closed only by their own marker, an unclosed one reported), counts stray rows and stops at the last footer, and every BREACH row that does not fit is named. — and the git reader this file hands the guard's readers carries STDIN: on real git, \`check-attr --stdin\` answers each path it is handed, a moved path not routed \`merge=os-regen\` reads unexplained through \`--pr\`'s and the sweep's handoffs, and a read with no input keeps stdin ignored.\n ${liveNote}`); return SELF_TEST_VERDICT; }