Reject non-finite randomized interval ranges - #161
Open
OskarEichler wants to merge 5 commits into
Open
Conversation
kamui
self-requested a review
August 30, 2026 21:13
kamui
requested changes
Sep 1, 2026
Owner
There was a problem hiding this comment.
Thanks!
- Please add a regression spec here too!
- I think floating point rounding could make these not equivalent. With
max_interval = Float("0x1.0d79435e50d79p+1023")andrand_factor = 0.9, validation returns finite, but runtimemax_interval + rand_factor * max_intervalproducesInfinity;randthen raisesErrno::EDOM. - A finite runtime range can be rejected. The spec says the change “leaves ordinary finite ranges unchanged.” With
max_interval = Float("0x1.89d89d89d89d8p+1023")andrand_factor = 0.3, validation producesInfinity, while the runtime expression produces finite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reject configuration whose individually finite
max_intervalandrand_factormultiply to a non-finite randomized upper bound. Otherwiserandreceives an infinite range only when retry execution reaches backoff generation.Validation is shared by Config and ExponentialBackoff and leaves ordinary finite ranges unchanged.
Verification: current suite 210 examples, dual-Ruby completion model 426 checks, six-file syntax, RBS and full lint pass. Two of 104 focused randomized-range cases fail before; all pass after.