Skip to content

Add transient retries, backoff, and Async concurrency limits - #24

Merged
dblock merged 1 commit into
mainfrom
feature/transient-retries-and-concurrency
Nov 7, 2026
Merged

dblock merged 1 commit into
mainfrom
feature/transient-retries-and-concurrency

Conversation

@dblock

@dblock dblock commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Changes

Retries remain disabled by default. When enabled, the default policy now retries transient connection/time-out errors and HTTP 408/425/429/500/502/503/504 only, as requested. retry_status_codes: nil restores the legacy all-failure/error policy, and custom arrays select HTTP statuses. The retry budget remains shared across methods; ordinary HEAD-to-GET fallback is unchanged.

Add validated optional retry_after, exponential retry_backoff, bounded additive retry_jitter, respect_retry_after (delta-seconds and HTTP dates), and max_retry_delay. Async delays yield outside its optional concurrency semaphore. Hydra defers delayed retries until the active batch drains rather than sleeping in completion callbacks; these delays are minimum waits, not exact scheduling deadlines.

Expose response headers and common error_type categories while retaining native exceptions. Classify curl connection failures separately from HTTP failures, normalize Typhoeus method options, document Async connection reuse, and add max_concurrency (default unlimited).

Validation

bundle exec rubocop passed. Full RSpec suite: 174 examples, zero failures. Tests cover transient/legacy policies, all-backend delays, timeout categorization, server dates/invalid headers, delay caps/jitter, Hydra ordering, and Async concurrency/client reuse. git diff --check passed.

Independent of #23; the shared replay-fixture fixes are intentionally identical. No host-wide rate-limit coordination is introduced.

Fixes #2. Fixes #3.

Implemented by AI on behalf of @dblock.

@codecov-commenter

codecov-commenter commented Nov 7, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 98.26087% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 99.66%. Comparing base (a7f894a) to head (286f02d).

Files with missing lines Patch % Lines
lib/ruby-link-checker/result.rb 83.33% 2 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##              main      #24      +/-   ##
===========================================
- Coverage   100.00%   99.66%   -0.34%     
===========================================
  Files           24       25       +1     
  Lines          502      603     +101     
===========================================
+ Hits           502      601      +99     
- Misses           0        2       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dblock
dblock force-pushed the feature/transient-retries-and-concurrency branch from 2eebd36 to cc60fda Compare November 7, 2026 12:58
@github-actions

github-actions Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Danger Report

No issues found.

View run

@dblock
dblock force-pushed the feature/transient-retries-and-concurrency branch from cc60fda to 9573d7c Compare November 7, 2026 20:04
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dblock
dblock force-pushed the feature/transient-retries-and-concurrency branch from 9573d7c to 286f02d Compare November 7, 2026 20:40
@dblock
dblock merged commit 70ff87e into main Nov 7, 2026
10 checks passed
@dblock
dblock deleted the feature/transient-retries-and-concurrency branch November 7, 2026 20:41
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.

Add a delay on any error. Add delay after HTTP 429 Too Many Requests

2 participants