Repository navigation
Conversation
hackbot-api now puts a front matter block at the top of every Bugzilla comment it posts: the run, the action, the agent and a link to the run in the Hackbot UI. BMO's Hackbot extension hides the block and shows the agent and the link in the comment header instead (bug 2086124). The block is added at apply time, so a model can't write or change it, and the Hackbot UI and Slack never show it. ApplyContext carries the action ID; a field update merged with a comment carries the comment's ID. The block is left out when the action has no ID (older summaries) or a value isn't an identifier, since BMO would show it as text. Agent text posted without our block (those comments, a comment inside update_bug's changes, attachment comments and new-bug descriptions) starts on a new line when it begins with a rule, so BMO can't read a block the model wrote as metadata.
Author
|
It seems that the test failure is related to GitHub’s downtime, in the same way as the pull request to BMO. Please rerun the test once the issue has been resolved. |
suhaibmujahid
requested changes
Nov 12, 2026
suhaibmujahid
left a comment
Member
There was a problem hiding this comment.
Thank you! It looks great. I left some simple comments.
- The front matter's `action` is now the RunAction row ID, which every action has, instead of the recorder's ref. - Drop the runtime identifier check: run IDs, row IDs and registered agent names always satisfy BMO's parser, and a new test keeps agent names that way. - Simplify UpdateBugHandler's comment handling, and rename comment_id to comment_action_id and _unparsed to _escape_front_matter.
This branch has not been deployed
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.
For Bug 2086124.
Important
Deploy this only once mozilla/bmo#2819 is in production and BMO's
hackbot_userparam names the account hackbot-api posts as. Until then, Bugzilla shows the block as plain text at the top of every Hackbot comment.hackbot-api now puts a front matter block at the top of every Bugzilla comment it posts:
BMO's Hackbot extension hides the block from readers, bugmail, webhooks and Pulse, and shows the agent and a link to the run in the comment header instead. REST
raw_textkeeps it. This is what native feedback (bug 2086122) will attach to.bugzilla_handler.py, so a model can't write or change it, and the Hackbot UI and Slack never show it.ApplyContextcarries the action ID (RunAction.ref). When a field update and a comment are merged into one PUT, it carries the comment's ID.---, so BMO can't read a block the model wrote as metadata. That covers the case above, a comment insideupdate_bug'schanges, attachment comments and new-bug descriptions.Testing
🤖 Generated with Claude Code