chore(agents): improve ca-test-infra-improver — strengthen duplicate avoidance #10839
@@ -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.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user