From af9c672d1c6d327fe20cab621d8e2ca4634566c1 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman Date: Sun, 5 Apr 2026 06:48:30 +0000 Subject: [PATCH] =?UTF-8?q?chore(agents):=20improve=20ca-test-infra-improv?= =?UTF-8?q?er=20=E2=80=94=20prevent=20massive=20duplicate=20issue=20creati?= =?UTF-8?q?on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Approved proposal: #1802 Pattern: prompt_improvement — duplicate issue explosion Evidence: Agent created 48+ TEST-INFRA issues with massive duplication across sessions: 6 about dependency caching, 7 about matrix builds, 5 about parallelize CI jobs, 3 about redundant setup elimination, 7 about clone failures. Fix: Replace vague 3-line dedup guidance with rigorous 5-step mandatory dedup procedure including keyword search, cross-area search, closed issue search, auditable dedup proof in issue body, and conservative filing policy. ISSUES CLOSED: #1802 --- .opencode/agents/ca-test-infra-improver.md | 36 +++++++++++++++++++--- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/.opencode/agents/ca-test-infra-improver.md b/.opencode/agents/ca-test-infra-improver.md index e4dc21936..eedcac656 100644 --- a/.opencode/agents/ca-test-infra-improver.md +++ b/.opencode/agents/ca-test-infra-improver.md @@ -335,10 +335,38 @@ 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: Duplicate issue creation is the #1 problem with this agent.** +Previous sessions created 48+ TEST-INFRA issues with massive duplication +(6 issues about "dependency caching", 7 about "matrix builds", 5 about +"parallelize CI jobs", etc.). You MUST follow this procedure rigorously. + +Before filing ANY issue, you MUST perform ALL of these checks: + +1. **Mandatory keyword search.** Extract the 2-3 key nouns from your + proposed issue title (e.g., for "Implement dependency caching in CI", + search for "dependency caching", "cache", "caching"). Search Forgejo + for ALL open AND closed issues containing these keywords. If ANY issue + with overlapping keywords exists (regardless of prefix or area), do + NOT file a new issue. + +2. **Cross-area search.** Search WITHOUT the "TEST-INFRA:" prefix and + without the area tag (e.g., search for "dependency caching" not just + "TEST-INFRA: [ci-pipeline-design] dependency caching"). Other agents + or humans may have filed the same issue under a different prefix. + +3. **Include closed issues in search.** A closed duplicate means the topic + has already been addressed or intentionally rejected. Do NOT re-file it. + +4. **Dedup proof in issue body.** Every issue you file MUST include a + "### Duplicate Check" section in the body listing: + - The search queries you used + - The number of results found for each query + - Why none of the existing issues cover this specific finding + This makes dedup auditable and prevents future duplicates. + +5. **If uncertain, do NOT file.** When in doubt about whether an issue is + a duplicate, skip it. It is far better to miss a marginal finding than + to create another duplicate that wastes human review time. --- -- 2.52.0