Skip to content

fix(scripts): count every Bugbot trigger shape that starts a review - #3949

Merged
devantler merged 3 commits into
mainfrom
claude/review-bugbot-trigger-shapes-3520
Oct 7, 2026
Merged

devantler merged 3 commits into
mainfrom
claude/review-bugbot-trigger-shapes-3520

Conversation

@devantler

@devantler devantler commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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

`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>
@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer (interactive Claude Code session)

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.

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@devantler

devantler commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer (interactive Claude Code session)

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 please on the same line. It was edited afterwards only to add this disclosure line; the edit history shows the original body.

@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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)

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@devantler

devantler commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer (interactive Claude Code session)

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.

@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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)

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@devantler

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor

cursor Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot 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)

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer (interactive Claude Code session)

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

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer (interactive Claude Code session)

Measurement record for #3520: which comment shapes start Bugbot

Measured on this pull request on 2026-10-07 at head 24749fc7. Each shape was posted as its own comment with nothing else happening on the pull request, and the Cursor check-runs at the head were read before and after (every 10 seconds, for up to two minutes).

# Comment body when posted Posted (UTC) Bugbot check-run Bugbot reply
1 disclosure line, then a sentence naming the command 19:28:58 none in 135 s none
2 the command, then please on the same line 19:31:29 started 19:31:37 (+8 s) 19:31:40
3 the command, a blank line, a rule and the connector's footer 19:32:02 started 19:32:10 (+8 s) 19:32:13
4 exactly the command 19:32:26 started 19:32:34 (+8 s) 19:32:36
5 disclosure line, then the command alone on its own line 19:35:35 none in 137 s none

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:

  • Bugbot is at its usage limit, so every run it started ended as "couldn't run - usage limit reached" and no review quota was spent. The question measured is whether a comment starts Bugbot, and a started run is visible either way.
  • Shapes 1 and 5 are "did not start" readings taken minutes before and after three consecutive starts, so Bugbot was responsive around both. There is no closing control after shape 5.
  • Letter case, a leading blank line and leading spaces were not measured. The check counts them as triggers, on the reasoning that a live request read as none is the costly error.
  • A short-lived eyes reaction appeared on shapes 2 and 3 while Bugbot worked and was gone afterwards, so it is not a reliable sign and the table does not use it.

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:

  • This pull request, after the measurement: triggers=1 paired=1 unpaired=0 stale-head=0, exit 0, and the disclosure check reports all eight of my comments compliant.
  • monorepo#3500, where the footer shape was first seen: the check on main prints triggers=0; the check from this branch prints triggers=1 paired=1. That is the request main could not see.

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

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T21:00:34.488842Z 0dac26a Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 0dac26a763

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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

@devantler

Copy link
Copy Markdown
Contributor Author

🤖 Generated by the Agentic Engineer (interactive Claude Code session)

Readiness at head 0dac26a7631bd842e40ead3ecd7498c649a665ce

Tested. CI is green at this head: 73 checks passed, 41 skipped by path filter, none failed or pending. No unresolved review thread, no conflict with main.

Reviewed. Codex reviewed this head and found no major issues (its comment names commit 0dac26a763). CodeRabbit was rate limited until 21:23Z and was not requested. Bugbot is at its usage limit, which the measurement above shows directly. Before any external request, an independent reviewer that did not write the change went through the first two commits; its two real findings are what the third commit fixes (the counting rule was drawn too narrowly, and the guide claimed more than was measured).

Tried as a user, running the check from this head against real comment bodies:

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

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.

Bugbot started on a trigger comment with trailing text, contradicting the exact-match premise the checks rely on

1 participant