Skip to content

fix(review): tie findings located by a bare file or function name to their file - #544

Merged
dan-petty merged 1 commit into
release/v0.2.23from
fix/535-bare-locations
Sep 24, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.23from
fix/535-bare-locations

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

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:

  • readers couldn't find them;
  • corpus scoring couldn't match them;
  • deterministic checks couldn't read the 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:

    • that file (case-insensitive), or
    • a symbol the page shows.

    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 --review over the four categories that had bare locations:

Category Candidates Anchored Unanchored Without a directory
C#/.NET 16 12 0 0
Go 5 2 0 0
Kubernetes/Helm 30 5 0 0
Rust 24 2 0 0

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):
    • bare file names (with and without lines, other case);
    • symbol names (with a colon or a spaced range);
    • empty locations;
    • cases left alone;
    • a page review with anchored and unanchored locations.
  • uv run devops ci --force: all 13 gates pass

…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
@dan-petty dan-petty added this to the v0.2.23 milestone Sep 24, 2026
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/review Multi-persona code review engine, verification, and findings priority/p1-high Priority P1: high-impact work for the next planned milestone labels Sep 24, 2026
@dan-petty
dan-petty merged commit e79f746 into release/v0.2.23 Sep 24, 2026
7 checks passed
@dan-petty
dan-petty deleted the fix/535-bare-locations branch September 24, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p1-high Priority P1: high-impact work for the next planned milestone scope/review Multi-persona code review engine, verification, and findings type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant