Skip to content

Harden retry timing option validation#125

Merged
kamui merged 3 commits into
mainfrom
harden-retry-options
May 23, 2026
Merged

Harden retry timing option validation#125
kamui merged 3 commits into
mainfrom
harden-retry-options

Conversation

@kamui
Copy link
Copy Markdown
Owner

@kamui kamui commented May 23, 2026

Summary

  • Validate retry timing/count options before use
  • Reject invalid generated backoff values and negative custom intervals
  • Preserve documented custom intervals precedence over generated backoff options

Test Plan

  • bundle exec rspec
  • bundle exec rubocop lib/retriable.rb lib/retriable/config.rb lib/retriable/exponential_backoff.rb spec/retriable_spec.rb spec/config_spec.rb

Notes

  • Lazy generated interval construction was deferred after review because it can change global RNG behavior for callers that use rand inside retried blocks.
  • Full bundle exec rake still hits existing repo-wide RuboCop offenses outside this PR.

@kamui kamui force-pushed the harden-retry-options branch from ff4b69f to ce46898 Compare May 23, 2026 17:02
@kamui kamui merged commit f909041 into main May 23, 2026
13 checks passed
@kamui kamui deleted the harden-retry-options branch May 23, 2026 17:16
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