Conversation
When a retry has been armed (its retry-bucket reservation acquired) but
_sleep_retry_delay! bails out because the backoff delay would exceed the
request deadline, the finally block refunded the reservation with
`release(bucket, token, nothing)`. `release` only accepts an `Int` failure
cost, so instead of gracefully giving up and returning the last response,
the request failed with
MethodError: no method matching release(::RetryBucket, ::RetryToken, ::Nothing)
Pass the cost through `_retry_bucket_failure_cost(nothing)` (i.e. 0, a
full refund) as intended. This path triggers in the wild whenever a
deadline-bounded request (e.g. `request_timeout` set) is retried against
a slow or unavailable server and the backoff no longer fits within the
deadline.
Add a regression test covering the abandoned-retry path, including that
the reservation is refunded in full.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1324 +/- ##
==========================================
+ Coverage 87.96% 87.99% +0.02%
==========================================
Files 30 30
Lines 11807 11807
==========================================
+ Hits 10386 10389 +3
+ Misses 1421 1418 -3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
quinnj
approved these changes
Jul 2, 2026
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.
This is purely Claude's output and since I don't know the internals of HTTP it might be
garbage. In any case, the issue was found from this real-world error: