Make frontend-triage needinfo footer name a specific person#6332
Open
msujaws wants to merge 2 commits into
Open
Make frontend-triage needinfo footer name a specific person#6332msujaws wants to merge 2 commits into
msujaws wants to merge 2 commits into
Conversation
…d-triage agent Extend the frontend-triage agent with two new triage judgments driven by rules and prompt (no ML models or new tools). It now verifies whether the bug is filed against the correct Bugzilla Product :: Component by matching the file paths it localizes against module ownership in mots.yaml, and it assesses an appropriate Mozilla severity (S1-S4) from user impact. At high confidence the agent records bugzilla_update_bug proposals for a corrected component/product and/or severity for human review; at medium/low confidence it reports the assessment only. Adds two rule files (component-verification.md, severity-assessment.md), the corresponding job steps and structured-output keys in the system prompt, and ComponentAssessment/SeverityAssessment submodels parsed into FrontendTriageResult.
The shared add_comment action appended a generic footer telling readers to "add a needinfo" without saying who. Thread the triggering user's email from the demo site down to the frontend-triage agent so the footer names them: manual runs needinfo the submitter, automatic runs (not yet implemented, or any run without a submitter) needinfo the triage owner. The email is injected server-side in the UI proxy (trusted, not spoofable), carried as a `triggered_by` input, serialized to TRIGGERED_BY via the existing model_to_env pipeline, and passed to add_comment through the ActionsRecorder. Adding `triggered_by` only to FrontendTriageInputs scopes the feature to that agent; other agents drop the field on validation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
The shared
add_commentaction appends a footer to every recorded Bugzilla comment telling the reader to "add a needinfo" — but it never says who to needinfo. This makes the frontend-triage agent's footer name a specific person:How
The submitter's email was previously verified for auth in the Next.js UI and then discarded. This threads it down to the agent:
app/api/runs/route.ts) injects the authenticated email server-side astriggered_by(trusted; never taken from the browser, so it can't be spoofed).triggered_bytoFrontendTriageInputsonly, so the existingmodel_to_envpipeline serializes it to aTRIGGERED_BYenv var. Other agents' schemas drop the field on validation, scoping the feature to frontend-triage.needinfo_target = triggered_by or "the triage owner"and passes it torun_frontend_triage, which sets it on theActionsRecorder.add_commentrenders the targeted footer when aneedinfo_targetis set, falling back to the original generic wording otherwise.Actions are recorded into
summary.jsonfor human review (not posted to Bugzilla directly), so a reviewer can adjust if a user's Bugzilla handle differs from their Mozilla email.Testing
libs/hackbot-runtime/tests/test_bugzilla_actions.py— added targeted-footer and triage-owner cases; the generic-footer case still passes.services/hackbot-api/tests/test_agents.py— addedTRIGGERED_BYenv-serialization tests (present when set, omitted when unset).🤖 Generated with Claude Code