-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reproduce via random seed #50
Comments
Also I feel like when picking one at random, we should start with the initial time and then do like Four digits seems like a plenty large enough possibility space given that we're not doing crypto or anything, but @mgold would be the expert on that. |
As with anything involving reusing or seeds or generating seeds from randomized output, the answer is: theoretically you are compromising the validity of the RNG and you should feel bad; in practice it's probably fine (until you get a really obscure and difficult bug). I don't think it's worth limiting the 4 billion-ish possibilities to 9000 just to make the seeds easier to shout across the room. I've done similar things with flaky rspecs and I just wind up copying and pasting the seed at one machine. I'm totally on board with indicating and being able to specify the initial seed, but the opaque type is working against you. With Random.Pcg you can do it by abusing |
Yeah fair point.
Oh I'd just change the API to accept an |
Sure, just document why this is the case and that the integer should be 32 random bits, etc. |
This is a two-part feature (and neither makes much sense without the other.)
Fuzzing with initial seed 1234
(Not sure if it should go at the beginning or at the end, or what the exact wording should be.)This is no substitute for copying out the inputs of fuzz tests into failing unit tests, but would let you give the seed to a coworker so they could quickly reproduce exactly the set of failures you saw.
The text was updated successfully, but these errors were encountered: