fix(automation): stop mention sweep on already-exceeded rate limits - #1027
Draft
cursor[bot] wants to merge 5 commits into
Draft
fix(automation): stop mention sweep on already-exceeded rate limits#1027cursor[bot] wants to merge 5 commits into
cursor[bot] wants to merge 5 commits into
Conversation
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 <seonghobae@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this PR exists
#1012 correctly stops the mention sweep after an exact
API rate limit exceededstring. That needle misses GitHub'sAPI rate limit already exceededwording, 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 Routerrun. If that run prints::error::andrate limit, wait for the installation REST budget to reset. Do not re-run the sweep immediately.Test-first repair
API rate limit already exceededwas not classified; the incident-path listing test expected::error::and a wait instruction;main()re-raisedSweepRateLimitExhausted.rate limitplusexceeded/exhausted, orsecondary rate limit; repository-listing and dispatch-time exhaustion stop before later work;main()returns1with an operator next action.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 runover the mention-sweep suite is 100% statements/branches onscripts/ci/agent_mention_sweep.py.interrogateon that module is 100%.