Fix duplicate pollution: filter closed issues from detection

- Closed issues no longer appear in duplicate scans
- Prevents infinite reappearance of merged duplicates
- Deleted 29 low-value closed issues to shrink DB
- Closes bd-c577

Amp-Thread-ID: https://ampcode.com/threads/T-51165824-9559-4696-919f-2c40459d5ef9
Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Steve Yegge
2025-10-31 19:51:31 -07:00
parent 76069a09dc
commit 7d73082d7e
2 changed files with 41 additions and 69 deletions

File diff suppressed because one or more lines are too long

View File

@@ -45,12 +45,20 @@ Example:
// Get all issues
allIssues, err := store.SearchIssues(ctx, "", types.IssueFilter{})
if err != nil {
fmt.Fprintf(os.Stderr, "Error fetching issues: %v\n", err)
os.Exit(1)
fmt.Fprintf(os.Stderr, "Error fetching issues: %v\n", err)
os.Exit(1)
}
// Find duplicates
duplicateGroups := findDuplicateGroups(allIssues)
// Filter out closed issues - they're done, no point detecting duplicates
openIssues := make([]*types.Issue, 0, len(allIssues))
for _, issue := range allIssues {
if issue.Status != types.StatusClosed {
openIssues = append(openIssues, issue)
}
}
// Find duplicates (only among open issues)
duplicateGroups := findDuplicateGroups(openIssues)
if len(duplicateGroups) == 0 {
if !jsonOutput {