Repository navigation
fix(scripts): count every Bugbot trigger shape that starts a review - #3949
Conversation
`bugbot-request-marker.sh` recognised a trigger only when the whole comment body was exactly `@cursor review`. A comment posted through the GitHub connector gains a footer the caller never wrote, and on 2026-09-22 that shape drew a reaction and started a Bugbot check-run 15 seconds later (monorepo#3520). The check read such a comment as "not a trigger", so a pull request could carry a live, unpaired Bugbot request while the check printed `triggers=0` and exited clean. Measured over 2026-09-16..23 this was 27 of 31 triggers in one repository. A trigger is now a comment whose FIRST LINE is exactly the command, whatever follows on later lines. It needs its marker like any other, ends a pairing window like any other, and is held to `--head` when it is the last one. A command with text above it, indented, or inside a sentence is still not counted, each pinned by a negative control. The disclosure guard already reports that shape as an undisclosed trigger and never grants it the bare-trigger exemption; tests now pin both, and that a disclosure comment before it does not clear it. `--help` printed a fixed line range that the longer header would have cut short; the range is updated and a test now pins its first and last line. Part of #3520 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Controlled measurement for #3520, shape 1 of 4: the command inside a sentence. This line names @cursor review in the middle of prose, below a disclosure line, to see whether Bugbot starts. The result is recorded in a later comment. |
|
Measurement comment for #3520, shape 2 of 5. While Bugbot was being observed, this comment's whole body was the Bugbot review command followed by the word |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 8e1a626b-a0df-4ca8-a7ce-2d33b351fd34) |
|
Measurement comment for #3520, shape 3 of 5. While Bugbot was being observed, this comment's body was the Bugbot review command alone on its first line, then a blank line, a horizontal rule and the footer the GitHub connector appends to comments. It was edited afterwards only to add this disclosure line; the edit history shows the original body. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 7a489eaf-61c2-4fa7-955a-873343b940bb) |
|
|
@cursor review |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 3266b1af-18f1-4562-a17c-7c1ebb225966) |
@cursor review |
The review-lanes guide said Bugbot exact-matches the whole comment body, "so any extra line silently voids the request". That was inferred from two cases on 2026-07-20 and both review-request checks were built on it. A controlled measurement on monorepo#3949 on 2026-10-07, each shape posted on its own and Bugbot's check-run read back, refutes it: exactly the command started 8 s later the command with more text on the same line started 8 s later the command, then a footer on later lines started 8 s later a disclosure line, then a sentence naming it none in 135 s a disclosure line, then the command alone none in 137 s So Bugbot starts on a comment that OPENS with the command; text above it voids the request and text after it does not. `bugbot-request-marker.sh` now counts every comment that opens with the command: its first non-blank line, flush left, begins with the command and then ends or continues after whitespace. That adds the same-line shape to the footer shape from the previous commit. Letter case, a leading blank line and up to three leading spaces were not measured and are counted as well, because the costly error is a live request read as none; these are the shapes the disclosure guard already reads as trigger-led. A command inside a sentence, below another line, quoted, in a code block, or a longer word that starts with it is not counted, each with its own negative control. The guides and the checks' own comments state the measured rule with its date and table, and the test pins those rows and requires the refuted sentence to be gone. Posting is unchanged: the composer still emits only the exact bare body, the one shape the disclosure guard exempts. `--help` now ends where the code starts instead of at a line number. Fixes #3520 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measurement record for #3520: which comment shapes start BugbotMeasured on this pull request on 2026-10-07 at head
Result: Bugbot starts on a comment that opens with the command. Text after the command, on the same line or on later lines, does not stop it. Text above the command does. What this does and does not show:
Comments 2 and 3 had to open with the command, so they carried no disclosure line while they were measured. I edited both afterwards to add one. Their edit history shows the original bodies, and the edits started no new Bugbot run. Evaluated as a user, with the check from this branch against real comments:
|
An independent review of the previous two commits found the counting rule drawn too narrowly, in the direction this change exists to close. It counted a comment only when its first line BEGAN with the command, flush left, followed by whitespace or the end of the line. Five shapes were measured, and the only one known not to start Bugbot is the command below the first line. Everything else the rule left out was an inference, not a measurement: text before the command on the first line, punctuation straight after it, two spaces or a tab inside it, four leading spaces or a tab (a code block to Markdown, but Bugbot reads the raw body), a quotation mark, a no-break space. The check now leaves out only the measured negative. A trigger is a comment whose first non-blank line names the command anywhere in it, in any letter case and with any whitespace between the two words, as long as `review` ends the word. A counted comment that was not a request shows up as one unpaired trigger, which is the cheap error. Blank lines are recognised by any Unicode whitespace, so a line holding only a no-break space is skipped the way the disclosure guard skips it. The guide and the header now say exactly what was measured (three shapes that started Bugbot, two that did not, both of the latter below a disclosure line) and stop claiming more. Two comments that still gave "must be the whole body" as the reason are corrected. Part of #3520 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Readiness at head
|
| Input | main |
This head |
|---|---|---|
| The five bodies measured above, exactly as they were posted | 1 trigger (the exact body only) | 3 triggers: the three that started Bugbot. The two that did not start it are not counted. |
| monorepo#3500, where the footer shape was first seen | triggers=0 |
triggers=1 paired=1 |
| This pull request's own comments | not run | triggers=1 paired=1, exit 0 |
| This pull request with its current head named | not run | exit 1, STALE-HEAD: the one Bugbot request here was made at the earlier head 24749fc7, which is true |
The disclosure check also reads every comment of mine on this pull request as compliant.
One thing this pull request does not change is declared in the description: the survey's own rule for matching a request to its marker still recognises only the exact form (#3955).
Why
The check that accounts for Bugbot review requests only recognised a request written in one exact form. Requests posted through the GitHub connector carry an extra footer and still start Bugbot, so a pull request could hold a live request that the check reported as "no requests", and most recent requests in this repository had that form.
What
The check now counts every form of request that could start Bugbot, leaving out only the one form measured not to, and the written rule about which forms start it is corrected to match a fresh measurement on this pull request. Requests are still posted in the one exact form, because that is the form proven to work everywhere.
Deferred: #3955 — the survey's own rule for matching a request to its marker still recognises only the exact form
Fixes #3520
🤖 Generated with Claude Code