Commit f7fd5c5
tooling(pm): the half-state patrol reports a governed PR nobody was asked to review (H43) (#15536)
* tooling(pm): the half-state patrol reports a governed PR nobody was asked to review (H43)
A governed-surface PR could sit open for days with no review request or
assignment to either `GOVERNED_APPROVERS` member, and no mechanical reading
covered that state: the queue guard asks about an approval at enqueue time, the
governed-merge audit is post-hoc, and every label-keyed row in this patrol is
blind to pull requests. Seven of ten open governed PRs across the four repos
were missing `os-zhuang` and two had asked nobody, until the maintainer asked
why no review requests were showing up.
H43 is one report-only row over the changed-file pages H36 already fetches, so
it buys zero extra file requests. Coverage is the union of `requested_reviewers`,
`assignees` and accounts that have already SUBMITTED a review — the third leg is
load-bearing because GitHub drops a pending request the moment its review lands,
and the second encodes the documented author-identity fallback (assign the
approver who cannot be requested, request the other). Authorship alone is never
read as coverage: that assumption is what produced zero.
`GOVERNED_SURFACES`/`governedPathsIn` and `GOVERNED_APPROVERS` are imported, not
restated, and loaded LAZILY: this file is copied verbatim into sibling repos that
carry no governed pair, where a static import would end the whole patrol at
module load instead of degrading one row. An absent register reports itself as
NOT MEASURED with the remedy, and every other row is untouched.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
* tooling(pm): forward H43's coverage counters into the summary contract
The first live sweep of the new row rendered "0 of the open PR(s) whose
changed-file page was read hit the governed register … 0 of 0" while filing FOUR
H43 findings. The counters were computed on `stats` and never copied into
`counts`, which is exactly the failure `SWEEP_COUNT_KEYS` was enumerated to end:
`counts.x ?? 0` renders a missing key and a genuine zero identically, so the one
mechanism whose job is to prove a pass examined something can go quiet with no
evidence that it did.
`governedRegisterReason` rides the same list although it is a string, not a
counter — without it a NOT MEASURED row would render as `0 of 0`, which is the
same confusion one layer down. A self-test case now pins all four against the
contract rather than against a rendered sentence.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 70c9399 commit f7fd5c5
1 file changed
Lines changed: 456 additions & 1 deletion
0 commit comments