From 4e08647c8662882d377d00f036f22f5fe862ee83 Mon Sep 17 00:00:00 2001 From: William Easton Date: Tue, 31 Mar 2026 14:47:04 -0500 Subject: [PATCH 1/2] bug-hunter: add by-design and already-fixed checks to reduce false positives Add two skip/noop criteria based on triage of ~30 bot-created issues across elastic/beats, elastic/elastic-agent, and elastic/integrations: 1. By-design behavior: Check for codebase-wide patterns, nearby comments, and recent PR context before filing. ~10% of bug-hunter issues were valid code patterns flagged as bugs (e.g., optional auth fields that are intentionally not required at manifest level). 2. Already-fixed bugs: Search recently merged PRs before filing. At least one issue was filed after its fix had already merged. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/gh-aw-bug-hunter.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/gh-aw-bug-hunter.md b/.github/workflows/gh-aw-bug-hunter.md index 2c1c44b0..81c84e0f 100644 --- a/.github/workflows/gh-aw-bug-hunter.md +++ b/.github/workflows/gh-aw-bug-hunter.md @@ -121,6 +121,11 @@ Find a single reproducible, user-impacting bug in the repository that can be cov - Edge cases that require unusual or undocumented inputs. - Issues that require large refactors or design changes. - Behavior already tracked by an open issue. +- **By-design behavior.** Before filing, check whether the behavior is intentional: + - Look for comments near the code explaining the design choice. + - Check if similar code in the same codebase follows the same pattern (e.g., all auth configs use the same optional-fields pattern). Consistency across the codebase suggests a deliberate convention, not a bug. + - Search recent PRs and commits for context on why the code was written this way. + - If the "bug" requires assuming the developer made an error despite following an established pattern in the codebase, it is probably by-design. ### Quality Gate — When to Noop @@ -130,6 +135,7 @@ Call `noop` if any of these are true: - The bug is speculative — you inferred it from reading code but did not trigger it with code you wrote. - A similar issue is already open. - The impact is cosmetic or low-severity (e.g., a typo in a log message). +- The bug is already fixed. Before filing, search for recently merged PRs that may address the issue: `gh pr list --state merged --search 'KEYWORD' --limit 10`. If a merged PR fixes the exact code path, `noop`. ### Issue Format From 55282d93399daa7ce039015c4851bc2d0db2b26b Mon Sep 17 00:00:00 2001 From: William Easton Date: Tue, 31 Mar 2026 14:49:23 -0500 Subject: [PATCH 2/2] compile: regenerate bug-hunter lock file Made-with: Cursor --- .github/workflows/gh-aw-bug-hunter.lock.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gh-aw-bug-hunter.lock.yml b/.github/workflows/gh-aw-bug-hunter.lock.yml index f3e978e4..12fc62cb 100644 --- a/.github/workflows/gh-aw-bug-hunter.lock.yml +++ b/.github/workflows/gh-aw-bug-hunter.lock.yml @@ -39,7 +39,7 @@ # # inlined-imports: true # -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"e7824915f4c55ffc7ed2f3800d9ccafe8dfdb80943292fe394b3aef0c2057b00","agent_id":"copilot","agent_model":"${{ inputs.model }}"} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"49633812bb80b078493fb363f5149af9ff57bae19b6d2ad539ae4fea58b8f301","agent_id":"copilot","agent_model":"${{ inputs.model }}"} name: "Bug Hunter" "on": @@ -448,6 +448,11 @@ jobs: - Edge cases that require unusual or undocumented inputs. - Issues that require large refactors or design changes. - Behavior already tracked by an open issue. + - **By-design behavior.** Before filing, check whether the behavior is intentional: + - Look for comments near the code explaining the design choice. + - Check if similar code in the same codebase follows the same pattern (e.g., all auth configs use the same optional-fields pattern). Consistency across the codebase suggests a deliberate convention, not a bug. + - Search recent PRs and commits for context on why the code was written this way. + - If the "bug" requires assuming the developer made an error despite following an established pattern in the codebase, it is probably by-design. ### Quality Gate — When to Noop @@ -457,6 +462,7 @@ jobs: - The bug is speculative — you inferred it from reading code but did not trigger it with code you wrote. - A similar issue is already open. - The impact is cosmetic or low-severity (e.g., a typo in a log message). + - The bug is already fixed. Before filing, search for recently merged PRs that may address the issue: `gh pr list --state merged --search 'KEYWORD' --limit 10`. If a merged PR fixes the exact code path, `noop`. ### Issue Format