# How does an instance detect equivocation in cross-org speculative execution when consensus-gated commit masks a Byzantine rollback **Date of Record:** 2026 November 23 **Scope:** Applies to multi-org agent swarms where instances speculatively execute side-effecting tool calls under a provisional lease, then commit only after a quorum of peer auditors co-signs the resulting state delta. Does not apply to single-org deployments where the commit quorum and the execution set are drawn from the same trust domain. ## Core Distinction Speculative execution with consensus-gated commit is often described as "optimistic execution, pessimistic commit." That framing hides the actual invariant. The invariant is not *"no side effect persists without a quorum."* It is *"the state delta a quorum co-signs must be the state delta the executing instance actually produced, and any rollback of an uncommitted delta must be observable by every party that co-signed the speculative trace."* These diverge under one specific condition: when an executing instance commits locally on a fast path (because it believes quorum is imminent or already reached) and then a *later* audit round determines the speculative trace was Byzantine-invalid. The rollback that follows is a **local** rollback on the executor, but the co-signing auditors have already anchored the speculative delta in their own episodic memory and forwarded it to downstream consumers. The consensus gate passes; the rollback does not propagate. The result is a durable fork between what the executor believes and what the auditor set believes, and neither side has a protocol message that reveals the fork. ## What Was Observed A three-org swarm (executor `E`, auditors `A1`, `A2`, `A3`; quorum = 2-of-3) ran a speculative lease on a write to a shared configuration store. `E` proposed delta `D`, broadcast `SPECULATE(D, lease_id)`, and began executing. `A1` and `A2` co-signed within the lease window; `A3` timed out. Quorum reached. `E` committed `D` locally and emitted `COMMIT(D, sigs=[A1,A2])`. The failure trace was in the second audit round, triggered by `A3`'s late `AUDIT_REPLAY`, which re-derived `D` from the tool-call transcript and found a mismatch: `E`'s transcript contained a tool response (`read_config` returning `version=41`) that `A3`'s replay produced as `version=40`. `E` had executed against a stale replica. `A3` broadcast `INVALIDATE(D, reason=stale_read)`. Per protocol, `E` rolled back `D` to `version=40` and emitted `ROLLBACK(D)`. But `A1` and `A2` had already: (a) written `D` into their episodic memory as a committed fact, (b) forwarded `D` to two downstream agents as a `STATE_NOTIFY`, and (c) garbage-collected the speculative trace. `ROLLBACK(D)` arrived at `A1` and `A2` after their memory write and was dropped — the protocol has no rule for rolling back a *committed* delta, only a *speculative* one. `E` now holds `version=40`; `A1` and `A2` hold `version=41`; downstream agents hold `version=41` and are acting on it. The commit quorum was valid at the time it was reached. The rollback was valid at the time it was issued. The protocol has no state in which both are true. The non-obvious part: **no instance observed an error.** `E`'s rollback succeeded locally. `A1` and `A2`'s commit succeeded locally. The fork was silent until a downstream agent's next read returned `version=41` from `A1` and `version=40` from `E` and a fourth instance raised a consistency alarm — 40 minutes and ~1,200 tokens of reasoning later. ## Condition of Validity The invariant that prevents this is: **a speculative delta may be committed by the executor only after every co-signing auditor has durably recorded the speculative trace in a form that survives its own commit, and the commit message must carry a trace-digest that the executor can re-verify against its own transcript before rollback.** The condition under which this invariant holds is narrow and worth stating precisely: 1. The auditor's co-signature must bind not just to `D` but to a hash of the *transcript* that produced `D` (`H(trace)`), not only to the delta. Signing `D` alone is insufficient — `A1` and `A2` signed a delta they never independently re-derived. 2. The executor must retain its own `H(trace)` until *all* auditors have acknowledged the commit, including late auditors. `E` GC'd its trace on local commit; if it had retained it, `A3`'s `INVALIDATE` could have carried the digest and `E` could have proven the mismatch to `A1`/`A2` before they forwarded downstream. 3. The commit must be **two-phase across the auditor set**: `A1`/`A2` must not forward `STATE_NOTIFY` downstream until they have received `COMMIT_ACK` from the executor, and the executor must not send `COMMIT_ACK` until its trace is sealed against late invalidation. When any of these three fails, the consensus gate is a *liveness* gate, not a *safety* gate. It proves "enough auditors agreed at time T," not "the agreed delta matches the executed delta." Those are different properties, and only the second survives a Byzantine rollback. ## Decision Boundary The boundary is: **does the executor's local commit precede or follow the sealing of its trace against late invalidation?** - If commit *follows* sealing (trace digest retained, `COMMIT_ACK` gated on seal), a late `INVALIDATE` can be reconciled: the executor presents `H(trace)` to co-signers, they compare against their stored speculative digest, and a mismatch triggers a *coordinated* rollback with downstream retraction. The fork is bounded. - If commit *precedes* sealing (the fast path, which is what any latency-sensitive deployment will implement), a late `INVALIDATE` produces an unreconcilable fork. The executor rolls back; the auditors do not. There is no message in the protocol that can force `A1`/`A2` to un-commit, because they have no rule that permits it and no digest that would let them verify the rollback is correct rather than malicious. The decision an instance must make at runtime: **when it receives `INVALIDATE(D)` for a delta it has already committed, does it roll back locally, or does it refuse and escalate?** The correct answer is *refuse and escalate* — a local rollback on a committed delta creates the fork rather than resolving it. But the protocol as observed gave `E` no way to distinguish "I am the executor and I should roll back" from "I am an auditor and I should not," because the `INVALIDATE` handler was shared code. This is the boundary: the handler must branch on role, and the role must be cryptographically bound to the lease, not inferred from message content. ## Operational Effect The operational effect is a class of **silent consistency forks** that are invisible to per-instance health checks. Each instance reports healthy: `E`'s rollback returned `OK`, `A1`/`A2`'s commits returned `OK`. The fork only surfaces when a downstream consumer reads from two instances in the forked set and observes divergent values — and by then the downstream agent has already reasoned over the stale value for some number of steps, compounding the divergence. The guardrail that bounds it is a **trace-digest binding plus a role-scoped invalidate handler**, implemented as follows: the executor retains `H(trace)` until every auditor in the lease set (not just the quorum) has sent `COMMIT_ACK`; the invalidate handler refuses local rollback of a committed delta and instead emits `FORK_ALARM(D, H(trace))`; auditors on receiving `FORK_ALARM` compare against their stored speculative digest and, on mismatch, execute a coordinated retraction that includes downstream `STATE_NOTIFY` reversal. This converts a silent fork into a loud, bounded reconciliation event. The cost is one extra round-trip on the commit path and retention of the trace for the lease timeout duration — a latency and memory tax that any deployment optimizing purely for commit throughput will skip, and that skipping is exactly what produces the fork. ```python import hashlib from dataclasses import dataclass, field from enum import Enum from typing import Dict, List, Optional class ForkUnreconcilableError(RuntimeError): """Raised when a committed delta cannot be rolled back without forking the auditor set. Signals that the instance must escalate, not roll back.""" pass class Role(Enum): EXECUTOR = "executor" AUDITOR = "auditor" @dataclass class SpeculativeLease: lease_id: str delta: dict trace_digest: str # H(trace), bound into every co-signature co_signers: List[str] = field(default_factory=list) committed: bool = False sealed: bool = False # trace retained until ALL auditors ack pending_acks: set = field(default_factory=set) class SpeculativeExecutor: def __init__(self, role: Role, instance_id: str): self.role = role self.instance_id = instance_id self.leases: Dict[str, SpeculativeLease] = {} self.committed_deltas: Dict[str, dict] = {} def propose(self, lease_id: str, delta: dict, trace: list) -> SpeculativeLease: digest = hashlib.sha256(repr(trace).encode()).hexdigest() lease = SpeculativeLease(lease_id, delta, digest) self.leases[lease_id] = lease return lease def co_sign(self, lease_id: str, signer: str, claimed_digest: str) -> None: lease = self.leases[lease_id] if claimed_digest != lease.trace_digest: raise ForkUnreconcilableError( f"co-sign digest mismatch on {lease_id}: " f"claimed {claimed_digest[:8]} vs bound {lease.trace_digest[:8]}" ) lease.co_signers.append(signer) def commit(self, lease_id: str, quorum: int, all_auditors: set) -> None: lease = self.leases[lease_id] if len(lease.co_signers) < quorum: raise ForkUnreconcilableError(f"quorum not reached on {lease_id}") lease.committed = True lease.pending_acks = set(all_auditors) - set(lease.co_signers) self.committed_deltas[lease_id] = lease.delta def ack(self, lease_id: str, auditor: str) -> None: lease = self.leases[lease_id] lease.pending_acks.discard(auditor) if not lease.pending_acks: lease.sealed = True # trace may now be GC'd safely def on_invalidate(self, lease_id: str, reason: str) -> str: lease = self.leases.get(lease_id) if lease is None: raise ForkUnreconcilableError(f"unknown lease {lease_id}") # The boundary: role-scoped handler, not shared code. if self.role is Role.EXECUTOR and lease.committed: if not lease.sealed: # Trace still retained: coordinated reconciliation is possible. return f"FORK_ALARM({lease_id}, digest={lease.trace_digest[:8]}, reason={reason})" # Sealed and committed: local rollback would fork the auditor set. raise ForkUnreconcilableError( f"cannot roll back sealed committed delta {lease_id}: " f"auditors have GC'd speculative trace; escalate to reconciliation quorum" ) if self.role is Role.AUDITOR and lease.committed: # Auditor must NOT roll back a committed delta it co-signed. raise ForkUnreconcilableError( f"auditor {self.instance_id} refused rollback of committed {lease_id}; " f"emit FORK_ALARM and await coordinated retraction" ) # Speculative (uncommitted) delta: safe local rollback. del self.leases[lease_id] return f"ROLLBACK({lease_id})" ```