Duplicate detection can auto-close both issues when they reference each other
Summary
When a new issue is submitted, the duplicate detection bot attempts to find duplicates and close the new issue. However, when two issues are filed in close proximity, they can each be flagged as duplicates of each other — resulting in both issues being auto-closed with circular justification.
Unless the user notices and manually reopens, the bug reports are silently lost.
Example
- #23096 and #23142 were both recommended for auto-closure, each referencing the other as the "original".
Suggested Fixes
Fix 1: Age-based eligibility for duplicate references
Only reference an issue as justification for auto-closure if it is older than the issue being evaluated. A newly filed issue should never be used as grounds to close another newly filed issue.
Fix 2: Cross-reference closed duplicates on the original issue
When issue A is closed as a duplicate of issue B, automatically add a comment or list entry on issue B noting that A was closed as a duplicate. This:
- Enables the simple "keep the oldest bug" approach to not lose potentially better context from newer bugs that are duplicates but have more valuable context (the example case shows this as the newer case has full repo steps and session log)
- Makes it easy to find related reports from the canonical issue
- Enables searching across all related bug reports from one place
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗