Repository navigation
Conversation
…fo and CC users Each @Nickname in a new comment on an existing bug CCs the matching user and requests needinfo from them. Mentions in quotes, code and email addresses are ignored, ambiguous nicknames are skipped, and a mention never blocks the comment from being saved.
There was a problem hiding this comment.
🟡 Changes recommended
Multiple valid scenarios can incorrectly trigger mentions or roll back comment submission.
7 open findings
Allow multiple Needinfo flags for multiple mentions · New Remove multi-backtick inline code spans from mention parsing · New Support pipe characters in extracted mention nicknames · New Prevent ineligible mention users from rolling back comment updates · New Implement claimed @nickname mention behavior or correct PR scope Add stateful tests for mention processing and failure handling · New Remove redundant animation wait and duplicate timeout diagnostics
🧠 Review effort: Balanced
Only editbugs users can trigger mentions, at most 10 distinct nicknames are processed per update, and mentioned users who cannot already see the bug are skipped so a mention, typo or squatted nickname never grants access to a restricted bug.
- Create the needinfo flag type as multiplicable, matching production. - With a non-multiplicable needinfo type, request at most one needinfo instead of throwing flag_type_not_multiplicable. - Process each mentioned user in an eval under ERROR_MODE_DIE so a failure (e.g. add_cc's strict_isolation check) skips that user instead of rolling back the update. - Ignore mentions in multi-backtick code spans and allow | in nicknames, matching extract_nicks.
dklawren
requested review from
Xzzz and
cgsheeh
and
a balanced review from Copilot
October 8, 2026 21:19
There was a problem hiding this comment.
🟡 Changes recommended
Longer fenced code blocks can close early, causing mentions inside code to be processed.
1 open finding
7 resolved since last review
Allow multiple Needinfo flags for multiple mentions Prevent ineligible mention users from rolling back comment updates Support pipe characters in extracted mention nicknames Remove multi-backtick inline code spans from mention parsing Implement claimed @nickname mention behavior or correct PR scope Add stateful tests for mention processing and failure handling Remove redundant animation wait and duplicate timeout diagnostics
🧠 Review effort: Balanced
…prevent premature code block closure' Co-authored-by: Copilot Autofix powered by AI <[email protected]>
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.



Bug 2079840 - Support GitHub-style @Nickname mentions to needinfo and CC users
Summary
When a user with
editbugsadds a comment to an existing bug that contains@nickname, each mentioned user is CC'd and gets a needinfo request. Several mentions in one comment (@alice, @bob) each get a needinfo. Safeguards limit who can trigger mentions, how many are processed, and make sure a mention never grants access to a restricted bug.Behavior
nicknamefield of an enabled account. If a nickname matches several accounts, or none, it is skipped silently. It is never guessed.[email protected]), quoted lines (> ...), inline code (any number of backticks), fenced code blocks, and mentioning yourself.ERROR_MODE_DIE. A failure, such asadd_cc's strict_isolation check, skips that user and logs a WARN instead of rolling back the comment.Safeguards
editbugsusers trigger mentions (product-specific, the same check core uses). For everyone else,@nicknameis plain text, so there is no lookup, CC or needinfo.MAX_MENTIONS), and the rest are ignored. This prevents notification spam from one comment.Implementation
extensions/Needinfo/Extension.pmneedinfoflag type is now created withis_multiplicable => 1, matching production. This only affects new installs.bug_start_of_updatenow calls the existing form handling (moved unchanged into_process_needinfo_params), then_process_mentions. Mentions run second, so a needinfo just requested through the form is detected and not duplicated._extract_mentionsparses the comment text. It is a pure function covered by unit tests._users_for_mentionsresolves nicknames with one query and drops nicknames shared by more than one account._process_mentionsapplies the safeguards. Updates with no mentions return before any database work._cc_and_needinfoadds the CC and needinfo for one user.extensions/Needinfo/t/mentions.teditbugsgate, non-multiplicable types, no duplicate needinfo, and a failing CC not throwing.Known limitations
<code>are not ignored._users_for_mentions(one SQL query) has no unit test.Testing
test_sanity:extensions/Needinfo/t/mentions.t,t/001compile.t,t/002goodperl.t,t/005whitespace.t,t/critic.tall pass.