Skip to content

test: mirror exhausted 429 contract - #432

Merged
subzeroid merged 3 commits into
mainfrom
chore/retry-contract-2.18.18
Aug 26, 2026
Merged

test: mirror exhausted 429 contract#432
subzeroid merged 3 commits into
mainfrom
chore/retry-contract-2.18.18

Conversation

@subzeroid

Copy link
Copy Markdown
Owner

Summary

  • Record compatibility through instagrapi 2.18.18.
  • Verify through the real HTTPX session and MockTransport that private HTTP 429 responses map to ClientThrottledError or PleaseWaitFewMinutes without a hidden transport retry layer.
  • Verify that public HTTP 429 handling performs exactly the configured outer retries and still raises the typed throttling exception with the final response attached.
  • Clarify the private versus public retry behavior in the troubleshooting and upstream-sync documentation.

Architecture

aiograpi uses HTTPX rather than urllib3 adapters, so the upstream Requests implementation does not need to be copied. This PR preserves the existing async transport and adds contract coverage instead of introducing a second retry package or changing production request behavior.

Test plan

  • 813 passed, 13 skipped, 35 subtests passed on the repository regression target.
  • mkdocs build --strict
  • ruff check .
  • ruff format --check .
  • bandit -q -c pyproject.toml -r aiograpi
  • python -m build

Review

Independent pre-landing review completed with no unresolved findings and a ready-to-merge verdict.

[gstack-context]
Decisions: Keep HTTPX transport unchanged; prove typed 429 mapping and single public retry layer; record instagrapi 2.18.18 baseline.
Remaining: Independent review, PR CI, squash merge, release 1.12.14, Codeberg sync.
Tried: Initial sleep-count assertion included request-spacing sleeps; corrected to distinguish retry and spacing waits.
Skill: /review
[/gstack-context]
[gstack-context]
Decisions: Exercise real HTTPX sessions with MockTransport and document private versus public retry behavior.
Remaining: Re-review, full verification, PR CI, squash merge, release 1.12.14, Codeberg sync.
Skill: /receiving-code-review
[/gstack-context]
[gstack-context]
Decisions: Remove dead helper left after moving public 429 coverage to MockTransport.
Remaining: Final full verification, PR CI, squash merge, release 1.12.14, Codeberg sync.
Skill: /review
[/gstack-context]
@subzeroid
subzeroid merged commit 98c61a7 into main Aug 26, 2026
13 checks passed
@subzeroid
subzeroid deleted the chore/retry-contract-2.18.18 branch August 26, 2026 11:23
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