LatticeLawSuite

abstract class LatticeLawSuite<S : Quilted<S>>

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.

Constructors

Link copied to clipboard
constructor()

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.

Link copied to clipboard

Both bracketing laws over the lower half of the seed budget, seeds 0..7.

Link copied to clipboard

The same two laws over the upper half of the seed budget, seeds 8..15.

Link copied to clipboard

Run 32 seeds (~6 permutations each at replicaCount=3 → 192 convergence assertions).

Link copied to clipboard

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.

Link copied to clipboard

The generator searched enough for the tests above to mean anything — see VacuityFloors.

Link copied to clipboard

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.

Link copied to clipboard
abstract fun newHarness(): LatticeLawHarness<S>

Build and return the harness under test — called once per test method.