Repository navigation
Say where text output's non-head evidence was read - #152
Open
ammartahamohamedy wants to merge 3 commits into
Open
ammartahamohamedy wants to merge 3 commits into
ammartahamohamedy wants to merge 3 commits into
Conversation
ammartahamohamedy
force-pushed
the
fix/text-evidence-location
branch
from
December 3, 2026 10:57
c33b250 to
a45af32
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.
Fixes #151
Problem
render::locationprinted every cited file asat path:lines, ignoringcommit_sha,companion_repositoryandprovenance_status. A read of the base commit or of a companion repository looked like a line at the reviewed head. SARIF and--annotationsalready place only verified reads at the head.Fix
render::locationkeeps every cited file. A citation SARIF would place prints as before. Any other gets a note on where it was read:(base <sha12>)when the commit is the reviewed base,(commit <sha12>)for another commit,(in <owner/repo>)(orin a companion repository, also for a blank name) and(unverified).CommitPair: a code assessment's findings use its own base and head, and the rest use the review's. A patch review records no head of its own, so without this a read at the code assessment's head would print ascommit …. When the review does record a head,outcome::code_assessmentalready requires the code assessment to match it.sarif::code_location's status (nowpub(super)withLocationStatus), so text and SARIF use one rule. A citation SARIF skips for other reasons, such as one with no line or no recorded commit, prints as before.render::review(review,findings,run) and the hook summary line (hooks::print_findings).--json, SARIF and annotations are unchanged.Tests (written first; each failed before the change)
text_output_says_where_each_citation_sarif_does_not_place_was_read(new,tests/sarif.rs)findings --reviewnotes the base, another commit, a companion repository and an unverified read, leaves the head read alone, and SARIF from the same review places only that onea_finding_cited_off_the_reviewed_head_says_where_it_was_read(new,tests/hooks.rs)base_commit_shaa_code_finding_in_the_hook_line_is_read_against_its_assessments_commits(new,tests/hooks.rs)(base …)a_citation_off_the_reviewed_head_says_where_it_was_read(new,src/render.rsunit)a_code_finding_is_read_against_its_assessments_commits(new,src/render.rsunit)(base …)Mutation checks: printing
commitfor a base read, or dropping theunverifiednote, fails both the unit and the SARIF integration test. Reading code findings against the review's commits fails both code-finding tests. Dropping the blank-name check fails the citation unit test. Dropping the code assessment's base fails the hook test.End to end, offline, with the built binary: the issue's repro prints three identical
at src/lib.rs:10-14lines onmain, and with this change the base and companion reads carry their notes.Checks
cargo fmt --check: ✅cargo clippy --locked -- -D warnings: clean on the lib, the bins and the integration tests.--all-targetsstops at the 2 errorsmainalready has on Windows (src/agent/tests.rs).cargo test --locked: the new tests pass. Otherwise, the same 12 Windows failures as onmain(tests/mcp.rs×7,agent_install×2,update,local_patch,hookson a Windows push URL), none of them in this change.cargo deny check: no dependency changes.checkandwindowspass on the fork PR after rebasing onto upstreamf00327b(the first run failed only atcargo deny, on a yankedpin-project-lite 0.2.18that upstream had already bumped).Proofline review log
Fork review PR: ammar-taha-dev/proofline-cli#6. Rounds capped at 2; round 3 ran only because the PR was rebased.
commit …CommitPair, with a hook test and a unit test written firstcompanion_repositoryprints(in )in a companion repository), and the unit test covers bothtests/mcp.rs,src/api.rsandopenapi.public.jsonmainwas behind(base …)commit_shanull only when the review recorded no head, and those print as beforeThe prompts below are the ones that drove this implementation, except the round-3 test change (4beaa1e), which was made in a separate session; the investigation, reproduction and fix scope were done before them and aren't included.