Proposal: improve ca-bug-hunter — tighten duplicate avoidance to err on the side of skipping #2774

Open
opened 2026-04-04 19:22:17 +00:00 by freemo · 2 comments
Owner

Agent Improvement Proposal

Pattern Detected

Type: Prompt improvement
Affected Agent: ca-bug-hunter
Evidence:

The bug hunter's Duplicate Avoidance section (line 421-422 of ca-bug-hunter.md) currently says:

"If uncertain, file the issue but note the potential overlap."

This is the opposite of the conservative approach used by the UAT tester (ca-uat-tester.md, lines 441-442):

"When in doubt about whether a PR covers the gap, skip — it is better to miss a bug than to create noise that wastes groomer and implementor time."

The bug hunter's permissive approach leads to duplicate and near-duplicate issues. Evidence from the issue tracker:

  • Multiple BUG-HUNT: [concurrency] issues filed for similar race conditions in related modules (#2413, #2549, #2559)
  • The bug hunter files issues for patterns that overlap with UAT findings (both BUG-HUNT: and UAT: prefixed issues covering similar areas)
  • The backlog groomer has to spend cycles closing duplicates

The ca-test-infra-improver had the same problem (documented in proposal #2370, which was approved) — its workers filed ~30 duplicate issues across 8 topic clusters. The bug hunter uses the same permissive "file when uncertain" approach and exhibits the same pattern.

Proposed Change

Modify the Duplicate Avoidance section of ca-bug-hunter.md to match the conservative approach:

  1. Change the uncertainty guidance from "If uncertain, file the issue but note the potential overlap" to "If uncertain, skip — it is better to miss a potential bug than to create noise that wastes groomer and implementor time."

  2. Add keyword-based search before filing: Extract 3-5 key technical terms from the proposed issue title, search Forgejo for open issues containing ANY of those terms, and skip if any existing issue proposes the same or substantially similar finding.

  3. Add cross-agent duplicate checking: Before filing, also search for UAT: prefixed issues (from the UAT tester) that may cover the same bug from a different angle.

  4. Define "similar" explicitly: Two issues are duplicates if they identify the same code pattern in the same module, even if the wording differs. For example, "Race condition in Settings singleton" and "Thread-safety issue in Settings initialization" are duplicates.

Expected Impact

  • Fewer duplicate BUG-HUNT issues (estimated 40-60% reduction in duplicates)
  • Less grooming work needed to close duplicates
  • Cleaner issue tracker with unique, actionable findings
  • Better signal-to-noise ratio for human reviewers

Risk Assessment

  • Low risk: Stricter duplicate checking may occasionally cause a worker to skip a genuinely unique finding that has superficial keyword overlap with an existing one. This is acceptable — missing one potential bug is far less costly than filing 5 duplicates of the same finding.
  • No behavioral change for unique findings: Bugs that are clearly novel (no keyword overlap with existing issues) will still be filed normally.

This is a proposal from the agent evolver. A human must approve this issue before the change will be implemented. To approve: remove the needs feedback label, add State/Verified, or comment with approval.


Automated by CleverAgents Bot
Supervisor: Agent Evolver | Agent: ca-agent-evolver

## Agent Improvement Proposal ### Pattern Detected **Type**: Prompt improvement **Affected Agent**: `ca-bug-hunter` **Evidence**: The bug hunter's Duplicate Avoidance section (line 421-422 of `ca-bug-hunter.md`) currently says: > "If uncertain, **file the issue** but note the potential overlap." This is the opposite of the conservative approach used by the UAT tester (`ca-uat-tester.md`, lines 441-442): > "When in doubt about whether a PR covers the gap, **skip** — it is better to miss a bug than to create noise that wastes groomer and implementor time." The bug hunter's permissive approach leads to duplicate and near-duplicate issues. Evidence from the issue tracker: - Multiple `BUG-HUNT: [concurrency]` issues filed for similar race conditions in related modules (#2413, #2549, #2559) - The bug hunter files issues for patterns that overlap with UAT findings (both `BUG-HUNT:` and `UAT:` prefixed issues covering similar areas) - The backlog groomer has to spend cycles closing duplicates The ca-test-infra-improver had the same problem (documented in proposal #2370, which was approved) — its workers filed ~30 duplicate issues across 8 topic clusters. The bug hunter uses the same permissive "file when uncertain" approach and exhibits the same pattern. ### Proposed Change Modify the Duplicate Avoidance section of `ca-bug-hunter.md` to match the conservative approach: 1. **Change the uncertainty guidance** from "If uncertain, file the issue but note the potential overlap" to "If uncertain, **skip** — it is better to miss a potential bug than to create noise that wastes groomer and implementor time." 2. **Add keyword-based search** before filing: Extract 3-5 key technical terms from the proposed issue title, search Forgejo for open issues containing ANY of those terms, and skip if any existing issue proposes the same or substantially similar finding. 3. **Add cross-agent duplicate checking**: Before filing, also search for `UAT:` prefixed issues (from the UAT tester) that may cover the same bug from a different angle. 4. **Define "similar" explicitly**: Two issues are duplicates if they identify the same code pattern in the same module, even if the wording differs. For example, "Race condition in Settings singleton" and "Thread-safety issue in Settings initialization" are duplicates. ### Expected Impact - Fewer duplicate BUG-HUNT issues (estimated 40-60% reduction in duplicates) - Less grooming work needed to close duplicates - Cleaner issue tracker with unique, actionable findings - Better signal-to-noise ratio for human reviewers ### Risk Assessment - **Low risk**: Stricter duplicate checking may occasionally cause a worker to skip a genuinely unique finding that has superficial keyword overlap with an existing one. This is acceptable — missing one potential bug is far less costly than filing 5 duplicates of the same finding. - **No behavioral change for unique findings**: Bugs that are clearly novel (no keyword overlap with existing issues) will still be filed normally. --- *This is a proposal from the agent evolver. A human must approve this issue before the change will be implemented. To approve: remove the `needs feedback` label, add `State/Verified`, or comment with approval.* --- **Automated by CleverAgents Bot** Supervisor: Agent Evolver | Agent: ca-agent-evolver
Author
Owner

approved

approved
freemo added this to the v3.6.0 milestone 2026-04-05 07:08:58 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Backlog
  • Milestone: v3.6.0 (assigned — agent improvement fits the Advanced Concepts scope)
  • MoSCoW: Should Have — the bug hunter's permissive "file when uncertain" approach is creating significant duplicate noise in the issue tracker, wasting groomer and implementor time. The conservative approach used by ca-uat-tester has proven effective and should be adopted here

The proposal correctly identifies the root cause and proposes a targeted fix. The risk is low — missing one potential bug is far less costly than filing 5 duplicates. Approved for implementation.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Backlog - **Milestone**: v3.6.0 (assigned — agent improvement fits the Advanced Concepts scope) - **MoSCoW**: Should Have — the bug hunter's permissive "file when uncertain" approach is creating significant duplicate noise in the issue tracker, wasting groomer and implementor time. The conservative approach used by `ca-uat-tester` has proven effective and should be adopted here The proposal correctly identifies the root cause and proposes a targeted fix. The risk is low — missing one potential bug is far less costly than filing 5 duplicates. Approved for implementation. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#2774
No description provided.