2.3.0: domain arbitraries + regex, explicit examples, seed persistence (Waves 5-6, minus in-body draw)#9
Merged
Merged
Conversation
Gen::ipv4/email/url/json/jsonString compose existing combinators. Gen::regex (alias stringMatching) compiles a PCRE subset to combinators via RegexCompiler (recursive descent → tuple/oneOf/elements/arrayOf/constant), so matches shrink through existing trees. Unsupported constructs (anchors mid-pattern, backrefs, lookaround, named/inline groups, flags) throw naming the construct.
#[Property(examples: 'method')] or a <testMethod>Examples convention method returns fixed positional argument tuples, each run before the random inputs and not shrunk (they are already the pinned minimal case). A failing example short-circuits with ExampleViolationException carrying its index/arguments.
When PROPERTY_DB names a directory, a falsified property records its seed (seed only — values may not serialise; the seed reproduces the draw). Next run replays that seed first (unless the attribute pins a seed): still-failing seeds are reported immediately, fixed ones are forgotten. SeedStorage is one file per property (sha1(id).seed), gitignore-friendly. Run loop extracted into runProperty so replay re-runs it with the recorded seed.
…0 docs
- Fix ClickHouseKeyset... no: fix regex {0} quantifier (empty string, not a
zero-length ArrayArbitrary which rejects max 0).
- Add deterministic exact-output, shorthand class/atom, control-escape,
distribution and error-message tests for RegexCompiler; simplify ipv4/url maps
(drop equivalent-mutant fallbacks).
- README/llms.txt/CHANGELOG/ROADMAP/AGENTS updated for 2.3.0 (T2.4+T1.2+T1.3);
T2.5 deferred to 2.4.0.
…tifier edge errors, dot/class distribution
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.
Implements roadmap Waves 5–6 for
2.3.0, excluding T2.5 (in-body draw),which is deferred to
2.4.0. Additive;roave/backward-compatibility-checkreports no BC breaks; existing seed sequences unchanged.
T2.4 — domain arbitraries
Gen::ipv4(),Gen::email(),Gen::url(),Gen::json()/Gen::jsonString()— composed from existing combinators.Gen::regex()/Gen::stringMatching()— an internalRegexCompilercompiles a PCRE subset (literals,., classes[...]with ranges/negation/\d\w\s, quantifiers* + ? {n} {n,} {n,m}, alternation, groups(...)/(?:...)) into ordinary combinators, so matches shrink through the existing trees. Unsupported constructs (anchors other than a single leading^/trailing$, backreferences, lookaround, named/inline groups, flags) throw, naming the construct — a generator that silently ignored them would emit non-matching strings. Closes the documentedGen::stringMatchinggap.T1.2 — explicit examples
#[Property(examples: 'method')]/<testMethod>Examplesreturns fixed positional argument tuples, each run before the random inputs and not shrunk. Failing example →ExampleViolationException.T1.3 — seed persistence + replay (opt-in)
PROPERTY_DBnames a directory, a falsified property records its seed (only the seed — values may be objects/closures) and re-runs it first on the next run (unless the attribute pins a seed); a fixed seed is forgotten.SeedStorage= onesha1(id).seedfile per property, gitignore-friendly.Deferred
Gen::draw()) →2.4.0: dynamic, dependent in-body draws need a replay-tape shrink mechanism the per-arbitrary tree model lacks.Verification
composer buildgreen (550 unit tests);bc-checkclean; mutationminMsi 90met (Covered MSI ~90% — the regex compiler carries many equivalent parser mutants that hold it near the gate).