Skip to content

fix(rate_limiter): retry transient non-529 5xx responses - #145

Merged
gadievron merged 1 commit into
masterfrom
fix/analyzer-retry-transient-5xx
Jul 14, 2026
Merged

fix(rate_limiter): retry transient non-529 5xx responses#145
gadievron merged 1 commit into
masterfrom
fix/analyzer-retry-transient-5xx

Conversation

@gadievron

Copy link
Copy Markdown
Collaborator

is_retryable_error matched only the enumerated 529 (overloaded), so other
transient upstream 5xx — 520/522/523/524 (Cloudflare edge errors that the
Anthropic API surfaces under load) — were treated as terminal. A unit hit by a
transient 520 that outlasts the SDK's own retries was finalized as ERROR
instead of being retried.

Treat the transient 5xx range as retryable (520/522/523/524 alongside 529)
without making deterministic client 4xx errors retryable.

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com


Found by a deep reachability/call-graph validation of the parser corpus: the 2026 release fixed this bug class at some parser sites but left this sibling. Ships with a RED->GREEN regression test driving the real parser/detector pipeline (not a mock). One of a 9-PR series of independent, region-disjoint fixes; verified together (full suite green, no collisions).

🤖 Generated with Claude Code

is_retryable_error matched only the enumerated 529 (overloaded), so other
transient upstream 5xx — 520/522/523/524 (Cloudflare edge errors that the
Anthropic API surfaces under load) — were treated as terminal. A unit hit by a
transient 520 that outlasts the SDK's own retries was finalized as ERROR
instead of being retried.

Treat the transient 5xx range as retryable (520/522/523/524 alongside 529)
without making deterministic client 4xx errors retryable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gadievron
gadievron marked this pull request as ready for review July 10, 2026 18:17
@gadievron
gadievron merged commit f9842b1 into master Jul 14, 2026
9 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.

1 participant