Repository navigation
provider-reset: probe-park long declared resets (5min max per park) - #2
Merged
Merged
Conversation
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.
Provider-reset probe park — never sleep a whole declared reset in one call
agent/turn_provider_reset.py::wait_for_provider_resetparks a retry on aprovider's DECLARED reset with a single
interruptible_backoff_sleepof theentire duration (up to the 6h total cap). Verified incident: a combo whose
secondary account returned "Individual quota reached … reset after 4h 58m"
parked four in-flight turns ~5h while the primary account was already serving
again 16 minutes later.
Fix (smallest shared-seam diff)
Each park now sleeps at most a ~5-minute probe interval (+jitter) and returns
continueto re-probe. An aggregator whose other account recovered succeedswithin ~5 minutes; a still-limited probe re-parks with the fresh declared
reset. Unchanged: the 6h total deadline against the declared reset, the retry
budget, interruptibility, and the redirected-messages break path.
Tests
tests/agent/test_provider_reset_wait.pygainstest_five_hour_reset_parks_in_probe_intervals(5h declared reset → firstpark within the probe bound, attempt budget untouched, second error re-parks,
deadline still enforced); the three existing full-sleep assertions move to the
probe bound. All focused suites pass; RED evidence is the pre-fix assertion
set itself (full-sleep bounds), which this change intentionally invalidates.
Notes
⏳ Provider cooldown…),so the visible "waiting for provider reset" surfacing on ACP clients comes
from the existing emissions — no new display code in this PR.
carries the turn_api_error/retry_utils/turn_retry_state park plumbing.