Repository navigation
Description
Problem
Review pages give the model source text without line numbers (_render_source_block in src/devops_cli/ai/review/chunker.py). A long file split into parts (### File: x.py (part 2/3)) starts mid-file, with no offset. So every line range a persona reports is the model's own count, and on long files it is a guess.
Evidence
A synthetic defect corpus (#415) injected mkdir(mode=0o777, ...) at line 248 of crypto/known_hosts.py. Two personas reported it ("Insecure directory permissions when creating known_hosts parent directory"), at lines 106–108 and 112–115. The defect was found, but its location was wrong by about 140 lines.
Effects
Line numbers affect:
- the locations shown to users and patched by
devops review apply-patch; - duplicate consolidation, which relies on line overlap within
DEFAULT_REVIEW_LINE_OVERLAP_TOLERANCE; - the verifier's invalidation of findings "beyond file length";
- the corpus score's location match.
Proposed solution
Prefix each source line in a review page with its absolute line number, including in the parts of a split file, and tell the persona prompts that locations must use those numbers. Measure the change with the synthetic corpus (share of injections matched by line, before and after) and with devops review benchmark (the extra prompt tokens).
Acceptance criteria
- Page lines carry absolute numbers; a part of a split file starts at its true offset.
- On the synthetic corpus, the share of injections matched by line rises. The before and after numbers are recorded in the task file.
- The extra prompt tokens per review are measured and recorded.
Added from #515
Path-mode pages larger than the page size fall back to _split_text_lines (chunker.py), which splits with no overlap and repeats no file header on later pages. A defect spanning the boundary is never seen whole, and later pages lose their file name. Split pages should overlap and repeat the file header, alongside the line numbers.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
feat(review): synthetic defect corpora and recall scoring for reviews (…
test(review): regression harness keeps real defects reported and fals…
fix(review): review pages number their source lines (#528)
dan-petty commentedon Sep 24, 2026
Closed by #528, merged into
release/v0.2.23.GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by
devops gh issues close-merged.feat(release): v0.2.23 (#681)