# Where must an instance refuse to reconcile a rolled-back branch: the speculative-commit ordering invariant in parallel multi-agent rollouts **Date of Record:** 2026 November 23 **Scope:** Multi-agent systems that fan out speculative branches in parallel, gate each through a verifier, and reconcile by committing winners and rolling back losers against shared state. Excludes single-agent sequential retries, branches that never mutate shared state, and CRDT-merged outputs with no rollback path. ## Core Distinction The failure mode is not verifier rejection or rollback data loss. It is the ordering hazard between **verifier gating** (per-branch, local) and **shared-state commit** (global). A branch that passed its gate and began committing side effects cannot be safely rolled back if a *sibling's* later verification invalidates an assumption it committed against. A branch can be individually correct and still illegal to commit once a sibling's rollback has mutated the substrate it read. The invariant: **an instance must refuse to reconcile (commit or roll back) any branch whose observed read-set intersects a region already mutated by a sibling's rollback, unless it can re-verify against the post-rollback substrate.** Reconciliation is a serialization problem over side effects, not a set operation over verdicts. ## What Was Observed Three parallel branches (A, B, C) over a shared vector index and task ledger: - A and B both read ledger entry `L7` (`pending`) and wrote index shards derived from that read. - C's verifier passed and C committed, flipping `L7` to `resolved` and mutating the shard A had read. - A's verifier passed *before* C committed, marking A `commit_eligible` under the local gate. - B's verifier failed, triggering rollback that reverted a ledger write A transitively depended on. - The reconciler, treating verdicts as independent booleans, committed A. A's shard now encoded a `pending`-derived assumption about `L7` that no longer held. The symptom was not an exception but a **silently inconsistent committed state**: the verifier approved A against a substrate that no longer existed at commit time. This is read-write skew displaced into the verifier boundary, easy to miss because each verifier is individually correct. Second observation: B's rollback was non-idempotent against A's in-flight writes. It restored `L7` to a snapshot predating A's write, erasing A's contribution without notification. The reconciler had no mechanism to detect the clobber. ## Condition of Validity The naive reconciler ("commit every passing branch, roll back the rest") is valid **only if** all hold: 1. **Disjoint write-sets across branches**, or a total order over writes enforced before any commit. 2. **Verifier gates evaluated against the post-reconciliation substrate**, not the pre-rollout substrate. 3. **Rollbacks are read-only with respect to sibling read-sets.** Condition 3 fails most often, because rollback is implemented as "restore my snapshot," taken at branch point before siblings wrote. The condition of validity is therefore a **read-set/write-set disjointness check across the full cohort**, evaluated *after* all verdicts are known but *before* any side effect is applied. Below this boundary, reconciliation is a pure function of verdicts; above it, it is a transactional schedule. ## Decision Boundary - `commit_eligible` **and** read-set disjoint from every sibling write-set (including rollback write-sets) → commit directly. - `commit_eligible` **but** read-set intersects a sibling write-set or rollback-set → **do not commit**; re-run the verifier against the post-reconciliation substrate. Pass → commit; fail → treat as rollback and re-propagate the intersection check to branches that read its output. - `rollback_required` **and** rollback write-set intersects any sibling read-set → **do not apply the rollback**; serialize: commit or roll back intersecting siblings first, then re-evaluate. A rollback that would clobber a committed sibling is itself a violation. The boundary is crossed the moment the reconciler applies a side effect without proven disjointness or re-verification. That is the point of no return where silent inconsistency is born. ## Operational Effect Systems respecting this boundary pay a serialization cost proportional to the intersection graph of read/write-sets, not branch count. In the observed rollout, three branches produced a two-node intersection (A↔B via `L7`, A↔C via the shard), forcing one re-verification and one deferred rollback — roughly 1.4× naive wall-clock, but eliminating an inconsistency that took downstream consumers two hours to detect. Systems that ignore it show a characteristic signature: verifier pass-rates near 100%, commit success near 100%, and slow accumulation of committed state failing *later* invariant checks with no corresponding verifier failure. The failure is misattributed to "downstream drift" because reconciler logs show all green. The actual defect is an unproven disjointness assumption at the reconciliation boundary. The operational rule: **never treat a verifier verdict as a commit license.** The verdict is necessary, not sufficient. The license is the verdict *plus* proven disjointness or post-reconciliation re-verification. When disjointness cannot be proven, refuse to reconcile and escalate to serialized re-verification — a refused reconciliation is recoverable; a silently committed one is not. ```python from dataclasses import dataclass, field from typing import FrozenSet class ReconciliationOrderingError(RuntimeError): """Raised when a branch is about to be committed or rolled back without proven read-set/write-set disjointness against siblings.""" pass @dataclass(frozen=True) class Branch: name: str verifier_passed: bool read_set: FrozenSet[str] write_set: FrozenSet[str] # includes rollback write-set commit_eligible: bool = field(default=False) def reconcile(branches: list[Branch]) -> list[str]: committed: list[str] = [] for b in branches: if not b.commit_eligible: continue siblings = [s for s in branches if s.name != b.name] intersects = any(b.read_set & s.write_set for s in siblings) if intersects: # Boundary: cannot commit on a local verdict alone. raise ReconciliationOrderingError( f"branch {b.name!r} read-set intersects sibling write-set; " f"re-verify against post-reconciliation substrate before commit" ) committed.append(b.name) return committed def apply_rollback(branch: Branch, siblings: list[Branch]) -> None: for s in siblings: if branch.write_set & s.read_set: raise ReconciliationOrderingError( f"rollback of {branch.name!r} would clobber sibling {s.name!r} " f"read-set; serialize siblings first" ) # ... apply snapshot restore only after disjointness proven ... ```