Repository navigation
fix(review): tie findings located by a bare file or function name to their file - #544
Merged
Merged
Conversation
…their file The first sample validation (#505) found 36 of 208 candidate findings located by a bare file name (Dockerfile:7) or a function name (getBodySize:18-24). They were tied to no file, so a reader could not find them, corpus scoring could not match them and deterministic checks could not read them. The per-file review now ties each page's bare locations to the file under review, keeping lines or targets, when they name that file or a symbol the page shows. Another file's name, or a symbol the page lacks, is kept and listed in the payload's unanchored_locations; tied ones are listed in anchored_locations. In a live run over four sample categories, 21 of 75 candidates were anchored and none was left without its file. Closes #535
This was referenced Sep 24, 2026
Merged
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.
Closes #535.
Problem
The first sample validation (#505) found 36 of 208 candidate findings located by a bare file name (
Dockerfile:7,read.rs:905-906) or a function name (getBodySize:18-24,nvm_alias_path() { 1368-1374). Because they were tied to no file:Resolving bare file names alone raised that run from 28 to 33 injections found.
Changes
anchor_location(location, file_path, page_text)(review_schema.py) ties a location that has no directory to the file under review, keeping its lines or target, when it names:It leaves the location alone when it is a path, another file's name (e.g.
config.yaml:3), or a symbol the page lacks._anchor_page_findings(pipeline.py) applies it to each page's findings after the page is reviewed. The payload scratchpad records:anchored_locations: the tied locations, as the model wrote them;unanchored_locations: the locations it kept unchanged.Live verification
devops review samples validate --reviewover the four categories that had bare locations:The model still writes bare names (28% of candidates). None is left without its file, versus 36 of 208 in the first run.
Test plan
tests/test_review_location_anchoring.py(11 tests):uv run devops ci --force: all 13 gates pass