-
Notifications
You must be signed in to change notification settings - Fork 343
Add product/component verification and severity assessment to frontend-triage agent #6315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
msujaws
wants to merge
1
commit into
mozilla:master
Choose a base branch
from
msujaws:frontend-triage-improvements
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
50 changes: 50 additions & 0 deletions
50
.../frontend-triage/hackbot_agents/frontend_triage/rules/component-verification.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Product / component verification | ||
|
|
||
| Bugs are frequently filed against the wrong `Product :: Component`. Part of triage is | ||
| confirming the bug is filed where it belongs and, when it isn't, proposing the correct | ||
| `Product :: Component` so it reaches the right team. | ||
|
|
||
| Do this **after** you have localized the affected code (you need concrete file paths to | ||
| verify ownership), and record the result in the `component_assessment` structured-output | ||
| object. | ||
|
|
||
| ## How to verify | ||
|
|
||
| 1. **Find the ownership map.** The Firefox source tree ships a module-ownership file, | ||
| `mots.yaml` (the maintainer/module metadata; commonly at the repo root or under | ||
| `source/`). Glob for it (`**/mots.yaml`) and Read it. Each module lists path globs it | ||
| owns (e.g. an `includes:` list) and its Bugzilla product/component (e.g. under a | ||
| `meta`/`components` mapping — field names may vary slightly, read the file to see the | ||
| shape). | ||
| 2. **Match your localized paths to a module.** Take the file path(s) you identified as | ||
| the root cause and find the module whose path globs own them. That module's Bugzilla | ||
| product/component is the _expected_ component for a bug in that code. Use Searchfox to | ||
| confirm ownership when a path spans directories or the mapping is ambiguous. | ||
| 3. **Compare with the bug.** Compare the expected `Product :: Component` against the | ||
| bug's current values. | ||
|
|
||
| ## What to record | ||
|
|
||
| - If the current component matches, set `component_assessment.correct` to `true`, leave | ||
| the suggestions null, and give a one-line rationale. | ||
| - If it clearly belongs elsewhere, set `correct` to `false`, put the corrected values in | ||
| `suggested_product` / `suggested_component`, and in the rationale cite **both** the | ||
| `mots.yaml` module that owns the path **and** the path evidence. | ||
|
|
||
| ## Confidence and field changes | ||
|
|
||
| - **High** — the localized path is unambiguously owned by one module and the mismatch is | ||
| clear. Only then may you record a `bugzilla_update_bug` proposing the corrected | ||
| `product` / `component` (see the system prompt's recording rules). Cite the mots.yaml | ||
| module and path in the `reasoning`. | ||
| - **Medium / low** — the code area is uncertain or the path is owned by multiple modules. | ||
| Report the assessment (and your best suggestion) in the comment and structured output, | ||
| but do **not** record a field change. | ||
|
|
||
| ## Interaction with scoping | ||
|
|
||
| A wrong-component finding can mean the bug is out of scope for a _frontend fix_ — e.g. | ||
| the code you localized is Core (layout, DOM, graphics), not a Firefox frontend | ||
| component. In that case, still record the component assessment and the proposed | ||
| correction, but do not invent a frontend fix plan: set `actionable` per the scoping | ||
| rules and let the comment focus on the re-triage. | ||
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
36 changes: 36 additions & 0 deletions
36
agents/frontend-triage/hackbot_agents/frontend_triage/rules/severity-assessment.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Severity assessment | ||
|
|
||
| Assess an appropriate Mozilla severity for the bug and record it in the | ||
| `severity_assessment` structured-output object. Base the judgment on **user impact and | ||
| reach** as evidenced by the bug report and the code you investigated — how badly the | ||
| user is affected, how many users hit it, and whether a workaround exists. | ||
|
|
||
| ## Severity definitions | ||
|
|
||
| - **S1 — catastrophic.** Crash, hang, data loss, security issue, or a bug that blocks | ||
| major functionality with **no workaround**. Affects a large number of users. | ||
| - **S2 — serious.** Major functionality is broken or a severe UX problem, and the | ||
| workaround (if any) is painful or non-obvious. Affects many users. | ||
| - **S3 — normal.** Blocks non-critical functionality, or a reasonable workaround exists. | ||
| **This is the default for most frontend papercuts.** | ||
| - **S4 — minor / trivial.** Cosmetic issues, small polish, or edge cases with negligible | ||
| impact. | ||
|
|
||
| ## Guidance | ||
|
|
||
| - Frontend UI/UX papercuts are usually **S3** (or **S4** when purely cosmetic). Reserve | ||
| **S1 / S2** for genuine breakage: crashes, data/state loss, or a broken core workflow | ||
| with no easy workaround. | ||
| - Weigh: is it functional vs cosmetic? Is there a workaround? How frequently and how | ||
| broadly is it hit (mainline path vs rare configuration)? | ||
| - Do **not downgrade** an existing higher severity unless you have strong evidence the | ||
| impact is lower than currently recorded. | ||
|
|
||
| ## Confidence and field changes | ||
|
|
||
| - **High** — impact is clear-cut (clearly cosmetic, or clearly a crash/data-loss). Only | ||
| then may you record a `bugzilla_update_bug` proposing the `severity` (see the system | ||
| prompt's recording rules), with a `reasoning` citing the impact evidence. Prefer not to | ||
| propose a change when the bug already carries a reasonable severity. | ||
| - **Medium / low** — suggest a severity in the comment and structured output, but do | ||
| **not** record a field change. |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could do this in bugbot instead, without an LLM, so it'll be cheaper and more deterministic.