scripts/check-pr-fully-clean.py hard-codes Morrison-Lab/ai-config at line 57 (repos/Morrison-Lab/ai-config/commits/{sha}/check-runs) and takes no repo argument. Passing -R owner/repo is silently ignored, so running it against another repo's PR number answers about this repo's PR of that number.
Measured 2026-08-10, asking about Morrison-Lab/gha#445:
$ python3 scripts/check-pr-fully-clean.py 445 -R Morrison-Lab/gha
PR #445 (chore/lint-markdown-437): state=MERGED, HEAD=fe7a3100
...
RuntimeError: ... gh: No commit found for SHA: fe7a310054d43b20ffd8a37f07ac3849a9c22fa6 (HTTP 422)
gha#445 is feat/phi-study-id-detector and was open at the time. ai-config#445 is chore/lint-markdown-437 and is merged.
The crash is luck, not a guard. It only happened because ai-config's HEAD SHA does not exist in gha. A PR number whose two repos' SHAs both resolve --- or any invocation where the script's later steps tolerate the mismatch --- yields a clean, confidently wrong verdict. The only tell is the branch name in the first line of output, which a caller has no reason to read when they believe they named the repo.
Why this matters beyond a missing flag. shared/workflow/fully-clean.md calls this script "this corpus's verdict authority" and ardi mandates it, while hooks/no-handrolled-verdict-parse.py refuses a hand-rolled verdict grep until this script has answered for that PR. So in any repo other than this one, the corpus points sessions at an instrument that cannot answer, and a guard discourages the correct fallback. That is the over-broad-discharge shape algorithmatize-checks already describes: the guard goes quiet, and quiet reads as compliance.
Proposed fix
- Add
-R/--repo, defaulting to the current checkout's gh repo view --json nameWithOwner rather than to a literal.
- Thread it through every hard-coded
Morrison-Lab/ai-config occurrence --- grep -c 'Morrison-Lab/ai-config' scripts/check-pr-fully-clean.py reports 4, of which line 57 is the load-bearing one and the rest are prose citations, so derive the set rather than fixing the one line.
- Fail loudly on ambiguity rather than defaulting: if the cwd is not a git repo and no
-R is given, exit non-zero naming the problem, per fail-fast. Defaulting to this repo is what makes the current behaviour silent.
- Regression test: a PR number valid in two repos returns different verdicts for each, and is seen to fail against the pre-fix script.
Meanwhile the fallback outside this repo is the hand parse fully-clean.md documents --- select on the **Claude finished body marker, take the last ### Verdict heading --- which is what no-handrolled-verdict-parse.py's ALLOW_HANDROLLED_VERDICT_PARSE=1 escape exists for.
Found while driving Morrison-Lab/gha#445 and ucdavis/bcs#615 from a bcs session.
scripts/check-pr-fully-clean.pyhard-codesMorrison-Lab/ai-configat line 57 (repos/Morrison-Lab/ai-config/commits/{sha}/check-runs) and takes no repo argument. Passing-R owner/repois silently ignored, so running it against another repo's PR number answers about this repo's PR of that number.Measured 2026-08-10, asking about
Morrison-Lab/gha#445:gha#445 is
feat/phi-study-id-detectorand was open at the time. ai-config#445 ischore/lint-markdown-437and is merged.The crash is luck, not a guard. It only happened because ai-config's HEAD SHA does not exist in gha. A PR number whose two repos' SHAs both resolve --- or any invocation where the script's later steps tolerate the mismatch --- yields a clean, confidently wrong verdict. The only tell is the branch name in the first line of output, which a caller has no reason to read when they believe they named the repo.
Why this matters beyond a missing flag.
shared/workflow/fully-clean.mdcalls this script "this corpus's verdict authority" andardimandates it, whilehooks/no-handrolled-verdict-parse.pyrefuses a hand-rolled verdict grep until this script has answered for that PR. So in any repo other than this one, the corpus points sessions at an instrument that cannot answer, and a guard discourages the correct fallback. That is the over-broad-discharge shapealgorithmatize-checksalready describes: the guard goes quiet, and quiet reads as compliance.Proposed fix
-R/--repo, defaulting to the current checkout'sgh repo view --json nameWithOwnerrather than to a literal.Morrison-Lab/ai-configoccurrence ---grep -c 'Morrison-Lab/ai-config' scripts/check-pr-fully-clean.pyreports 4, of which line 57 is the load-bearing one and the rest are prose citations, so derive the set rather than fixing the one line.-Ris given, exit non-zero naming the problem, perfail-fast. Defaulting to this repo is what makes the current behaviour silent.Meanwhile the fallback outside this repo is the hand parse
fully-clean.mddocuments --- select on the**Claude finishedbody marker, take the last### Verdictheading --- which is whatno-handrolled-verdict-parse.py'sALLOW_HANDROLLED_VERDICT_PARSE=1escape exists for.Found while driving Morrison-Lab/gha#445 and ucdavis/bcs#615 from a bcs session.