Uh oh!
There was an error while loading. Please reload this page.
feat(pm): provenance-aware exception for the docs-audit --write artifact in the governed-fence predicate - #11078
Merged
Conversation
…act in the governed-fence predicate The --test predicate lifts .claude/workflows/docs-accuracy-audit.js from the governed hit set only when the tree's copy byte-equals the generator output recomputed on that same tree (replaceBlock(baseFile, docs derived from the tree under test)) — never a stored baseline, no shape heuristics, fail closed on every unverifiable input; the mixed-diff rule and every other surface judgment are unchanged, and the post-merge sweep still lists every entry. Maintainer rulings on #9866: 「10277 同意 C」 (2026-08-20), re-confirmed 「A:按方案 2(最新裁定)」 (2026-08-22). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MsbKEG4LtERSLaDrbehM3e
os-zhuang
marked this pull request as ready for review
August 22, 2026 15:57
This was referenced Aug 22, 2026
Contributor
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 32583284279 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 24, 2026
os-zhuang pushed a commit
that referenced
this pull request
Aug 25, 2026
Implements the maintainer's 2026-08-25 ruling on #11705 (option A) by EXTENDING the provenance-aware register PR #11078 built in `scripts/pm/check-governed-merges.mjs` — no second mechanism. A row is a GENERATOR, not a path exemption. A hit lifts only when both halves are the generator's own answer on the tree under test: it declared the path among its outputs (`--generated-manifest`, written from the same map the write disposition uses), and its own `--check` reported no drift. Hand-authored `skills/**` content is not on the register at all. - `packages/spec/scripts/lib/generated-output.ts`: the shared sink declares its output set on demand, so the register never restates a path list. - `scripts/pm/check-governed-merges.mjs`: two ruled rows (gen:skill-refs, gen:react-blocks), the shared recompute driver, per-row co-edit fences. - `scripts/pm/check-governed-queue-guard.mjs`: consumes the shared membership test and driver instead of its own copy. - `.claude/skills/pm-dispatch/references/state-machine.md`: one-line note. Closes#11705
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes#9866
What
Implements the maintainer-ruled shape 2 — the provenance-aware exception — in
scripts/pm/check-governed-merges.mjs(rulings on the card, verbatim: 「10277 同意 C」 2026-08-20, re-confirmed over the same day's earlier shape-1 ruling: 「A:按方案 2(最新裁定)」 2026-08-22).The
--testpredicate now lifts exactly one path —.claude/workflows/docs-accuracy-audit.js— from the governed hit set, and only when that file's diff byte-equals whatnode scripts/docs-audit/check-audit-scope.mjs --writeproduces on the tree under test: the tree's copy must equalreplaceBlock(baseFileAtMergeBase, docsDerivedFromThisTree), computed with the generator's own exportedreplaceBlockand this tree's own docs derivation. So a page-adding docs PR whose only.claude/**touch is the gate's own regeneration no longer forks to a human merge, while every hand edit to the same file still does.The four ruled constraints, where each lands
recomputeDocsAuditProvenanceproduces the expected bytes at verdict time from the tree under test (git merge-base origin/main HEAD→git showfor the base file;affected-docs.mjs --all --jsonon this tree for the derivation; the generator's ownreplaceBlockfor the splice). Nothing stored or cached is consulted.GENERATED_SURFACE_EXCEPTIONSis structurally a per-surface list, seeded with only this entry per the ruling;GOVERNED_SURFACESand every other judgment are unchanged (a verdict that never consults the exception renders byte-identically, pinned).renderBlock/replaceBlock(pure regen passes · in-block hand edit rejects · out-of-block edit rejects · mixed regen+hand-edit rejects), plus byte-exactness on reorder, fail-closed on every unverifiable input (no base version / unreadable file / empty derivation / splice failure / absent provenance), single-file-not-a-class (a sibling.claude/workflows/*.jsnever consults provenance), and the untouched mixed-diff rule: a hit on any OTHER governed path still forks the whole PR.Fail-closed is the default everywhere: if the recompute cannot run in the caller's environment (no git, no base, generator failure), the path simply stays governed with a stated reason — the fence holds; nothing degrades to a baseline compare.
Deliberately unchanged: the post-merge SWEEP still lists a pure-regeneration merge. Under-enumeration is the one direction the sweep must never be wrong in (#9902), and recomputing a generator against historical trees is a different machine — the exception narrows the pre-merge predicate, not the audit trail.
Verification (all at
7dd5db4)node scripts/pm/check-governed-merges.mjs --self-test→✓ check-governed-merges --self-test: 119 assertions (…), exit 0.=== true→!== false, confirmed on disk by marker grep 1/0 before running): self-test exit 1, failing assertionabsent-provenance-fails-closed-never-open; restore leg confirmed (diff 0 lines, marker count 0, 119 green again). No build step exists for these scripts; the mutation/restore proof is the on-disk grep.--write, restored via trap after each leg):+1/-0regeneration (the measured incident shape) →--testexit 0,PURE REGENERATIONline;did NOT lift … differs from the generator output recomputed on this tree;.claude/skills/pm-dispatch/SKILL.md→ exit 3 (workflow lifted, PR still governed).--test scripts/pm/check-governed-merges.mjs→0 of 1 path(s) hit the register … ✅ NOT governed, exit 0.dispatch-gates.mjs, no paths passed — change set from merge base):check:cross-package-test-inputs·check:entry-guard·check:parse-guard·check:pm-governed-merges·check-ci-filter-parity.mjsall exit 0; plus card-adjacentcheck:pm-governed-prose(28 self-test cases + 2 surfaces OK),check:nul-bytes(OK, 6402 files), and the generator's owncheck-audit-scope.mjs --self-test(24 cases) + verify mode (in sync, 189 docs) — all exit 0.Scripts-only tooling change; releases nothing —
skip-changesetapplies.Generated by Claude Code
Generated by Claude Code