Repository navigation
Verify the requested head before printing findings - #124
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
Allow findings --review ID --head SHA to read a known review outside a checkout. Apply the same head check to lookups by explicit SHA and the checkout HEAD, and reject a missing or different head before emitting text, JSON or SARIF. SHA comparison is case-insensitive. Add regression tests for a detail from another commit, implicit HEAD and SARIF output.
Celestial-0
force-pushed
the
feat/findings-verify-head
branch
from
November 30, 2026 09:20
b88a140 to
26c1816
Compare
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
A build that saves a Proofline review ID can now read it at the commit it tested. The command needs one review GET and works outside a Git checkout.
The head check also fixes the existing commit search. Previously,
findings --headmatched the SHA on the list item, fetched its detail, and could print a completed review for a different commit. The CLI now checks the detail before emitting text, JSON or SARIF. If a running review reports a different head, the wait stops on that read.Evidence
The real binary read a loopback console whose summary and detail named the same review ID. The summary named commit A and the detail named commit B.
findings --head A --jsonCOMPLETEDfor Bfindings --review ID --head A --jsonfindings --review ID --jsonRun
cargo test --locked --test http findings_by_head_refuses_a_detail_for_another_committo exercise the original failure. A matching retained review produced schema-valid SARIF with one GET. A real temporary Git checkout exercised implicit HEAD, and a two-read wait accepted a running review without a head once its completed detail named the requested commit.cargo fmt --checkandcargo clippy --locked --all-targets -- -D warningspassed.cargo test --locked -- --include-ignoredpassed all 162 tests on Linux, including the official pre-commit framework test.cargo deny checkpassed with three duplicate-dependency warnings in the existing lockfile.The console responses were synthetic. The hosted service and GitHub code-scanning upload were outside this verification.
Merge risk
A script using a head selector may now exit 1 if its review detail omits or contradicts that head. ID-only reads keep their previous behavior. This is a reversible CLI change with no hosted schema, credential, or stored-data migration.