Repository navigation
Commit 68dd5f0
fix(resilience): backoff uses 2.0 ** to avoid OverflowError on large attempt_index
base_delay * (2 ** attempt_index) raises OverflowError at attempt_index >= 1024
because 2**1024 is too large for int→float conversion. Float exponentiation
saturates to math.inf, which min() then clamps to max_delay. The current Retry
default max_attempts=3 makes this unreachable in practice, but the function
takes attempt_index unbounded, so closing the trap is a one-char fix at zero
behavior cost.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6325345 commit 68dd5f0
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | | - | |
| 25 | + | |
21 | 26 | | |
0 commit comments