fix: uncapped and eager backoff calculation #52
Conversation
|
@greptileai review pls |
Greptile SummaryThis PR refactors the retry backoff mechanism from eagerly pre-computing a list of all backoff values upfront to computing each backoff value lazily on demand. It also adds proper
Confidence Score: 5/5The change is safe to merge — it is a clean, semantically equivalent refactor that makes backoff computation lazy and adds overflow protection for extreme attempt counts. The old compute_backoffs list is replaced by compute_backoff one call at a time, producing identical delay values for all realistic attempt counts. The math.ldexp / OverflowError path correctly falls back to max_base_delay, matching what min(inf, max_base_delay) did implicitly before. The max_retries rename aligns with _max_retries() which has always returned max_attempts - 1, so the retry budget is unchanged. No files require special attention. Important Files Changed
Reviews (3): Last reviewed commit: "initial commit" | Re-trigger Greptile |
|
@greptileai address your comment. pls review again and update your score. |
No description provided.