Skip to content

fix: honor Retry-After without shortening backoff - #41

Draft
0xGhostCasper wants to merge 1 commit into
mainfrom
scr-google-ai-search-reliability
Draft

fix: honor Retry-After without shortening backoff#41
0xGhostCasper wants to merge 1 commit into
mainfrom
scr-google-ai-search-reliability

Conversation

@0xGhostCasper

Copy link
Copy Markdown
Member

Summary

Companion to the Google AI Mode backpressure changes: configured retryable HTTP errors, including capacity 503 responses, now honor Retry-After delay-seconds or HTTP-dates without shortening the existing exponential backoff. This prevents premature SDK retries under load; it does not fix or establish upstream Google AI Mode success rates.

  • Preserve transport backoff, retryable status policy, and maximum retry attempts.
  • Reuse the standard-library parser for 429 metadata, preserving RateLimitError for malformed or date headers; 429 remains non-retryable by default.
  • Cover the async public AI Mode method and synchronous programs using asyncio.run(), plus GET, GET-with-headers, and POST retry paths.
  • Align package, exported version, User-Agent, lockfile, README, and changelog for 0.43.2. Release is pending; this draft PR must not be merged or published yet.

Validation

  • 740 non-live tests passed on each of Python 3.10, 3.12, and 3.14.
  • 89 focused retry, client, config, and exception tests passed.
  • Full-repository Ruff lint and formatting checks passed.
  • Mypy passed for all 207 source files.
  • Version 0.43.2 wheel and source distribution built successfully.
  • No new dependencies, no live scraping calls, and no release performed.

@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.23810% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/scrapebadger/_internal/client.py 95.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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