Recover transient reads and honor Retry-After in both SDKs - #274
Open
MagMueller wants to merge 6 commits into
Open
MagMueller wants to merge 6 commits into
MagMueller wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
Contributor
There was a problem hiding this comment.
2 issues found across 7 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="browser-use-node/README.md">
<violation number="1">
P3: This PR changes Retry-After handling (honoring integer-second values within the 10s cap), but instead of updating the README Retries section it deletes it entirely. The removed text's remaining claims are still accurate in the new implementation — up to three retries (`maxRetries` default 3), 429 for all methods plus GET 502/503/504, exponential backoff starting at 1s capped at 10s, 250ms jitter, and per-attempt timeout — so this drops still-valid user-facing documentation rather than correcting the single outdated sentence (Retry-After extending waits to 60s). Update the section to describe the new integer-second cap instead of removing all retry documentation.</violation>
</file>
<file name="browser-use-python/README.md">
<violation number="1">
P3: Removing the whole retry paragraph drops SDK error-handling documentation that is still accurate. Only one detail changed: the code now honors integer-second Retry-After up to _MAX_RETRY_DELAY = 10.0 seconds (browser-use-python/src/browser_use_sdk/_core/http.py), not 60. The rest is unchanged — GET 502/503/504 and 429 are retried up to three times with exponential backoff and jitter, POST 5xx and transport errors are not replayed, and the timeout applies per attempt. Update the paragraph's Retry-After cap to 10 seconds instead of deleting it, so the published README still documents this behavior.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
This branch has not been deployed
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.
Both SDKs abandon completion polling after one transient 503 and ignore the API's numeric Retry-After on 429 responses.
Retry GET 502/503/504 within the existing retry count, honor integer-second Retry-After within the existing ten-second wait cap, and add up to 250ms jitter.
Larger numeric waits return the original error; date-form headers retain the published SDK's normal backoff, and POST 5xx or transport failures are still not replayed.
Persistent GET failures can make four attempts instead of one and retry waits add to elapsed time; timeouts remain per attempt.
The five-file diff changes two HTTP clients, two test files and the shared policy note; 324 offline tests, both type checks and package builds, and public completion/browser-creation replays passed.