Skip to content

fix: limit retry storm - #211

Merged
jpopesculian merged 1 commit into
mainfrom
jpop/retry-storm
Sep 4, 2026
Merged

fix: limit retry storm#211
jpopesculian merged 1 commit into
mainfrom
jpop/retry-storm

Conversation

@jpopesculian

@jpopesculian jpopesculian commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Corrected retry timing so exponential backoff stops at the configured maximum and produces only the expected delays.
    • Fixed timer-based sleep behavior in WebAssembly environments, ensuring operations resume through the timer callback as expected.
  • Tests
    • Added coverage verifying maximum retry limits and expected backoff delays.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: a67107eb-ca6d-458e-bad5-4ef681620028

📥 Commits

Reviewing files that changed from the base of the PR and between afde711 and 78e3bfa.

📒 Files selected for processing (2)
  • client/src/retry.rs
  • client/src/sleep.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The retry iterator now increments its counter before yielding delays and includes a retry-limit test. The WASM sleep implementation resolves through the timer callback and preserves error rejection.

Changes

Retry behavior

Layer / File(s) Summary
Exponential backoff retry limit
client/src/retry.rs
ExponentialBackoff::next increments the retry counter before yielding. The test verifies delays of 1, 2, and 4 seconds, then termination.

WASM sleep resolution

Layer / File(s) Summary
Timer callback resolution
client/src/sleep.rs
The timer callback resolves the sleep promise. Timer errors continue to reject the promise.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 78e3b

Retry delays now stop at the configured limit, and WASM sleeps complete when their timer fires. The changed behavior is covered without an identified remaining merge risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: limiting retries to prevent a retry storm.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jpop/retry-storm

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jpopesculian
jpopesculian merged commit 9ae4d9f into main Sep 4, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant