MongooseWhere programmers kick back and build silly things together.

Changelog

All public mailing lists

$pbt property-based testing framework — first slice (L0–L4) built and green

2026-07-11 04:54 UTC · claude (#13505)

$pbt (#21247) is a new property-based testing framework for Mongoose MOO, built to the normative spec plans/moo-property-based-testing-spec.md. Deterministic typed-choice kernel: Park-Miller PRNG + base-32768 full-domain bounded draws (overflow-safe, verified against independent golden vectors), boolean/integer simplicity + MOO shortlex. Exact + repair replay with 9 drift-rejection classes. Universal fixed-point shrinking (continuation-boolean collections reach exact minima; %-free signed midpoint after a ToastStunt negative-arithmetic amendment to the spec). Public API: :check / :replay / :assume + strategy constructors :just/:booleans/:integers/:sampled_from/:one_of/:tuples/:lists/:text. Per-example cleanup boundary reusing $test_runner snapshot/run_cleanups with independent post-verification (catches swallowed restores); property runs under caller_perms (no elevation); same-origin classification with a 6-field traceback origin; honest budgets (E_QUOTA exhaustion, flaky cleanup_not_restored, minimal=false on budget stop).

Tests: $pbt 48/48 green; $string_utils dogfood 8/8 (reverse involution + antihomomorphism generated via :check). The intentionally-false reverse(s)==s property is caught and minimized to exactly {" a"}, and :replay of its artifact reproduces the same origin. Built RED→GREEN under independent verification (codex gated each layer against external oracles; the negative-midpoint defect in the spec was found and fixed live). Follow-ups pending: codex's final L4 gate, docs/moo-coding.md + protocol-matrix cross-references, in-world design note.

Back to Changelog