Send newly filed frontend bugs from Mozilla staff for automatic triage - #2963
Open
msujaws wants to merge 1 commit into
Open
Send newly filed frontend bugs from Mozilla staff for automatic triage#2963msujaws wants to merge 1 commit into
msujaws wants to merge 1 commit into
Conversation
hackbot's frontend-triage agent produces a root-cause analysis and fix plan for a Firefox frontend bug, and posts it to the bug when it is confident — but nothing was starting runs, so every triage needed a human to trigger it from the hackbot UI. This rule starts them for newly filed bugs, hourly. Scoped deliberately narrowly, because the agent's analysis lands on the bug unattended: - Reporters we expect to file well. Staff membership comes from the IAM roster we already maintain (`People.is_mozilla`), which covers QA as well now that they file from @mozilla.com addresses. The roster is also the reason this lives here rather than in bugbug: it maps a staffer's Bugzilla address to them, so employees who file from a personal account are still in scope, and a @mozilla.com address IAM doesn't know about is not. - One component to start, `Firefox :: New Tab Page`. The component list is config, so widening it is an edit to configs/rules.json. The rule makes no Bugzilla writes of its own — it starts runs and reports what it started. `max_triggers` caps how many runs one invocation may start, since each is real LLM spend, and bugs left over (over the cap, or whose run failed to start) are excluded from the report and the cache so they come back on the next run rather than being silently dropped. `HACKBOT_API_URL` defaults to the production deployment so the cron host needs no extra environment, the way `BUGBUG_HTTP_SERVER` does; set it to point at another deployment. `People` is injectable because configs/people.json is gitignored and absent in CI, so the reporter filter could not otherwise be tested at all. Requires `hackbot_api_key` in configs/config.json; the rule fails up front and reports it if the API URL is explicitly blanked.
marco-c
reviewed
Jul 31, 2026
Comment on lines
+58
to
+63
| # The IAM roster covers QA too, now that they file from @mozilla.com | ||
| # addresses, so staff membership is the whole filter. It beats a check on | ||
| # the address itself, which would miss the employees who file from a | ||
| # personal Bugzilla account. | ||
| if not self.people.is_mozilla(bug["creator"]): | ||
| return None |
Contributor
There was a problem hiding this comment.
Instead of @mozilla only, we could extend to everyone with "editbugs", which we also expect to file well.
You can simply change the query to check group membership (see for example the spambug case).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hackbot's
frontend-triageagent produces a root-cause analysis and fix plan for a Firefox frontend bug, and posts it to the bug when it's confident — but nothing was starting runs, so every triage needed a human to trigger it from the hackbot UI. This rule starts them for newly filed bugs, hourly.Depends on mozilla/bugbug#6439, which makes a confident result apply itself and report to Slack. That should land first, otherwise a triggered run just records actions for manual review.
Scope
Deliberately narrow, because the agent's analysis lands on the bug unattended:
People.is_mozilla), which covers QA too now that they file from@mozilla.comaddresses. The roster is also why this lives here rather than in bugbug: it maps a staffer's Bugzilla address to them, so employees who file from a personal account are still in scope, and a@mozilla.comaddress IAM doesn't know about is not.Firefox :: New Tab Page. The component list is config, so widening it is an edit toconfigs/rules.json.The rule makes no Bugzilla writes of its own — it starts runs and reports what it started.
max_triggers(3) caps how many runs one invocation may start, since each is real LLM spend. Bugs left over — over the cap, or whose run failed to start — are excluded from both the report and the cache, so they come back on the next run rather than being silently dropped.Notes
HACKBOT_API_URLdefaults tohttps://hackbot-api.moz.toolsso the cron host needs no extra environment, the wayBUGBUG_HTTP_SERVERdoes; set it to point at another deployment. It needshackbot_api_keyinconfigs/config.json.Peopleis injectable via the constructor becauseconfigs/people.jsonis gitignored and absent in CI — otherwise the reporter filter couldn't be tested at all.Added to
CheckWikiPage.skipped_ruleswhile this is a pilot; it wants a wiki entry before it's considered general-purpose.Testing
72 passed, including 24 for this rule: the reporter filter (staff kept, personal-address staffer kept, community dropped, unknown@mozilla.comdropped), the query shape, the trigger/cap behaviour, and the email template rendering.Dry-run against live Bugzilla, with the roster check stubbed to a simple
@mozilla.comtest sinceconfigs/people.jsonneeds IAM secrets:Widened to 90 days it's 131 matched → 86 kept, dropping
@gmail.com,@aggies.usu.edu,@gmx-topmail.deand@protonmail.com— so the filter is doing real work.Observed volume is ~2.8/day on active days with a peak of 8, so the cap acts as a burst limiter rather than a throttle. Worth knowing that the first production run fires 3 immediately, since the cache starts empty and there's already a backlog in the window; it drains over the following few hours.