Skip to content

Frontend triage severity as comment suggestion - #6679

Merged
crythms merged 4 commits into
mozilla:masterfrom
crythms:frontend-triage-severity-as-comment-suggestion
Aug 20, 2026
Merged

Frontend triage severity as comment suggestion#6679
crythms merged 4 commits into
mozilla:masterfrom
crythms:frontend-triage-severity-as-comment-suggestion

Conversation

@crythms

@crythms crythms commented Aug 20, 2026

Copy link
Copy Markdown
Member

The agent used to write severity straight to the bug's severity field. At confidence: high that happened with no human in between. It still works out a severity — it just suggests it at the end of the comment now, before the footer:

---

Suggested severity: S4
Purely cosmetic, no functional impact. Only visible on Nightly.

The block is left out entirely when the agent isn't confident about the impact. A level it's unsure of still reads like a judgement someone might act on so we avoid that.

Other relevant changes

Which confidence decides whether the block sev appears. The agent reports two, and they measure different things:

  • confidence — how sure it is that it found the cause in the code
  • severity_assessment.confidence — how sure it is about the user impact

The block is gated on the second one. They're independent: the agent can be certain a bug is cosmetic while having no idea which file is at fault, and that bug should still get a severity suggestion. The rules didn't distinguish the two before; they
do now.

notify.py uses the same threshold for its Slack S1 marker, so Slack can't flag an S1 on a bug whose comment says nothing about severity.

severity_assessment is now normalized in parse_plan. It came straight from the model's JSON before, so "High" instead of "high" would have silently dropped both the comment block and the Slack marker.

The agent wrote the severity it judged straight to the bug's `severity`
field, and at `confidence: high` that landed with nobody in between. Keep
the judgment, but deliver it as a suggestion a human applies: a two-line
block at the end of the triage comment, carrying `(currently S4)` when it
disagrees with what is on the bug.

`severity` was the only field any ruleset directed the agent to change --
`config.py` noted that no rule asks for a keyword -- so moving it left
`bugzilla.update_bug` with no caller. Dropping it from ENABLED_ACTION_TYPES
takes the field-change hook, its two validators and TRIAGE_FIELDS /
TRIAGE_KEYWORDS with it, and removes the `editbugs` requirement on the apply
account: the apply step coalesces a same-bug field change with the nearest
comment into one PUT, so a rejected change used to take the analysis comment
down with it. A comment is now the only thing the agent can write.

The block is withheld when the agent is not confident in the impact
judgment. That is `severity_assessment.confidence`, not the run's top-level
confidence about localizing the cause -- the two are independent, and the
rules conflated them. `notify.py` gates its S1 marker on the same threshold
so Slack cannot shout S1 at a team while the bug says nothing about
severity, and names it `(suggested S1)` now that nothing is written.

Both fields are normalized in `parse_plan` first. `severity_assessment` was
built straight from the model's free-form JSON, so a model writing "High"
would have read as "not high" and silently dropped both the comment block
and the Slack marker. TRIAGE_SEVERITIES survives to validate the level.
The old prompt asked the model to "state the severity conclusion" in the comment
with no format, so it landed wherever the model chose. That instruction is gone,
replaced by the block at the end -- but nothing stops the model from also writing
the level into its analysis, leaving a reader two declarations that can disagree.

Guards the declaration, not the mention: the regex is anchored to the line start,
so quoting a reporter or arguing why something is not S1 does not count. Absence
still passes, since a run with low severity confidence omits the block on purpose.
Drop the `(currently S4)` parenthetical. A reader has the severity field on
screen, so it restated something visible -- and worse, a comment is permanent
while the field is not, so "currently S4" is wrong the moment anyone changes it.
`(currently unset)` was redundant for the same reason. This also removes the only
part of the block that required reading and comparing the bug's current severity.

`Severity assessment:` becomes `Suggested severity:`, which answers "did the bot
change something?" in the label itself, and the `Rationale:` prefix goes -- the
sentences sit under the level.
No blank line between them. BMO renders every comment through `markdown-body`
with hard line breaks -- otherwise two decades of hard-wrapped plain-text
comments would reflow -- so a single newline is a line break, not a paragraph
join. The blank line before the `---` stays: without it the preceding line
parses as a setext heading.
@crythms
crythms requested a review from a team as a code owner August 20, 2026 03:47
@msujaws

msujaws commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Thanks!

@crythms
crythms merged commit 9f966ce into mozilla:master Aug 20, 2026
8 checks passed
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.

2 participants