Skip to content

fix(automation): stop mention sweep on already-exceeded rate limits - #1027

Draft
cursor[bot] wants to merge 5 commits into
mainfrom
cursor/bc-5bb76fb1-67aa-4840-8b3a-1fe7792dd979-6966
Draft

fix(automation): stop mention sweep on already-exceeded rate limits#1027
cursor[bot] wants to merge 5 commits into
mainfrom
cursor/bc-5bb76fb1-67aa-4840-8b3a-1fe7792dd979-6966

Conversation

@cursor

@cursor cursor Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Why this PR exists

#1012 correctly stops the mention sweep after an exact API rate limit exceeded string. That needle misses GitHub's API rate limit already exceeded wording, does not reproduce the repository-listing path that produced 116 isolated failures, and lets the scheduled CLI crash with a traceback instead of telling the operator the next action.

What to do after this lands

Merge this head instead of, or immediately after, #1012. After merge, wait for the next scheduled Review Agent Mention Router run. If that run prints ::error:: and rate limit, wait for the installation REST budget to reset. Do not re-run the sweep immediately.

Test-first repair

  • RED: API rate limit already exceeded was not classified; the incident-path listing test expected ::error:: and a wait instruction; main() re-raised SweepRateLimitExhausted.
  • GREEN: classification now requires rate limit plus exceeded/exhausted, or secondary rate limit; repository-listing and dispatch-time exhaustion stop before later work; main() returns 1 with an operator next action.
  • Doctoring, ARCHITECTURE, and CHANGELOG record the boundary and APA 7th GitHub REST/App/GraphQL/best-practice citations.

Boundary

No retry, sleep, credential rotation, permission widening, reviewer-identity change, invocation-key change, or ledger weakening. Ordinary candidate-local failures stay isolated.

Verification

coverage run over the mention-sweep suite is 100% statements/branches on scripts/ci/agent_mention_sweep.py. interrogate on that module is 100%.

Open in Web View Automation 

seonghobae and others added 5 commits August 15, 2026 15:18
Classify GitHub "API rate limit already exceeded" wording as shared-budget
exhaustion, reproduce the repository-listing incident path, and make the
scheduled CLI exit 1 with an operator next action instead of a traceback.

Co-authored-by: Seongho Bae <[email protected]>
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.

2 participants