Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Who it helps
A rerun creates a new run of the review's original immutable subject, so it answers "what does Proofline say about this exact head now?". Scripts ask that when:
Today
review,ci reviewand the Git hooks can fail on findings, butproofline rerun REVIEW_IDexits 0 on any completed rerun. A script has to parse--jsonitself to tell a clean rerun from one with a serious finding.Change
proofline rerun REVIEW_ID --fail-on <warning|serious>exits 3 when the completed rerun has an open finding at or above the threshold. The server only reruns pull-request reviews, so the server'sopen_itemscounts always decide, as forreview --pr: dismissed and accepted findings don't count. It reusesreview_verdictthroughshow.--fail-on, nothing changes.--fail-on, a completed rerun whoseopen_itemsis missing exits 4, asreview --fail-ondoes. Without the flag, that rerun exits 0 as before.--fail-onconflicts with--no-wait. clap refuses the combination before any request, so nothing is rerun.Same-subject check. With
--fail-on, the command first reads the original review and records its head commit and repository. Then, before grading the new run, it passes the run's detail throughconfirm_ci_subject(from #34): the run must bePULL_REQUEST, at the same head and in the same repository. If the server reports anything else, nothing is printed to stdout, stderr names the mismatch, and the command exits 4. A review of the wrong subject can never read as a clean rerun. An original that is not a pull-request review, or that names no head or repository, is refused with exit 1 before the rerun is requested, so it costs no run.showkeeps its signature for its existing callers and delegates to a newshow_subject, which takes the optional subject.This is the sibling of #114 (
findings --fail-on). Both add a command to the same--fail-onmatrix line intests/http.rs, so whichever lands second needs a trivial rebase.Verification
tests/http.rs:ci_consolenow serves two earlier pull-request reviews and their reruns, which both answer withCI_REVIEWatCI_HEAD.rerunjoinsci reviewandreview --prin the--fail-onmatrix, so it is checked against every case there, each without the flag and withwarningandserious: dismissed, open WARNING/SERIOUS, missingopen_items, incomplete, CODE-only, partial CODE and another CODE head. The JSON result keeps its shape.rerun --no-wait --fail-on seriousexits 1 with the conflict and sends no request.cargo fmt --check,cargo clippy --locked --all-targets -- -D warningsandcargo test --lockedpass on Linux with toolchain 1.100.0.cargo deny checkwas not run locally; this change adds no dependencies.rerunmakes the matrix test fail, and removing the subject check makes the mismatch assertion fail.