chore(agents): improve ca-test-infra-improver — prevent massive duplicate issue creation #3142

Merged
freemo merged 1 commits from improvement/agent-ca-test-infra-improver-dedup into master 2026-04-05 21:10:01 +00:00
+32 -4
View File
@@ -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.
---