Repository navigation
fix(admission): shared review-disposition verifier for merge-ready and final eligibility (#8157) - #12503
fix(admission): shared review-disposition verifier for merge-ready and final eligibility (#8157)#12503EffortlessSteven wants to merge 1 commit into
Conversation
…8157) Add a shared Python disposition verifier and gate script consumed from immutable base-trusted admission on merge-ready request and again at final eligibility. Narrative, quoted, and superseded prose no longer satisfy attestation; explicit disposition fields and column-zero markers remain valid. Advances #8157. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 51 minutes. View limit details
|
|
Disposition at head 4ed9588 vs main a31e411: still valid (#8157 open, main still has the narrative-token jq predicate), merges cleanly with main, and its stated hold (#12466/#12496) is cleared (both merged 2026-11-02). It is nevertheless not landable as built: a bootstrap defect. For Unblocking work (a workflow/Rust-build change I cannot iterate here): split into two landings. (1) Land the verifier, shell script, Rust test, allowlist rows and the self-test hook only, with no routed-rust.yml wiring and no new bundle-loop names; (2) a follow-up wires request-time and final-eligibility use after the files exist on main. Also change the Generated by Claude Code |
| author=$(jq -r '.user.login' <<<"$pr") | ||
| fi | ||
| reviews=$(gh api --paginate "repos/$repository/pulls/$pr_number/reviews?per_page=100") | ||
| jq -cs '.[0]' <<<"$reviews" | python3 "$trusted_root/.github/actions/pr-candidate-admission/review_disposition.py" \ |
There was a problem hiding this comment.
gh api --paginate prints each page as a separate JSON array. jq -cs '.[0]' slurps them into an array of arrays and keeps only the first page, so every review beyond the first 100 is dropped. Reviews come back oldest-first, so the newest ones are lost. A later CHANGES_REQUESTED, a superseding negative COMMENT, or a newer APPROVED can be missed, and the gate can admit or refuse on stale data. Merge all pages instead:
jq -cs 'add // []' <<<"$reviews" | python3 ...| jq -cs '.[0]' <<<"$reviews" | python3 "$trusted_root/.github/actions/pr-candidate-admission/review_disposition.py" \ | |
| jq -cs 'add // []' <<<"$reviews" | python3 "$trusted_root/.github/actions/pr-candidate-admission/review_disposition.py" \ | |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
…ng (#8157) (#12809) * feat(admission): add shared review-disposition verifier and test (#8157) First landing of the split of #12503: verifier script, repo-policy test, process allowlist and changelog fragment. No workflow wiring; that follows once these files exist on main so the base-SHA trusted bundle contains them. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmppWYJxfu8vmR6jBq8 * fix(admission): harden review-disposition verifier per review of record (#8157) Require the whole first line to be the marker, refuse contradicting disposition/readiness text on any later line (indented, quoted, bold), refuse unclosed fences and HTML comments, require trusted author_association, tie-break on review id. Test asserts exit code 1 plus the refusal line, uses stdin, and covers the paginated gh path. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmppWYJxfu8vmR6jBq8 * fix(admission): bound gh read with a timeout and refuse on read failure (#8157) Addresses CodeRabbit finding on 7c50f64: subprocess.run had no timeout and gh failures surfaced as a traceback instead of a refusal line. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmppWYJxfu8vmR6jBq8 * fix(admission): keep reviews from deleted accounts as distinct identities (#8157) A CHANGES_REQUESTED review with user: null was dropped by the per-login reducer, letting another reviewer's APPROVED admit. Key such reviews by id. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SvmPmppWYJxfu8vmR6jBq8 --------- Co-authored-by: Claude <noreply@anthropic.com>
|
Closing as superseded by a split of the same claim, so each half could be reviewed and qualified separately (the wiring half edits the admission code that judges the PR, so it had to follow the verifier on main):
The shell wrapper ( Generated by Claude Code |
Governing issue or accepted claim: #8157
Acceptance delta (one sentence): The eight #8157 narrative false-positive controls refuse at both merge-ready admission and final eligibility while exact positive, wrong-head, and CHANGES_REQUESTED controls keep their intended results via one shared verifier.
Advances #8157
Change
.github/actions/pr-candidate-admission/review_disposition.py+review_source_gate.sh: shared verifier (column-zero markers,disposition:lines, fenced-block masking, native review reducer).action.yml,.github/workflows/routed-rust.yml: request-time gate + final eligibility recheck.tools/repo-policy/tests/review_disposition_admission.rs, policy allowlists, changelog fragment.Remainder (stays open): #4985 evidence record, #8172 HTML parsing, execute=true oracle, refusal matrix, APPROVED-after-negative-COMMENT policy.
Proof (agent bc-294373f3, head 4ed9588): verifier self-test,
cargo test -p repo-policy --test review_disposition_admission,check-workflows, clippy pass; precommit blocked by main E0061 (#12466).Draft: touches the merge gate workflow (
routed-rust.yml); hold until #12466/#12496 land. Opened on behalf of the Cursor cloud agent (its PR tool was unavailable).