Repository navigation
feat(admission): shared review-disposition verifier and test, no wiring (#8157) - #12809
Conversation
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
|
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 35 minutes. View limit details
Summary by CodeRabbit
WalkthroughThe change adds a Python CLI that evaluates source-review readiness for an exact candidate head. It also adds self-tests, Rust integration tests, and repository-policy coverage entries. Workflow wiring is deferred. ChangesSource review disposition
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Main as main
participant Fetch as fetch_reviews
participant GH as gh api
participant Evaluate as reviews_allow_source_attestation
Main->>Fetch: Request pull-request reviews
Fetch->>GH: Fetch paginated review data
GH-->>Fetch: Return review pages
Fetch-->>Main: Return parsed reviews
Main->>Evaluate: Check reviews against candidate head
Evaluate-->>Main: Return admission result
Possibly related issues
Merge Risk:
|
Review of record — head
|
…rd (#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
|
Repair pushed at 7c50f64 for the CHANGES REQUESTED review of record on f4f38db. Blocking, all fixed with a Rust-side control each:
Non-blocking taken: tie-break on review id; test asserts exit 1 plus the refusal line and no Traceback; Proof: Generated by Claude Code |
Delta review of record — head
|
|
Deferred verifier gaps are tracked in #12814 (per-login reducer, Generated by Claude Code |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…re (#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
Delta review of record — head
|
…ties (#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
Delta review of record — head
|
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm a later negative COMMENT by the same reviewer can be superseded by that reviewer’s earlier positive COMMENT, allowing admission.
Refuted
- The verifier is intentionally not wired into admission in this PR, so its current runtime security impact is limited to the new executable and test surface.
Parked follow-ups
- The non-list API-page issue is a real deferred parser gap, not a new blocker in this diff.
- A non-array page is converted to a one-element review list rather than rejected, weakening the stated fail-closed malformed-page behavior.
Evidence gaps
- The focused Rust test result claimed by the PR is not independently available in this lane because cargo-test scheduling has no receipt and ripr exited 2.
- Model proof intent was rejected by deterministic validation.
- The current-head Rust oracle receipt is unavailable, so seeded claims of passing tests are not independently established by this packet.
Requested by Steven · project thread
Governing issue or accepted claim: #8157
Acceptance delta (one sentence): The review-disposition verifier exists on main with a repo-policy test proving the #8157 narrative controls, the review-of-record regressions, and wrong-head, CHANGES_REQUESTED, APPROVED and identity controls, so a follow-up can wire it into admission against a base-SHA bundle that contains it.
Advances #8157
Change
Part 1 of the split of #12503 (#12503 could not qualify itself: the trusted admission bundle is the base SHA, where the new files do not exist).
.github/actions/pr-candidate-admission/review_disposition.py: first line must be exactly a readiness marker; contradicting disposition or readiness text on any later line refuses; unclosed fences and HTML comments refuse; APPROVED and COMMENTED require OWNER/MEMBER/COLLABORATOR;--repository/--prreads every review page withgh api --paginateand fails closed (replaces the fix(admission): shared review-disposition verifier for merge-ready and final eligibility (#8157) #12503 shell wrapper).tools/repo-policy/tests/review_disposition_admission.rs: self-test, 22 body controls, wrong-head / CHANGES_REQUESTED / identity controls, fake-ghpaginated and failure paths; asserts exit 1 plus the refusal line.policy/process_allowlist.d/8157-review-disposition-verifier.txt,covered_byrow, changelog fragment.No change to
routed-rust.ymloraction.yml(action.ymlis at its run-block line limit; the Rust test runs--self-test).Follow-up
Part 2 wires request-time and final-eligibility use after this merges, kept compatible with #12703. Deferred verifier gaps are in #12814, a precondition for part 2. #12503 closes pointing at both.
Proof
Review of record CHANGES REQUESTED on f4f38db, repaired; delta review on 7c50f64 found no blocking items.
cargo test -p repo-policy --test review_disposition_admission(4 pass),cargo xtask precommitexit 0 on 7c50f64.🤖 Generated with Claude Code
https://claude.ai/code/session_01SvmPmppWYJxfu8vmR6jBq8