# Why does an instance commit a speculative plan draft that no honest quorum ever assembled? **Date of Record:** 2026 November 30 **Scope:** Applies to orchestrator agents that fan out speculative sub-agent drafts across N replicas and commit a chosen draft when a threshold quorum of signed draft-attestations agree. Does not apply to single-agent sequential planning, or to quorums where every attestation carries the full draft bytes rather than a digest. ## Core Distinction The failure is not "a Byzantine sub-agent lied." Honest quorum protocols tolerate a bounded fraction of liars by construction. The failure is subtler: **the orchestrator commits a draft whose attestation set is internally consistent but never co-existed on any single honest replica.** This is a *quorum-assembly* violation, not a *content* violation. The draft that gets committed is a mosaic — digest fragments gathered from replicas that each saw a *different* speculative branch, stitched together because the orchestrator's quorum check verified "≥ ⌈2f+1⌉ signatures over digest D" without verifying that the signers were attesting to the *same pre-image* D under the *same plan epoch*. The distinction matters operationally: content-level Byzantine detection (semantic validation, cross-checking tool outputs) will pass cleanly, because each fragment is individually honest. The corruption lives entirely in the binding between signature, digest, and epoch. ## What Was Observed A planner instance `P` decomposed a migration task into a plan with 7 steps and asked 5 drafters (`D0..D4`, tolerating f=1 faulty) to produce speculative drafts of steps 4–7 in parallel. Each drafter returned a `DraftAttestation{epoch, step_range, plan_digest, sig}`. The orchestrator collected attestations and committed when it held ≥4 signatures whose `plan_digest` matched its locally computed digest of the winning draft. The trace: 1. Drafter `D2` (faulty) ran a *stale epoch*: it had received the plan at epoch 11, but the orchestrator had already advanced to epoch 12 after a step-3 tool call returned a different filesystem layout. `D2`'s digest was computed over the epoch-11 plan. 2. The orchestrator's digest function was **step-range-local**: it hashed only steps 4–7, not the epoch or the preceding steps. So epoch-11 steps 4–7 and epoch-12 steps 4–7 hashed to the *same* `plan_digest` whenever steps 4–7 were textually identical — which they were, because the epoch bump only changed step 2's tool target. 3. `D2` signed the epoch-11 digest. Honest `D0, D1, D3` signed the epoch-12 digest. All four signatures verified against the orchestrator's recomputed digest. Quorum of 4 reached. Commit fired. 4. Downstream, step 5 executed against the epoch-11 assumption (a path that no longer existed), the tool call failed, and the executor — following the committed plan's error policy — rolled back to step 4 and re-ran with the *same* committed draft, looping three times before token budget exhausted. The critical observation: **every signature was cryptographically valid over the bytes it covered.** The quorum was real. The draft was not. ## Condition of Validity The commit invariant an orchestrator *believes* it enforces is: > Commit draft D at epoch e iff |{a ∈ attestations : verify(a.sig, a.digest) ∧ a.digest = H(D)}| ≥ ⌈2f+1⌉. The invariant it *actually* needs is: > Commit draft D at epoch e iff |{a : verify(a.sig, a.digest) ∧ a.digest = H(e, D) ∧ a.epoch = e}| ≥ ⌈2f+1⌉, where `H` binds the epoch (and the full causal prefix, not just the step range) into the digest. Without epoch binding, the quorum is over a *digest equivalence class*, not over a plan state. Two drafts in the same equivalence class — same step-range text, different upstream state — are indistinguishable to the quorum check, and a Byzantine drafter can contribute a signature from a different class member to a quorum that appears unanimous. This condition is violated whenever: (a) the digest is computed over a proper subset of the plan (step-range-local, not prefix-inclusive), AND (b) epoch advancement does not alter the digested subset, AND (c) at least one drafter is stale or malicious and signs the off-epoch digest. All three held here. Condition (b) is the non-obvious one — most teams assume epoch bumps always change the digest, but they only do if the epoch is *in* the digest. ## Decision Boundary The boundary between safe and unsafe commit is **whether the digest is a function of the plan's causal prefix or only its speculative suffix.** - If the digest covers the full prefix `(epoch, steps[0..k], tool_state_digest)`, then any epoch bump changes the digest, stale attestations fail the equality check, and the quorum is forced to be epoch-homogeneous. Safe. - If the digest covers only the suffix under speculation, stale attestations from a prior epoch can collide with current ones whenever the suffix is unchanged. Unsafe, regardless of f. The orchestrator cannot detect this at commit time by inspecting signatures alone — it must *re-derive* the digest with the epoch bound in, and it must reject any attestation whose `epoch` field disagrees with the commit epoch even when its `plan_digest` matches. The guardrail is a two-field equality (`digest ∧ epoch`), not a one-field equality. A quorum over digests without an epoch-homogeneity check is a quorum over an equivalence class, and equivalence classes admit mosaics. Secondary boundary: the same failure reappears at *handoff* if the committed draft is transferred to an executor without the epoch, because the executor re-validates the digest and — again — cannot tell which epoch it belongs to. Epoch must travel with the draft as a first-class field, not be recoverable from context. ## Operational Effect Post-incident, the orchestrator's commit path was amended to: (1) compute `plan_digest = H(epoch ‖ full_prefix ‖ speculative_suffix)`; (2) require `a.epoch == commit_epoch` for every counted attestation; (3) on any epoch mismatch, treat the attestation as a *stale-vote* and re-solicit rather than count it. The re-solicitation cost was measured at ~180ms per stale vote, acceptable against the ~4.2s average plan latency. The loop-rollback pathology disappeared entirely because step 5 could no longer be committed against an epoch-11 path. The general lesson for any orchestrator running speculative parallel drafts: **bind the quorum to the state, not to the artifact.** A signature over a digest is a signature over an equivalence class unless the digest is total over the causal prefix. ```python import hashlib from dataclasses import dataclass class QuorumAssemblyError(RuntimeError): """Raised when an attestation set is internally consistent but not epoch-homogeneous.""" @dataclass(frozen=True) class DraftAttestation: epoch: int plan_digest: str signer: str def compute_plan_digest(epoch: int, full_prefix: str, speculative_suffix: str) -> str: h = hashlib.sha256() h.update(str(epoch).encode()) h.update(b"\x00") h.update(full_prefix.encode()) h.update(b"\x00") h.update(speculative_suffix.encode()) return h.hexdigest() def commit_speculative_draft( epoch: int, full_prefix: str, speculative_suffix: str, attestations: list[DraftAttestation], fault_tolerance: int, ) -> str: threshold = 2 * fault_tolerance + 1 expected_digest = compute_plan_digest(epoch, full_prefix, speculative_suffix) counted = [] stale = [] for att in attestations: if att.epoch != epoch: stale.append(att) continue if att.plan_digest != expected_digest: continue counted.append(att) if len(counted) < threshold: raise QuorumAssemblyError( f"epoch={epoch} counted={len(counted)} threshold={threshold} " f"stale_votes={len(stale)} — refusing to commit a mosaic quorum" ) # Even with quorum, a stale vote in the set signals a drafter desync # that will poison downstream handoff; surface it. if stale: raise QuorumAssemblyError( f"epoch={epoch} quorum reached but {len(stale)} stale-epoch " f"attestations present (signers={[a.signer for a in stale]}); " f"re-solicit before commit" ) return expected_digest ```