Repository navigation
Show why CI jobs failed on a reviewed pull request - #126
Open
Celestial-0 wants to merge 1 commit into
Open
Celestial-0 wants to merge 1 commit into
Celestial-0 wants to merge 1 commit into
Conversation
Add a read-only ci failures command that prints Proofline's recorded attribution for each failed job of a retained pull request review. It names the reviewed commit and observation time, warns when the PR head moved, and reports omitted jobs plus pending and unfinished diagnoses separately. The command reads one review by UUID, needs no checkout, and never starts a review or reruns a job. Unknown causes show their recorded reason. Absent or empty observations exit 0 with an explicit message; malformed observations and non-PR reviews exit 1.
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.
Summary
Adds a read-only
ci failurescommand. It reads one review by ID and prints the CI attributions Proofline already records. Until now those attributions were visible only in--json, whilefindingsprinted a singleproduction: COMPLETED, no findingsline for a review whose jobs had failed.The command tells a developer whether a red job was caused by the change, was already failing on the merge base, was flaky, or was not diagnosed because no log was available. It also says when the pull request head has moved since the observation.
Evidence
With a completed-review fixture whose jobs failed,
proofline findings --review REVIEW_IDprintedproduction: COMPLETED, no findings. The testci_failures_distinguishes_a_change_failure_from_a_pre_existing_failurefailed before the change. It passes now, andproofline ci failures --review REVIEW_IDprintsCAUSED_BY_CHANGEandPRE_EXISTING_ON_BASEas different explanations for a job.Verification
cargo fmt --checkandcargo clippy --locked --all-targets -- -D warningspassed.cargo test --locked -- --include-ignoredpassed all 169 tests on Linux, including the pre-commit framework integration.cargo deny checkpassed with the duplicate-dependency warnings already present in the lockfile.The console fixture is synthetic. The hosted service was not exercised.
Merge risk
The command is additive. Output, exit codes and verdicts do not change when it is not invoked. It reads one retained review and never starts a review or reruns a job. Reverting the commit removes the command and restores the previous behavior.