Compose Hypothesis with the seed explorer - #23
Merged
Merged
Conversation
Hypothesis picks the workload, explore() runs it under a range of seeds, and the property is that no seed broke it. The racy variant proves the division of labor: Hypothesis shrinks the workload to two writers and one payload while the reported seed replays the schedule on its own, with the same trace hash. Seeds stay out of the strategies on purpose - a seed has no size to shrink toward, and two shrinkers aimed at one failure fight. Hypothesis joins the dev group only; the package gains no dependency.
The first cookbook page: the worked example behind the recipe test, the settings CI needs (deadline off, derandomized, no example database) and why, what a failure hands back from each half, what the composition costs, and its honest limits. README gains the short form and the link.
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.
Hypothesis searches the data and simloop searches the schedule, and until now that composition was a sentence in the README's defense rather than something the suite runs. This makes it a tested recipe: a shared-log workload where Hypothesis generates writers, payloads and write delays, explore() runs each workload under a fixed seed range, and the racy variant shows the two halves of a failure landing where they belong - Hypothesis shrinks the workload to its minimum (two writers, one one-letter payload, a write that merely yields) while the reported seed replays the schedule on its own with an identical trace hash.
docs/cookbook.md carries the worked example, the settings CI needs and why (deadline off because wall-clock deadlines measure the machine under virtual time; derandomized with no example database so the suite is a pure function of the repository), why seeds deliberately stay out of the strategies, and the honest limits. Hypothesis lands in the dev dependency group only - the package itself gains no dependency and no integration layer.