Skip to content

Promote Develop: Read CodeRabbit's Rate-Limit Reply With Markup Around Its Sentence - #3931

Merged
ptr727 merged 1 commit into
mainfrom
develop
Nov 8, 2026
Merged

ptr727 merged 1 commit into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Summary

Promotes #3930 to main.

  • A rate-limited CodeRabbit no longer holds pr_review.py wait or merge (Read CodeRabbit's Rate-Limit Reply With Markup Around Its Sentence #3930). CodeRabbit's command reply now wraps Review rate limited. in definition-list and break markup, which the vocabulary pattern in scripts/reviewers/coderabbit.json did not tolerate. The reader returned no limit, so the pending CodeRabbit check held wait to its timeout and merge at CHECKS_PENDING. The pattern now accepts whitespace and bare dl, dd, dt, br, p tags before the sentence, and both paths release through the existing rate-limit rule. The digest still reports other_rate_limited.

Closes #3928

🤖 Generated with Claude Code

…3930)

## Summary

CodeRabbit's rate-limit reply now puts definition-list and break markup
between its `</summary>` and the sentence `Review rate limited.`. The
second `rate_limit` pattern in `scripts/reviewers/coderabbit.json`
allowed only whitespace there, so it never matched. `rate_limited_by`
then read no limit, `other_rate_limited` stayed empty, and
`limited_since` never cleared the pending CodeRabbit check. That check
held `wait` to its timeout (exit 30) and `merge` at `CHECKS_PENDING`.

The pattern now tolerates whitespace and bare `dl`, `dd`, `dt`, `br`,
`p` tags between the summary and the sentence. It still needs the reply
marker, the `Action not completed` summary, and the sentence directly
after the markup, so ordinary comments do not match.

## Root cause

The pattern was the whole story. Both `wait` (`held_checks_open`) and
`merge` (`items`) already route through `hosted_reviews_running`, which
already releases a reviewer whose newest output is a rate limit posted
since its check began. No second code path needed a change, so the
maintainer's decision to hold neither on a rate-limited CodeRabbit is
met by the reader fix alone. The digest still reports the limit as
`other_rate_limited`.

## Tests

A fixture of the new reply shape, with a placeholder invocation hash,
joins the existing two. Tests cover the reader, `wait` (exit 0,
`other_rate_limited` still printed) and the merge gate's unmet items,
plus a near miss with text before the sentence.

## Notes

- `scripts/README.md` states that only CodeRabbit's limit is read and
which tags the reply may carry.
- `merge`'s informational `pending=` line on a refusal still names any
unfinished check, rate limited or not. It decides nothing.

Refs #3928

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* CodeRabbit rate-limit replies with supported HTML formatting are now
recognized correctly.
* Older rate-limit comments no longer clear a pending review check; only
replies posted after the check began are considered.
* Rate-limited hosted reviews no longer keep a wait pending, and the
status digest reports the rate limit.
* **Documentation**
  * Clarified how CodeRabbit rate-limit replies affect pending checks.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 8, 2026 00:58
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 20ac62f and 0ed3fe8.

Files selected for processing: 4

  • scripts/README.md
  • scripts/reviewers/coderabbit.json
  • tests/test_pr_merge.py
  • tests/test_pr_review.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified, and the changes include targeted test coverage for formatted rate-limit replies across reading, waiting, reporting, and merge-gate behavior.

No open issues 🎉

What changed in this PR

This pull request promotes the CodeRabbit rate-limit handling fix from Develop to main. It recognizes formatted rate-limit replies so pending review and merge checks are released correctly while preserving digest reporting.

Changes:

  • Accepts supported bare HTML tags around CodeRabbit’s rate-limit sentence.
  • Adds reader, wait, and merge coverage for formatted replies and near misses.
  • Documents the supported reply markup and rate-limit behavior.
  • Notes a minor documentation consistency nit regarding the carried review contract.
File Summary
tests/​test_pr_review.py Tests formatted CodeRabbit replies, reader behavior, wait handling, and reporting.
tests/​test_pr_merge.py Verifies formatted rate-limit replies do not hold the merge gate.
scripts/​reviewers/​coderabbit.json Expands the rate-limit pattern to accept supported markup.
scripts/​README.md Documents rate-limit handling and accepted reply tags.

This pull request is ready to be approved.

Review effort: Lite

@codecov

codecov Bot commented Nov 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.26%. Comparing base (c237375) to head (0ed3fe8).
⚠️ Report is 478 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3931   +/-   ##
=======================================
  Coverage   78.26%   78.26%           
=======================================
  Files          35       35           
  Lines       12328    12328           
=======================================
  Hits         9648     9648           
  Misses       2680     2680           
Flag Coverage Δ
python-3.13 78.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727

ptr727 commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@ptr727
ptr727 merged commit 2453533 into main Nov 8, 2026
14 checks passed
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.

A Rate-Limited CodeRabbit Holds pr_review.py wait Until Its Timeout

2 participants