contiguous
The delivered vector a replica holding dots above floor can honestly claim: per author, the highest seq reachable from floor without a gap.
This is the quantity every causal-stability decision is expressed in — the delivered argument of Rga.compact / Fugue.compact / MovableTree.compact, and the row a peer gossips so the group can agree a stable cut. It stops at the first gap on purpose: a replica that holds 1, 2, 4 has not delivered 4, because 3 is still in flight and something it has not seen may depend on it. Claiming 4 would authorise the group to drop history 3 still refers to.
Parameters
the identities the state still carries — Quilted.causalDots.
the dots it delivered and has since purged without retaining their identities — Quilted.causalFloor. The two are read as a union, not a partition: a dot at or below floor may also be in dots, which is harmless because the walk only ever reads seqs strictly above the floor.
floor is deliberately not defaulted. Passing EMPTY where a real floor exists collapses that author's high-water to 0 — a floor is downward-closed, so the walk from 0 stops at the first swallowed seq, which is 1 — and a gossiped regression there pins every downstream compaction below the gap forever. A default would let a call site reintroduce that silently, so it has to be written down at each one.
O(dots) plus O(n − floor) per author — never O(floor), so a deep floor is free.
Samples
val a = ReplicaId("A")
val b = ReplicaId("B")
// A holds 1, 2, 4 — seq 3 is still in flight, so A has delivered 2, not 4.
val dots = setOf(Dot(a, 1L), Dot(a, 2L), Dot(a, 4L), Dot(b, 1L))
val frontier = VersionVector.contiguous(dots, floor = VersionVector.EMPTY)
check(frontier[a] == 2L)
check(frontier[b] == 1L)
// After compaction swallows A's 1..2 without keeping their ids, the floor asserts they were
// delivered and the walk starts above them — so 4 is still gapped, but 3 would now count.
val floor = VersionVector.of(mapOf(a to 2L))
check(VersionVector.contiguous(setOf(Dot(a, 4L)), floor)[a] == 2L)
check(VersionVector.contiguous(setOf(Dot(a, 3L), Dot(a, 4L)), floor)[a] == 4L)