You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(review): deterministic positioning-validation pass — verify every finding's file/line before storing #721
Add a deterministic post-LLM positioning-validation pass to cora review (and cora scan): before a finding is persisted/emitted, verify that
the file exists in the diff/repo,
the reported line number is within the file (or the diff hunk range),
any quoted snippet matches the actual content (fuzzy match allowed).
Findings that fail validation are dropped or line-snapped — never stored with a wrong location.
Why
Pattern adopted from Alibaba open-code-review (Apache-2.0): their dedicated "external positioning module" systematically corrects location drift before comments are published. Cora currently trusts LLM-reported locations; known failure modes in our own notes: GLM returning invalid fields silently skipping whole batches, and precise end_line (tree-sitter node ranges) still planned. Every downstream consumer — findings, fingerprint auto-resolve, SARIF/debt — depends on findings pointing at real, current code.
Testing
Unit tests: out-of-range line, non-existent file, snippet mismatch → dropped/snapped.
Live: run on a real PR diff before/after; assert 100% of stored findings point to existing lines.
Cross-check a repo with known location drift reports.
Activity
fix(review): retry in smaller pieces when the model cannot answer, ne…
feat(review): verify each finding's line against the source line the …