Skip to content

Integrate bug fix/triage tool into BugBug#5959

Open
suhaibmujahid wants to merge 3 commits intomozilla:masterfrom
suhaibmujahid:larrey-in-bugbug
Open

Integrate bug fix/triage tool into BugBug#5959
suhaibmujahid wants to merge 3 commits intomozilla:masterfrom
suhaibmujahid:larrey-in-bugbug

Conversation

@suhaibmujahid
Copy link
Copy Markdown
Member

For now, it runs via CLI; I'll follow up by creating a cloud-based service.

uv run --with bugsy,grizzly-framework,prefpicker scripts/run_bug_fix.py --bug_id 1234567

Co-Authored-By: Christian Holler (:decoder) <choller@mozilla.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates the Larrey bug-triage/fix workflow into BugBug as a locally runnable CLI tool, and adds a new “duplicate_bugs” agent with associated prompts/config to support duplicate detection workflows.

Changes:

  • Add a CLI entry script to run the bug-fix triage agent locally (dry-run, verbose) with Pydantic CLI/env settings.
  • Introduce Bugzilla + Firefox in-process MCP servers and Firefox evaluation/build helpers to support triage investigation.
  • Add a new duplicate-bugs tool (agent + prompts + config) and ensure prompt/rule artifacts are packaged in wheels.

Reviewed changes

Copilot reviewed 19 out of 21 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
scripts/run_bug_fix.py Local CLI wrapper for running BugFixTool with settings parsed from CLI/env.
pyproject.toml Adds runtime deps and includes prompt/rule artifacts in wheel builds.
bugbug/tools/duplicate_bugs/prompts/dupdetector_local_to_local.md Prompt for local crash-directory deduping.
bugbug/tools/duplicate_bugs/prompts/dupdetector_local.md Prompt for matching a local crash dir to Bugzilla bugs.
bugbug/tools/duplicate_bugs/prompts/dupdetector_bugs.md Prompt for finding duplicates among Bugzilla blockers.
bugbug/tools/duplicate_bugs/config.py Shared config + verdict parsing helpers for duplicate-bugs flows.
bugbug/tools/duplicate_bugs/agent.py Implements the duplicate-bugs agent modes and CLI-style runner logic.
bugbug/tools/duplicate_bugs/init.py Exports DuplicateBugsTool.
bugbug/tools/bug_fix/rules/unsupported-config.md Adds a triage ruleset about unsupported pref/config cases.
bugbug/tools/bug_fix/rules/README.md Documents how triage rulesets are discovered/used.
bugbug/tools/bug_fix/prompts/system.md System prompt for Larrey triage agent, including tool usage constraints.
bugbug/tools/bug_fix/firefox_tools/js_shell_evaluator.py Runs JS shell testcases and captures crash output.
bugbug/tools/bug_fix/firefox_tools/evaluate_testcase.py Runs browser testcases via grizzly and captures crash output.
bugbug/tools/bug_fix/firefox_tools/build_firefox.py Builds Firefox with ASAN fuzzing mozconfig.
bugbug/tools/bug_fix/firefox_tools/init.py Exposes Firefox tool implementations.
bugbug/tools/bug_fix/firefox_mcp.py MCP server exposing Firefox build + evaluation tools.
bugbug/tools/bug_fix/config.py Bug-fix tool config constants (tool allowlists, config keys).
bugbug/tools/bug_fix/bugzilla_mcp.py MCP server wrapping Bugzilla REST access (read/write w/ dry-run + confirm).
bugbug/tools/bug_fix/agent.py Main Larrey triage agent orchestration (Bugzilla + Firefox MCP, rules, streaming).
.gitignore Ignores .env for local runs.
Comments suppressed due to low confidence (1)

pyproject.toml:23

  • The bugsy dependency is unconstrained while most dependencies are version-pinned or at least have a lower bound. To avoid unexpected breakage from upstream releases, add a version range (minimum tested version, optionally an upper bound).
    "beautifulsoup4==4.14.3",
    "boto3==1.42.78",
    "claude-agent-sdk>=0.1.30",
    "httpx==0.28.1",

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread bugbug/tools/bug_fix/firefox_tools/evaluate_testcase.py
Comment thread bugbug/tools/bug_fix/config.py
Comment thread bugbug/tools/duplicate_bugs/agent.py
Comment thread bugbug/tools/duplicate_bugs/agent.py
Comment thread bugbug/tools/duplicate_bugs/agent.py
Comment thread bugbug/tools/bug_fix/firefox_tools/evaluate_testcase.py
Comment thread bugbug/tools/bug_fix/firefox_tools/evaluate_testcase.py
Comment thread bugbug/tools/duplicate_bugs/agent.py
@suhaibmujahid suhaibmujahid requested a review from marco-c April 22, 2026 20:03
@suhaibmujahid suhaibmujahid marked this pull request as ready for review April 22, 2026 20:03
Comment thread bugbug/tools/bug_fix/firefox_tools/build_firefox.py Outdated
Comment thread bugbug/tools/bug_fix/firefox_tools/build_firefox.py Outdated
Comment thread bugbug/tools/bug_fix/firefox_tools/evaluate_testcase.py Outdated
Comment thread bugbug/tools/bug_fix/firefox_tools/evaluate_testcase.py Outdated
suhaibmujahid and others added 2 commits April 22, 2026 16:44
Co-authored-by: Marco Castelluccio <mcastelluccio@mozilla.com>
@marco-c marco-c changed the title Integrate Larrey into BugBug Integrate bug fix/triage tool into BugBug Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants