From 81935a9cf79b5c49a8e988d1720f11fc5697c739 Mon Sep 17 00:00:00 2001 From: HAL9000 Date: Thu, 23 Apr 2026 08:40:57 +0000 Subject: [PATCH] =?UTF-8?q?chore(agents):=20improve=20ca-test-infra-improv?= =?UTF-8?q?er=20=E2=80=94=20strengthen=20duplicate=20avoidance?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Expand the Duplicate Avoidance section from a 3-step placeholder into a comprehensive 6-step process to prevent the 48+ duplicate TEST-INFRA issues observed across 8 topic clusters. Key additions: - CRITICAL blockquote: when in doubt, skip - Keyword extraction before filing - Keyword-based search (open AND closed issues, not just TEST-INFRA: prefix) - Semantic comparison with concrete examples - Cross-agent prefix checking (TEST-INFRA:, BUG-HUNT:, UAT:) - Post-filing verification with 5-second delay for race condition handling - Duplicate Check audit section requirement in every filed issue body ISSUES CLOSED: #2370 --- .opencode/agents/ca-test-infra-improver.md | 43 ++++++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/.opencode/agents/ca-test-infra-improver.md b/.opencode/agents/ca-test-infra-improver.md index a5316603a..471772761 100644 --- a/.opencode/agents/ca-test-infra-improver.md +++ b/.opencode/agents/ca-test-infra-improver.md @@ -415,10 +415,45 @@ For each finding, invoke `ca-new-issue-creator` with: ### Duplicate Avoidance -Before filing any issue: -1. Search Forgejo for existing issues with "TEST-INFRA:" prefix -2. Check for similar titles/descriptions -3. If potential duplicate found, skip +> **CRITICAL: When in doubt, SKIP — it is better to miss an improvement +> suggestion than to create noise that wastes groomer and implementor time.** + +Before filing ANY issue, you MUST perform rigorous duplicate checking: + +1. **Extract keywords**: From your proposed issue title, extract 3-5 key + technical terms (e.g., "parallelize", "E2E", "coverage", "Docker", + "nox", "cache"). + +2. **Search by keywords**: Search Forgejo for open AND closed issues containing ANY + of those key terms. Use the search API, not just the "TEST-INFRA:" + prefix. + +3. **Compare semantically**: For each search result, compare your proposed + improvement with the existing issue's description. Two issues are + **duplicates** if they propose the same optimization for the same + component, even if the wording differs. Examples of duplicates: + - "Parallelize E2E tests" and "Run E2E tests in parallel" + - "Create custom Docker image for CI" and "Pre-built CI base image" + - "Cache nox environments" and "Persist nox virtualenvs between runs" + +4. **Check all prefixes**: Search for issues with `TEST-INFRA:`, `BUG-HUNT:`, + and `UAT:` prefixes — other agents may have already identified the same + improvement opportunity from a different angle. + +5. **If ANY existing issue proposes the same or substantially similar + improvement**: **SKIP** — do not file. It is far better to miss one + improvement suggestion than to file the 7th duplicate of the same idea. + Previous sessions created 48+ TEST-INFRA issues with significant overlap + across 8 topic clusters. + +6. **Post-filing verification**: After filing an issue, wait 5 seconds and + re-check for duplicates (another parallel worker may have filed the same + issue simultaneously). If a duplicate appeared, close your issue as a + duplicate of the earlier one. + +When filing, include a `### Duplicate Check` section in the issue body +listing the search queries used, result counts, and your justification for +why this is not a duplicate. --- -- 2.52.0