Skip to content

docs(governed-guard): replace the retired sha pin with the ruled approval-record predicate - #7616

Merged
os-zhuang merged 1 commit into
mainfrom
claude/issue-7605-guard-docs-unpinned-approval
Sep 4, 2026
Merged

docs(governed-guard): replace the retired sha pin with the ruled approval-record predicate#7616
os-zhuang merged 1 commit into
mainfrom
claude/issue-7605-guard-docs-unpinned-approval

Conversation

@claude

@claude claude Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #7605

Two documents still described the governed-queue guard's sha pin, which PR #7606 retired when it executed the maintainer's 2026-09-04 ruling — quoted verbatim and untranslated, because rewriting a ruling is rewriting the ruling:

「你的门禁有问题,只需要有人工批准记录就行,不需要卡最新的提交。」

Both stale passages failed in the worst direction: a seat reads them, believes an approval goes stale on the next push, and re-requests an approval the gate does not want.

What changed

Both passages now copy the guard's own header sentences rather than paraphrasing them, so the three places cannot drift apart again. The source is scripts/check-governed-queue-guard.mjs at 0d8fd7c:

  • § "What satisfies the queue leg" — L52-59 (the predicate: a latest-decisive APPROVED review by an account in GOVERNED_APPROVERS, on whichever commit it was left; dismissed, superseded, unauthorised and unreadable all still refuse).
  • L66 — the ruling, copied byte-for-byte out of that line so both files and the header carry identical bytes.
  • L83-87 — the accepted cost, stated once in each file: a push after an approval is no longer re-reviewed by this gate.

AGENTS.md (受管面 section). The clause that read 「它要求 GOVERNED_APPROVERS(os-zhuang / hotlong)的 APPROVED review 钉在当前 head」 now states the ruled predicate, the refusals that survive, the ruling, and the accepted cost. Passage language and voice unchanged; no other sentence touched.

content/docs/guide/ci-cd-pipeline.md (§ Governed Surface Guard). The three consecutive claims went stale together — that the review's commit_id must equal the current head sha, that "the sha pin is what makes the approval an approval of something", and that "a push after the approval goes stale and reopens the refusal". Replaced with the header's predicate plus the accepted-cost sentence. The workflow-inventory table row near L43 stated the same pin and is corrected to match.

Left alone, deliberately: the section's cost paragraph. It claims only that a diff touching no governed path costs zero GitHub API calls, which is still true — it never stated the governed-PR count that PR #7606 changed. Verified in the source rather than assumed: runGuard early-returns with apiCalls: 0 when nothing is governed, takes one fetchReviews per governed pull request, and has no head-read parameter at all (L677: "There is no fetchPullHead parameter any more"). The guard's own self-test prints the same reading — "the retired head read measured ABSENT at one lookup per governed PR".

Why this stays a DRAFT

AGENTS.md is a governed surface. node scripts/check-governed-queue-guard.mjs --test AGENTS.md content/docs/guide/ci-cd-pipeline.md answers GOVERNED, exit 3: one governed path governs the whole pull request. This pull request is parked as a draft for a human merge — not flipped ready, not enqueued, no auto-merge, no reviewer requested from the seat. One pull request for both files because they carry one fact; the guide is not governed but rides with the governed file.

Verification (all at 8d78dbd, working tree clean)

Check Verdict
pnpm lint (whole repo, 47 tasks) 0 errors, 2878 warnings — warnings pre-existing, unrelated to this diff
pnpm check:control-bytes OK (scanned 6228 tracked text file(s); skipped 85 binary)
pnpm check:governed-queue-guard OK ... 132 cases pass
pnpm check:doc-fences every TypeScript block in 227 documents fenced correctly
pnpm check:doc-snippets 452 of 452 block(s) judged, 0 failed (after building its --build-filter closure, 34 tasks)
pnpm check:doc-types Every documented component type is registered.
pnpm check:docs-route-closure all three verdicts green
pnpm check:skills-paths 88/89 stated path(s) resolve
pnpm check:shell-escape-residue OK (5/5 root(s) resolved ... 0 occurrence(s) outside a fence)
node scripts/check-doc-links.mjs Links are valid across 17 scan roots.
node scripts/check-changeset-presence.mjs No source or published contract of a released package changed in this range, so no changeset is owed. — verdict followed, no changeset added
pin tests: ci-cd-pipeline-doc, check-governed-queue-guard, merge-queue-reporting 3 passed (3), 69 passed (69)

The three pin tests are the suites that read the two edited files, run in addition to the gate families the paths reach.

🤖 Generated with Claude Code

https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox


Generated by Claude Code

…oval-record predicate

The merge-queue leg stopped reading `commit_id` when the maintainer's
2026-09-04 ruling landed; two documents still described the pin, in the
worst direction — a seat reads them, believes an approval goes stale on
the next push, and re-requests an approval the gate does not want.

Both passages now copy the guard header's own sentences (§ "What
satisfies the queue leg", and the accepted-cost paragraph) rather than
paraphrasing them, so the three places cannot drift apart again.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
@os-zhuang
os-zhuang marked this pull request as ready for review September 4, 2026 10:44
@os-zhuang
os-zhuang added this pull request to the merge queue Sep 4, 2026
Merged via the queue into main with commit 11edab8 Sep 4, 2026
30 checks passed
@os-zhuang
os-zhuang deleted the claude/issue-7605-guard-docs-unpinned-approval branch September 4, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two docs still describe the governed-queue guard's retired sha pin — AGENTS.md and content/docs/guide/ci-cd-pipeline.md

2 participants