Skip to content

fix: add request-retry to review-bot-gate-helper for rate-limited bots#3017

Merged
marcusquinn merged 1 commit intomainfrom
bugfix/pulse-rate-limited-review-gate
Mar 7, 2026
Merged

fix: add request-retry to review-bot-gate-helper for rate-limited bots#3017
marcusquinn merged 1 commit intomainfrom
bugfix/pulse-rate-limited-review-gate

Conversation

@marcusquinn
Copy link
Owner

Summary

  • Add request-retry command to review-bot-gate-helper.sh that detects rate-limited review bots and requests a review retry (idempotent)
  • Update pulse.md to call request-retry on zero-review PRs, self-healing the rate-limit gap instead of skipping indefinitely

Root Cause

When review bots (CodeRabbit, Gemini) hit rate limits at PR creation time, they post quota notices instead of formal GitHub reviews. The pulse's mandatory review-count gate (gh pr view --json reviews --jq '.reviews | length') correctly blocks PRs with zero reviews — but the bots never come back to retry, so the PR is stuck forever. PR #2989 was blocked for 24+ hours by this exact scenario.

Fix Design

Deterministic, not intelligence-based. The detection (rate-limit string patterns, review count, idempotency marker) and action (post @coderabbitai review) have exactly one correct answer regardless of context — no judgment needed.

review-bot-gate-helper.sh request-retry <PR> [REPO]

  1. If formal reviews already exist → HAS_REVIEWS (exit 0)
  2. If retry already requested (HTML comment marker) → ALREADY_REQUESTED (exit 0)
  3. If no rate-limited bots found → NO_ACTION (exit 0)
  4. If rate-limited bots found → posts @coderabbitai review with marker → REQUESTED (exit 0)

pulse.md (one-line change)

Zero-review PRs now call request-retry before skipping. The formal review gate is unchanged — this is recovery, not bypass.

Validation

Tested live on PR #2989:

  • request-retry detected both coderabbitai and gemini-code-assist as rate-limited
  • Posted retry comment → CodeRabbit responded within 14 seconds
  • CodeRabbit posted a formal review (CHANGES_REQUESTED) within ~3 minutes
  • Formal review count went from 0 → 1
  • Second request-retry call returned ALREADY_REQUESTED (idempotent)
  • Third call (after review posted) returned HAS_REVIEWS

Closes #3005

When review bots are rate-limited at PR creation time, they post quota
notices instead of formal reviews. The pulse's zero-reviews gate then
blocks the PR indefinitely — bots never come back to retry.

Add a deterministic request-retry command that detects rate-limited bot
comments, posts @coderabbitai review to trigger a retry, and is
idempotent (safe to call every pulse cycle). Validated on PR #2989
which was stuck for 24+ hours due to this gap.
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@github-actions github-actions bot added the bug Auto-created from TODO.md tag label Mar 7, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 7, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 36 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 41942677-401b-48b2-9269-4eb8c1bb851b

📥 Commits

Reviewing files that changed from the base of the PR and between 81d382d and 59b6af8.

📒 Files selected for processing (2)
  • .agents/scripts/commands/pulse.md
  • .agents/scripts/review-bot-gate-helper.sh
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bugfix/pulse-rate-limited-review-gate

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Mar 7, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 108 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sat Mar 7 02:00:00 UTC 2026: Code review monitoring started
Sat Mar 7 02:00:01 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 108

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 108
  • VULNERABILITIES: 0

Generated on: Sat Mar 7 02:00:03 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 7, 2026

@marcusquinn
Copy link
Owner Author

This PR appears orphaned — no active worker process found and no activity for 6+ hours. The referenced issue #3005 is already closed. Flagging for review. If work is still in progress, remove the status:orphaned label.

@marcusquinn marcusquinn added status:orphaned and removed bug Auto-created from TODO.md tag status:orphaned labels Mar 7, 2026
@marcusquinn marcusquinn merged commit 7f108ab into main Mar 7, 2026
19 checks passed
@marcusquinn marcusquinn deleted the bugfix/pulse-rate-limited-review-gate branch March 7, 2026 10:36
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.

bug: review-bot-gate.yml fails when bots post rate-limit notices instead of reviews

1 participant