Skip to content

Commit e85b43d

Browse files
authored
fix: align scanner dedup rules with GitHub state_reason semantics
1 parent 00d1ec6 commit e85b43d

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/duplicate-code-detector.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ Before filing new issues, check BOTH open AND closed issues:
157157
1. Search for issues with `[Duplicate Code]` prefix using the GitHub toolset with `state: all` (or equivalent `is:open` + `is:closed`)
158158
2. Also search for issues with labels `code-quality` or `refactoring` that describe duplication using `state: all` (or equivalent `is:open` + `is:closed`)
159159
3. Skip any finding that already has an open tracking issue
160-
4. For matching closed issues: **auto-skip only when closure reason is "not planned" / "won't fix"**. If closed as completed/fixed and the finding still reproduces, reopen the prior issue or file a new one with fresh evidence and a link to the prior issue.
160+
4. For matching closed issues, check the GitHub `state_reason`: **auto-skip only when `state_reason` is `not_planned`** (often shown as "won't fix" / "not planned"). If `state_reason` is `completed` and the finding still reproduces, reopen the prior issue or file a new one with fresh evidence and a link to the prior issue.
161161

162162
## Phase 6: Prioritize and Report Findings
163163

@@ -214,7 +214,7 @@ Low / Medium / High
214214
- **Be specific**: Always include file paths and line numbers in the evidence section
215215
- **Be actionable**: Each issue should have a clear, implementable suggestion
216216
- **Avoid noise**: Only file issues for genuine duplication with real maintenance impact — not cosmetic similarities
217-
- **No duplicates**: Check existing issues with `state: all`; only treat closed issues as terminal when they were closed as "not planned" / "won't fix"
217+
- **No duplicates**: Check existing issues with `state: all`; only treat closed issues as terminal when `state_reason` is `not_planned`
218218
- **Security awareness**: Flag duplicated security-critical logic (domain validation, ACL rules, capability management) with higher urgency
219219
- **Cap at 5 issues**: File at most 5 issues per run to avoid flooding the tracker
220220

.github/workflows/export-audit.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ Before creating new issues, check BOTH open AND closed issues:
211211
1. Search for issues with `[Export Audit]` prefix mentioning the same symbol or file using `state: all` (or equivalent `is:open` + `is:closed`)
212212
2. Search for issues with the `code-quality` label mentioning the same symbol or file using `state: all` (or equivalent `is:open` + `is:closed`)
213213
3. Skip any finding that already has an open tracking issue
214-
4. For matching closed issues: **auto-skip only when closure reason is "not planned" / "won't fix"**. If closed as completed/fixed and the finding still reproduces, reopen the prior issue or file a new one with fresh evidence and a link to the prior issue.
214+
4. For matching closed issues, check the GitHub `state_reason`: **auto-skip only when `state_reason` is `not_planned`** (often shown as "won't fix" / "not planned"). If `state_reason` is `completed` and the finding still reproduces, reopen the prior issue or file a new one with fresh evidence and a link to the prior issue.
215215

216216
## Phase 7: Prioritize and File Issues
217217

@@ -266,7 +266,7 @@ Unused export / Naming inconsistency / Circular dependency / Import path issue
266266

267267
- **Verify before filing**: Confirm that the export is truly unused by checking all import sites, including test files and any barrel exports (`index.ts`)
268268
- **Be precise**: Include the exact symbol name, file path, and line number in the evidence
269-
- **No duplicates**: Always check existing issues with `state: all`; only treat closed issues as terminal when they were closed as "not planned" / "won't fix"
269+
- **No duplicates**: Always check existing issues with `state: all`; only treat closed issues as terminal when `state_reason` is `not_planned`
270270
- **Batch related findings**: If multiple unused exports are in the same file, file a single issue listing all of them
271271
- **Cap at 5 issues**: File at most 5 issues per run to avoid noise
272272

.github/workflows/refactoring-scanner.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Before creating new issues, check BOTH open AND closed issues:
186186
1. Search for issues with `[Refactoring]` prefix mentioning the same file using `state: all` (or equivalent `is:open` + `is:closed`)
187187
2. Search for issues with labels `code-quality` or `refactoring` mentioning the same file using `state: all` (or equivalent `is:open` + `is:closed`)
188188
3. Skip any finding that already has an open tracking issue
189-
4. For matching closed issues: **auto-skip only when closure reason is "not planned" / "won't fix"**. If closed as completed/fixed and the finding still reproduces, reopen the prior issue or file a new one with fresh evidence and a link to the prior issue.
189+
4. For matching closed issues, check the GitHub `state_reason`: **auto-skip only when `state_reason` is `not_planned`** (often shown as "won't fix" / "not planned"). If `state_reason` is `completed` and the finding still reproduces, reopen the prior issue or file a new one with fresh evidence and a link to the prior issue.
190190

191191
## Phase 6: Prioritize and File Issues
192192

@@ -253,7 +253,7 @@ Low / Medium / High
253253

254254
- **Evidence-based**: Every issue must cite specific line counts, function names, or code patterns
255255
- **Actionable**: Propose a concrete split/extraction, not just "this is too big"
256-
- **No duplication**: Always check existing issues with `state: all`; only treat closed issues as terminal when they were closed as "not planned" / "won't fix"
256+
- **No duplication**: Always check existing issues with `state: all`; only treat closed issues as terminal when `state_reason` is `not_planned`
257257
- **Security awareness**: Files containing security-critical logic (iptables, Squid config, domain validation) should be flagged with higher urgency
258258
- **Be realistic**: Suggest splits that keep related logic together — don't over-fragment
259259
- **Cap at 5 issues**: File at most 5 issues per run

0 commit comments

Comments
 (0)