Repository navigation
Reply when an org member pings the reviewer account - #210
Merged
Merged
Conversation
The review-request poll only looked for PRs where the reviewer account was
asked to review. A comment that @-mentions it ("what do you think ...?"), on
an issue or on a PR, was never seen, so nothing answered it.
The same five-minute poll now also looks for those pings. The gate opens when
a review is requested or an org member's newest mention has no later comment
from either of our accounts, and the job answers pings before reviews. A ping
from anyone outside the org-member list never opens the gate, starts a session
or gets a post.
The model reads a thread rendered with only members' and our own words, in a
session with no GitHub token that can write only into its work directory. A
separate step checks the reply, breaks every @-mention but the pinger's, looks
again for an answer that landed meanwhile, and posts one comment.
Closes #207
bbondy
approved these changes
Nov 2, 2026
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.
Closes #207
User impact: an org member who mentions the reviewer account in a comment on an issue or PR now gets a written reply within about five minutes; before, only a review request reached it and a mention went unanswered.
The problem
The reviewer account can only be reached by requesting its review on a PR. A comment such as "what do you think
@netzenbot-reviewer?" on an issue, where no review can be requested, or on a PR, is never seen, because the five-minute poll asks GitHub only for review requests. brave/bravebot#3630 has had exactly that question unanswered since 2026-11-01 16:12 UTC.Reproduce
./scripts/check-review-requests.shWith this change the question is found:
tests/test_pings.pyis new; its gate and job tests fail without the change.The fix
The same five-minute poll now also looks for pings: an org member's mention of the reviewer account, in an open issue or PR in either of the project's repositories, that neither of our two accounts has commented after. The gate opens for a ping when no review is waiting, and the job answers pings before reviews, because a reply is a short session and a review can take hours. Three properties are deliberate:
Caps on attempts, on replies per day and on a ping's age keep it bounded;
docs/ping-replies.mdhas the numbers.Test plan
python3 -m pytest tests/— 1680 passed, 4 failed; the same 4 fail on an unmodifiedorigin/masteron this host, whose config names a separate reviewer accountpython3 -m ruff check .andpython3 -m ruff format --check .— cleanmake check-reviewdog-full— no findings in these filesNot covered: when I re-ran the gate after the change it opened for a review newly requested on #3660, which is checked first, so the gate's ping branch is shown by the tests and not by that run. Nothing has been posted to GitHub by this code. The call that posts was checked only for how
ghpasses a body on stdin, and the first real reply will be to brave/bravebot#3630 after this is deployed, if it is still inside the 72 hour window. In the real run the session reported Bash and Grep unavailable, so it answered from the specification documents and said so. A mention of the bot account when a separate reviewer account is configured is not a ping, and a reply never changes code.