Skip to content

pr_review.py Detects Only CodeRabbit's Auto-Review Rate Limit, Not the One It Returns to an Explicit Review Command #1425

Description

@ptr727

A driver has to tell three states apart: the reviewer has not run yet, it ran and said nothing, and it cannot run. scripts/pr_review.py surfaces the third for CodeRabbit only in the auto-review case, and this repository is one where auto-review never fires, so the case it does not detect is the only case this repository can produce.

The two shapes

RATE_LIMITED (line 221) is auto-generated comment:\s*rate limited by\s*(\S+?)\s*-->, matching the marker on a spontaneous notice:

<!-- This is an auto-generated comment: rate limited by coderabbit.ai -->

An explicit @coderabbitai review comment gets a different one back, observed on #1423 on 2026-09-07, three times across two heads:

<!-- This is an auto-generated reply by CodeRabbit -->
<!-- CodeRabbit review command invocation: v2:<hex> -->
<details>
<summary>⚠️ Action not completed</summary>

Review rate limited.

reply rather than comment, and the service name is not in the marker at all, so the existing pattern cannot match it and the digest reports no other_rate_limited.

Why it matters here

docs/pr-reviewer-reference.md records that CodeRabbit does not auto-review a public repository under ten stars, so on this repository every CodeRabbit review is prompted and every rate limit it reports arrives in the shape above. The digest therefore reads identically for "prompted and rate limited" and "never prompted", which is the collapse of three outcomes into one that AGENTS.md "Context and Delegation Discipline" names for a wait, applied to the digest a wait is read from.

Neither shape carries a retry time in the command-reply case. The spontaneous notice does, a Next included review available in N minutes countdown, which is separately unparsed (that part is already known and is not what this issue asks for).

What this asks for

Detect the command-reply shape as well, and surface it the same way, so a driver reading status sees that CodeRabbit was asked and could not run. Keying on Review rate limited. inside an Action not completed block from a known reviewer login is one way. Attributing the service from the commenting login rather than from the marker is another, since this marker does not name it.

Worth deciding at the same time whether a rate limit with no stated time should read differently from one with a countdown, since pr-review-conduct "Which Reviewers a Repository Actually Has" tells a driver to wait for the time a notice names, and this shape names none.

Observed while driving #1423.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions