Problem
When code is fixed after a review, old findings linger as open forever. There is no mechanism to auto-resolve findings when the underlying code changes.
Solution
After each review/scan, auto-resolve previously open findings whose code no longer exists.
Algorithm
1. After saving new findings to DB:
2. Get all 'open' findings for this project
3. For each open finding:
a. Compute fingerprint(file, line, title)
b. Check if same fingerprint exists in current review's findings
c. If NOT found → the issue may be resolved
d. (Optional) Tree-sitter check: parse file, check if code node at line still exists
e. If confirmed resolved → UPDATE status='solved', INSERT finding_event (auto_resolved)
Fingerprint Dedup
Tree-sitter Enhanced Resolution (Phase 2)
When the tree-sitter feature is enabled:
- Parse the file at the finding's line
- Check if the AST node still exists at that range
- If the function/block was deleted or significantly changed → auto-resolve
- More accurate than line-only heuristic (handles code movement)
Dependencies
Acceptance Criteria
Problem
When code is fixed after a review, old findings linger as
openforever. There is no mechanism to auto-resolve findings when the underlying code changes.Solution
After each review/scan, auto-resolve previously open findings whose code no longer exists.
Algorithm
Fingerprint Dedup
hash(file:line:title_normalized)— already defined in Save review findings to cora.db (v5 tables) #397Tree-sitter Enhanced Resolution (Phase 2)
When the
tree-sitterfeature is enabled:Dependencies
Acceptance Criteria
auto_resolvedevent infinding_events