Skip to content

fix: respect github rate limiting#546

Open
j4ys0n wants to merge 6 commits into
jonwiggins:mainfrom
j4ys0n:main
Open

fix: respect github rate limiting#546
j4ys0n wants to merge 6 commits into
jonwiggins:mainfrom
j4ys0n:main

Conversation

@j4ys0n

@j4ys0n j4ys0n commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

The problem

On 2026-06-12 a write hit GitHub's secondary rate limit (403, "blocked from content creation"). The reconciler's reaction made it worse: when a content-creating write (auto-merge, auto-submit-review) failed, it was re-issued every ~5–7.5 s with no Retry-After handling and no cap, and the shared error classifier treated GitHub 401/403 as "retryable." So the moment any write started failing, the system hammered the exact endpoints GitHub had just blocked — keeping the limit tripped and risking an integration ban.

How the fix solves it

  • Stops the storm at the source. When a GitHub write is blocked, the executor now persists a cooldown (reconcileBackoffUntil) on the run. Every reconcile producer — event-driven, the 30 s PR watcher, the 5 min resync — already no-ops while that field is in the future, so none of them can re-issue the write until the deadline. (Previously only one retry job was delayed; the others bypassed it.)
  • Right wait for the right failure. GitHub errors are now typed and classified: secondary limit → honor Retry-After (else ≥60 s, bounded exponential); primary limit → wait for the quota reset; auth/permission → long hold instead of retrying a credential that can't succeed.
  • Correct operator signal. GitHub failures now surface GitHub-specific recovery (token/permission/rate-limit guidance) instead of the Claude "OAuth token expired" form, and aren't auto-retried as transient.

Result: at most one write attempt per server-directed (or ≥60 s) interval instead of a continuous loop — i.e. the client now behaves the way GitHub requires, so a transient secondary limit clears on its own rather than self-perpetuating.

Copilot AI and others added 6 commits June 10, 2026 04:13
Update Anthropic baseline models for Opus 4.8 and Fable 5
Persist a reconcile cooldown on secondary/primary/auth GitHub write failures so no reconcile producer re-issues a blocked write before the deadline.
fix: respect github rate limiting
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