Skip to content

2.3.0: domain arbitraries + regex, explicit examples, seed persistence (Waves 5-6, minus in-body draw)#9

Merged
rasuvaeff merged 6 commits into
masterfrom
feat/wave5-6-2.3.0
Jul 8, 2026
Merged

2.3.0: domain arbitraries + regex, explicit examples, seed persistence (Waves 5-6, minus in-body draw)#9
rasuvaeff merged 6 commits into
masterfrom
feat/wave5-6-2.3.0

Conversation

@rasuvaeff

Copy link
Copy Markdown
Owner

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-check
reports 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 internal RegexCompiler compiles 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 documented Gen::stringMatching gap.

T1.2 — explicit examples

  • #[Property(examples: 'method')] / <testMethod>Examples returns fixed positional argument tuples, each run before the random inputs and not shrunk. Failing example → ExampleViolationException.

T1.3 — seed persistence + replay (opt-in)

  • When PROPERTY_DB names 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 = one sha1(id).seed file per property, gitignore-friendly.

Deferred

  • T2.5 (in-body Gen::draw()) → 2.4.0: dynamic, dependent in-body draws need a replay-tape shrink mechanism the per-arbitrary tree model lacks.

Verification

  • composer build green (550 unit tests); bc-check clean; mutation minMsi 90 met (Covered MSI ~90% — the regex compiler carries many equivalent parser mutants that hold it near the gate).

rasuvaeff added 6 commits July 8, 2026 23:57
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.
@rasuvaeff rasuvaeff merged commit d9df7f2 into master Jul 8, 2026
7 checks passed
@rasuvaeff rasuvaeff deleted the feat/wave5-6-2.3.0 branch July 8, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant