caelum0x f652f757e6 fix(preflight): stop collapsing distinct same-rule findings across files
dedup() keyed solely on Title, so a rule that legitimately fires once per
occurrence (hardcoded-secrets, private-api, insecure-http, etc.) had every
instance past the first silently dropped from `preflight` whenever two
different files tripped the same rule — e.g. two real hardcoded secrets in
two files reported as one finding, hiding the second from the user and any
CI gate reading file/line. Key dedup on Title+File+Line instead, which still
collapses genuine cross-scanner duplicates of a project-level fact (no
file/line on either side) but keeps every distinct per-file occurrence.

Added TestRunKeepsSameRuleFindingsFromDifferentFiles (RED before the fix:
got 1 finding instead of 2; GREEN after).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-21 03:33:23 +03:00
..
2026-06-26 13:40:13 -07:00