LatticeLawSuite
Sibling to us.tractat.kuilt.conformance.QuiltedConformanceSuite. Subclass and implement newHarness to bind a CRDT type.
Provides convergence tests that drive N replicas through random op sequences, then assert every delivery permutation produces the same merged value. Lives in commonMain of :kuilt-conformance so any module's commonTest can subclass it.
Multiplatform: runs on JVM, wasmJs, and native.
Functions
The same two laws over every short word the binding's alphabet can spell — and, when one of them breaks, the shortest word that breaks it.
Both bracketing laws over the lower half of the seed budget, seeds 0..7.
The same two laws over the upper half of the seed budget, seeds 8..15.
Run 32 seeds (~6 permutations each at replicaCount=3 → 192 convergence assertions).
Pin seed 0 for regression repro — if a specific seed fails, add a test here.
The one seam every test above skips: a state that has been through the codec must be interchangeable with the one that has not. Seeds 0..15.
The generator searched enough for the tests above to mean anything — see VacuityFloors.
The rest of the join-semilattice contract — commutativity, idempotence and least-upper-bound — over the causal pool, seeds 0..15, plus the byte law on the commutativity pair.
Build and return the harness under test — called once per test method.