Skip to content

feat: add configurable retry with exponential backoff for transient failures - #25

Merged
joeykamsteeg merged 2 commits into
developfrom
feature/retry-logic
Aug 7, 2026
Merged

joeykamsteeg merged 2 commits into
developfrom
feature/retry-logic

Conversation

@joeykamsteeg

Copy link
Copy Markdown
Member

Summary

  • Adds an opt-in retry option (client-level default + per-request override) that retries a failed request with capped exponential backoff and full jitter, honoring a Retry-After header when present
  • By default only idempotent methods (GET, HEAD, OPTIONS, PUT, DELETE) are retried, and only for network failures, FetchifyTimeoutErrors, and 408/429/5xx responses; a custom retryOn predicate can override eligibility, and a caller-triggered AbortSignal is never retried
  • Extracted safeLog and the new retry helpers out of create-fetchify.ts into standalone, individually-tested files under src/utils/
  • Adds the request-retry OpenSpec capability and syncs fetchify-options/http-client deltas into the main specs; archives the completed change

Test plan

  • bun test — 270 pass, 0 fail
  • bun run lint — clean
  • bun run build — succeeds
  • openspec validate --specs --strict — 20/20 specs pass

🤖 Generated with Claude Code

joeykamsteeg and others added 2 commits August 7, 2026 23:14
…ailures

Adds a retry option (client-level default and per-request override)
that retries a failed request with capped exponential backoff and
full jitter, honoring a Retry-After header when present. Only
idempotent methods are retried by default for network failures,
FetchifyTimeoutErrors, and 408/429/5xx responses; a custom retryOn
predicate can override eligibility, and caller-triggered aborts are
never retried.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Syncs the retry delta specs into openspec/specs (new request-retry
capability, plus updates to http-client and fetchify-options) and
archives the completed change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

test: Run #39

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Duration ⏱️
270 270 0 0 565ms

🎉 All tests passed!

Github Test Reporter by CTRF 💚

@joeykamsteeg
joeykamsteeg merged commit 0d05193 into develop Aug 7, 2026
2 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