Skip to main content

commit_barrier_ready

Function commit_barrier_ready 

Source
pub fn commit_barrier_ready(
    canonical: &ReplicaState,
    editors: &[&ReplicaState],
) -> Result<bool>
Expand description

State-vector commit barrier (#crdtauth3): is canonical a consistent cut — has it integrated every live editor’s ops up to that editor’s current state vector?

This replaces the fragile finalize patch-ack (“did a queued patch round-trip?”) with a state-vector ack (“is the canonical replica synced through SV=N for every live editor?”), the structural root fix for the no_ack / ipc_proof_insufficient / post-commit-worktree-corruption class: a commit can only snapshot a state that provably holds every editor’s last keystrokes, so un-propagated editor ops can never be lost at the commit instant. With no live editors the barrier is trivially satisfied (the headless / git-authoritative path).