Skip to content

Give Hackbot agents a tool to report problems - #7249

Open
ayoubdiourin7 wants to merge 3 commits into
mozilla:masterfrom
ayoubdiourin7:ayoubdiourin7/give-hackbot-agents-a-tool-to-report-their-probl
Open

ayoubdiourin7 wants to merge 3 commits into
mozilla:masterfrom
ayoubdiourin7:ayoubdiourin7/give-hackbot-agents-a-tool-to-report-their-probl

Conversation

@ayoubdiourin7

@ayoubdiourin7 ayoubdiourin7 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7150

@ayoubdiourin7
ayoubdiourin7 requested a review from a team as a code owner October 20, 2026 18:48

@suhaibmujahid suhaibmujahid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! It looks nice and clean! Please see my comments.

async def report_problem(
recorder: ActionsRecorder,
severity: Annotated[
Literal["info", "warning", "error"],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The options aren't a great fit here, they are matching logging levels, not severity. Maybe we could use something like High / Medium / Low. Or maybe something clear that that.

We might also want a field for type, with values along the lines of Blocker, Improvement, Error, etc.

@cache
def _client() -> sentry_sdk.Client:
return sentry_sdk.Client(
dsn=settings.agents_sentry_dsn, environment=settings.environment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since they will be mixed with other crashes and errors, we need to make sure that they are easy to filter. I guess "kind": "agent_feedback" would help with that.

event_id = _client().capture_event(
{
"message": params["title"],
"level": params["severity"],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this limited to "info", "warning", "error"?

"run_id": ctx.run_id,
},
"fingerprint": ["agent-feedback", params["title"]],
"contexts": {"feedback": {"message": params["message"]}},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we have the agent version, we should proved it here.

This branch has not been deployed

No deployments
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.

Give hackbot agents a tool to report their problems

2 participants