Skip to content

reviewhelper: surface a severity level on Review Helper comments - #7241

Open
cgsheeh wants to merge 6 commits into
mozilla:masterfrom
cgsheeh:reviewhelper-severity
Open

cgsheeh wants to merge 6 commits into
mozilla:masterfrom
cgsheeh:reviewhelper-severity

Conversation

@cgsheeh

@cgsheeh cgsheeh commented Oct 19, 2026

Copy link
Copy Markdown
Member

The review agent now gives each finding a severity (critical, major, minor or nit), a
category and a confidence, guided by a new rubric in the review prompt, and patch-scope
comments are always minor. reviewhelper-api stores these fields, summarizes findings by
severity in the main comment, and can add them to inline comments as reviewhelper:
YAML frontmatter behind the severity_frontmatter_enabled setting. The order and
explanation the agent already produced are now persisted so comment feedback can be
analysed against the agent's ranking and reasoning. The evaluation scorer also reports
metrics per severity.

Part of #7195

The review agent now gives each finding a severity (critical, major, minor or nit), a
category and a confidence, guided by a new rubric in the review prompt, and patch-scope
comments are always minor. reviewhelper-api stores these fields, summarizes findings by
severity in the main comment, and can add them to inline comments as `reviewhelper:`
YAML frontmatter behind the `severity_frontmatter_enabled` setting. The `order` and
`explanation` the agent already produced are now persisted so comment feedback can be
analysed against the agent's ranking and reasoning. The evaluation scorer also reports
metrics per severity.

Part of mozilla#7195
@cgsheeh
cgsheeh requested a review from a team as a code owner October 19, 2026 23:38
@cgsheeh

cgsheeh commented Oct 20, 2026

Copy link
Copy Markdown
Member Author

See mozilla-conduit/phabricator#124 for the Phab-side changes.

# Conflicts:
#	services/reviewhelper-api/app/review_processor.py

@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 good overall. Some comments regarding the unnecessary columns, I will do the db schema update and deploy to dev.

Comment thread bugbug/tools/code_review/data_types.py Resolved
Comment thread bugbug/tools/code_review/prompts.py Resolved
@cgsheeh

cgsheeh commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Here's a screenshot from https://phabricator-dev.allizom.org/D4268. I added a commit to change the config knob to be "on" by default, but we can disable via an environment variable if need be.

image

@cgsheeh
cgsheeh requested a review from suhaibmujahid October 28, 2026 02:20

@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.

Looks great! Thank you!

Comment on lines +326 to +327
suggestion.severity = CommentSeverity.MINOR
suggestion.category = CommentCategory.SCOPE

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.

I'm not sure if we need this.

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.

2 participants