Pin composition-law edge cases via <method>Examples() - #25
Conversation
The CompositionLawsPropertyTest relied entirely on the random phase to hit edge cases (NOT-wrapped operands, double negation, empty-result intersections). Mutation proof on issue #22 already showed that a broken QueryBuildingVisitor::visitNot() can pass random search when both sides of a law use the broken NOT identically. Examples run before the random phase and pin the shapes that broke then. Added 28 deterministic edge cases across all 8 properties plus a shared operandCatalog() helper for the named operands (active/inactive/pricey/ all/none/notActive/doubleNeg). Verified locally: a deliberately broken visitNot() (early return + identity) fails deMorganAndExamples on the 4th example instead of relying on random search to find it.
|
Warning Review limit reached
Next review available in: 24 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Audit of the property-testing-core public API showed that the
<method>Examples()mechanism — fixed argument tuples run before the random phase — has zero usage across the monorepo, despite being explicitly recommended in the rootAGENTS.md(Principles: "where there is property, there are examples"). This PR is the first pilot.What
Adds 28 deterministic edge cases across all 8 properties of `CompositionLawsPropertyTest`, plus a shared `operandCatalog()` helper for the named operands (`active` / `inactive` / `pricey` / `all` / `none` / `notActive` / `doubleNeg`):
Why
Mutation proof (issue #22) showed that a broken `QueryBuildingVisitor::visitNot()` can pass random search when both sides of a De Morgan law use the broken NOT identically — the random phase hits the same regression on both sides of the equality and sees no diff. The hand-written `SqliteIntegrationTest::notNegatesCondition` caught it; the property did not.
Examples close that gap deterministically: each known-dangerous shape runs before the random phase, so the test fails on a named example instead of waiting for ~100 random trials to maybe hit it.
Local verification
Scope