Operational Transform has one law worth the name. This page runs it against the real library — edit the boxes, watch both participants end up holding the same text, then check it yourself over a hundred thousand random pairs.
Given two edits written against the same document, each participant applies its own first and the other's second. Convergence is the claim that they then hold identical text — and nothing else. It is checkable without knowing what the document should say, which is what makes it fuzzable: there is no expected output to write down, only two strings that must match.
apply(apply(doc, A), transform(B, A, 'right')) === apply(apply(doc, B), transform(A, B, 'left'))
Change anything below. Try putting both edits at the same position — that is the case with no natural answer, where the two sides have to break the tie the same way or diverge.
This runs checkConvergence from ot-core/fuzz — the
same module the test suite runs, so the number here means what the number in
CI means. The generator biases hard towards collisions: short documents, short
edits, half of them deletes, so random pairs land on top of each other far
more often than they would in prose.
Is that zero worth anything? A passing property test is only evidence if it could have failed. Run the identical fuzzer against a transform that ignores the operation it is meant to rebase against — the thing an OT implementation does before anyone writes the hard part.