Skip to content

Make frontend-triage needinfo footer name a specific person#6332

Open
msujaws wants to merge 2 commits into
mozilla:masterfrom
msujaws:frontend-triage-needinfo-target
Open

Make frontend-triage needinfo footer name a specific person#6332
msujaws wants to merge 2 commits into
mozilla:masterfrom
msujaws:frontend-triage-needinfo-target

Conversation

@msujaws

@msujaws msujaws commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

What

The shared add_comment action 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:

  • Manually triggered (today's only path, from the hackbot demo site): needinfo the authenticated user who clicked "Trigger".
  • Automatically triggered (not yet implemented, or any run without a submitter): needinfo "the triage owner".
  • Every other agent: unchanged generic footer.

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:

  1. UI proxy (app/api/runs/route.ts) injects the authenticated email server-side as triggered_by (trusted; never taken from the browser, so it can't be spoofed).
  2. API schema adds triggered_by to FrontendTriageInputs only, so the existing model_to_env pipeline serializes it to a TRIGGERED_BY env var. Other agents' schemas drop the field on validation, scoping the feature to frontend-triage.
  3. Agent resolves needinfo_target = triggered_by or "the triage owner" and passes it to run_frontend_triage, which sets it on the ActionsRecorder.
  4. Runtime add_comment renders the targeted footer when a needinfo_target is set, falling back to the original generic wording otherwise.

Actions are recorded into summary.json for 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 — added TRIGGERED_BY env-serialization tests (present when set, omitted when unset).
  • Verified all three footer variants render correctly end-to-end via the shared action.

🤖 Generated with Claude Code

msujaws and others added 2 commits July 2, 2026 12:55
…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>
@msujaws
msujaws requested review from a team as code owners July 17, 2026 21:37
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.

1 participant