mirror of
https://github.com/norandom/OpenUltraSAST.git
synced 2026-10-16 03:49:26 +00:00
The correspondence mapped an equal-region base<->head line pair only when the line's content was GLOBALLY unique in the file, so common lines (`}`, blanks, imports) tripped `ambiguous_line_correspondence` and the finding's anchor was discarded -> the operation came back `unmapped` -> novelty `unknown` -> `comparison_unknown` -> the engine finding was suppressed (a direct cause of "near-blind to fixes"). Replace the global-uniqueness gate with run-aware positional anchoring: segment the equal-region pairs into contiguous runs (strictly +1/+1, as _equal_line_pairs emits), and map a pair when its content occupies exactly one old run and one new run. Duplicates WITHIN a contiguous run are positionally forced and now map; duplicates ACROSS runs split by an edit are aligned arbitrarily by git and stay withheld + flagged (soundness preserved -- the moved-repeated-operation guard still passes, so no false `new`/identity claims). Tests: update test_change_context_unknown_base_binary_and_ambiguous_lines_are_ unresolved (its two in-run sinks now anchor); keep the moved-operation soundness test; add intra-run-maps, cross-run-withheld, and distinctive-line-anchors cases. 163 push tests pass, ruff clean. Honest scope (design.md amendment): this removes one real cause but is necessary-not-sufficient -- live-testing a messy 14-file Java change showed coverage stays `incomplete` due to other, dominant blockers (capability_unavailable until Task 8.3; the engine produced no actionable defect; eligibility/projection gaps). Engine coverage on unseen diffs needs those too, not just correspondence. Co-Authored-By: Claude Opus 4.8 <[email protected]>