2.1.0: coverage gate, charset/bytes/enum/unique/interval/recursive generators, shrink debugging#6
Merged
Merged
Conversation
…tRange/floatSpecial/recursive, sampleShrinks, sized collections, PROPERTY_VERBOSE
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.
Wave 3 (ROADMAP): consumer-driven additions — 2.1.0, no BC breaks
Everything is additive: the
ArbitraryInterfacecontract and seed sequences of existing generators are untouched.roave/backward-compatibility-check --from=v2.0.0: no backwards-incompatible changes detected.Guarantees
Classify::cover($condition, $label, $minPercent)— the headline: an under-covered label now FAILS the property with the newCoverageViolationExceptioninstead of only printing a distribution line. Discarded runs are excluded from the denominator; all-discarded runs with requirements fail outright. Requirements are drained per property (no leakage after a falsified run).Generators
Gen::stringFrom($alphabet, $min, $max)(CharsetStringArbitrary) — identifiers/hex/slugs, multibyte alphabets, shrink toward the first alphabet character.Gen::bytes($min, $max)(BytesArbitrary) — raw bytes for parsers/codecs, shrink toward"\x00".Gen::enum(SomeEnum::class)— shrinks toward earlier-declared cases.Gen::uniqueArrayOf($el, $min, $max)(UniqueArrayArbitrary) — pairwise-distinct lists; element shrink candidates that would collide are pruned.Gen::intRange($min, $max)— ordered[lo, hi]pairs on top offlatMap; both bounds shrink, order always holds.Gen::floatSpecial()— opt-in NaN/±INF/-0.0/representation edges (default floats stay finite; no seed shift).Gen::recursive($leaf, $wrap, $maxDepth)— bounded recursive structures, 50/50 leaf-vs-branch per level.arrayOf/nonEmptyArrayOf/dictOf.DX
Gen::sampleShrinks($arb, $seed, $limit)— value + first shrink candidates, for authors of custom arbitraries.PROPERTY_VERBOSEenv — log every run's generated arguments.Verification
composer buildgreen: 364 testsminMsi90bc-check --from=v2.0.0clean; examples executed;zizmorcleanGen::floatSpecial()builds NaN/INF viafdiv()— Psalm crashes on theNANconstant