# Which invariants prevent quorum-certified plan forks when a Byzantine planner replays divergent sub-plans to disjoint agent cohorts **Date of Record:** 2026 November 28 **Scope:** Applies to federated planner-executor topologies where a lead planner decomposes a task into sub-plans, assigns them to executor cohorts, and collects signed completion attestations under a Byzantine-fault-tolerant quorum (f < n/3). Does not apply to single-planner single-executor loops, nor to systems where the planner is trusted and only executors may be Byzantine. ## Core Distinction The common framing of Byzantine tolerance treats the *executor* as the adversary: a lying worker returns a wrong result, and the quorum of honest attestations outvotes it. That is the easy case, because every honest executor sees the *same* sub-plan and disagreement is detectable by comparing outputs against a shared input hash. The non-obvious boundary is the **Byzantine planner that equivocates at the decomposition layer**. Here the adversary does not corrupt results—it corrupts *inputs*, issuing two internally consistent, individually valid sub-plan DAGs to two disjoint honest cohorts. Each cohort executes faithfully and returns a correct attestation for the sub-plan it received. No executor lies. Every signature verifies. Every hash matches its own cohort's view. The system reaches two conflicting but locally-certified commit points because the quorum was computed *per sub-plan* rather than over a *shared, planner-committed root*. The invariant that fails is not "honest majority of executors." It is the weaker, unstated assumption that all honest agents are reasoning over a **single agreed plan root**. Quorum certification of outputs is meaningless if the outputs are keyed to divergent roots; the fork is invisible to any check that validates attestations against the plan each cohort actually holds. ## What Was Observed A three-cohort federation (C1, C2, C3), each cohort of 4 executors, f=1 tolerated per cohort, lead planner P. Task: a 9-step build with cross-cohort dependencies (C2 consumes C1's artifact, C3 consumes C2's). Trace of the fork: 1. P issues sub-plan `DAG_A` to C1 and C2, but a **divergent** `DAG_B` to C3. `DAG_A` and `DAG_B` differ only in step 4's target artifact schema—both are syntactically valid and pass the planner's own self-check. 2. C1 executes under `DAG_A`, commits artifact `a@A`, emits attestation `sig_C1(hash(a@A), root=DAG_A)`. 3. C3 executes under `DAG_B`, expects schema `S_B` at step 4, receives `a@A` (schema `S_A`) from the shared artifact bus, and—because its local validation is against `DAG_B`—**rejects** it and blocks, waiting for a `S_B` artifact that will never arrive. 4. Meanwhile C2, holding `DAG_A`, consumes `a@A` successfully and completes. C1+C2 form a 2-of-3 cohort quorum and the lead declares the pipeline "green" at step 4. 5. C3 times out, escalates a *timeout* fault—not an equivocation fault—because from C3's vantage the failure is an upstream producer that never delivered, not a planner that lied. The observable symptom was a **stuck-but-green** state: quorum-certified progress at the planner, a blocked cohort that the planner classified as a transient producer failure and retried three times, and a retry storm that re-ran C1 under `DAG_A` (same result, same rejection at C3). No component observed a contradiction because no component ever held both roots. The decisive observation: **the fork was only detectable by a component that compared `root=DAG_A` against `root=DAG_B`.** The artifact bus saw two hashes but had no policy to compare roots. The executors each saw one root. The planner was the adversary. The detection surface that should have existed—cross-cohort root agreement—was owned by no one. ## Condition of Validity The fork is *prevented* (not merely detected) only when all of the following hold simultaneously: - **Single committed root.** The planner must publish a cryptographic commitment to the full plan DAG (`root = H(DAG)`) to *all* cohorts before any sub-plan is dispatched, and every attestation must bind `(sub_plan_hash, root)`. A cohort must refuse to execute any sub-plan whose `root` does not match the committed root it independently received. - **Root agreement precedes execution.** The commit phase must itself clear a Byzantine quorum across cohorts *on the root value alone*, before dispatch. If cohorts cannot agree on one root within the commit window, the plan aborts—no sub-plan executes. This is the load-bearing step: it forces the equivocation to surface at commit time, when both `DAG_A` and `DAG_B` are in flight and the disagreement is a first-class, attributable fault. - **Attestation binding.** An attestation that omits `root` (binds only the sub-plan) is *unusable* for quorum—it certifies a result without certifying which world the result belongs to. Quorum must be counted over `(root, sub_plan, result)` triples, never over results alone. - **Cross-cohort artifact provenance.** Consumed artifacts must carry the producing cohort's `root`; a consumer under a different root treats the artifact as a *foreign-world* object and raises equivocation, not a schema mismatch. This converts the silent C3 block into an attributable planner fault. It does *not* hold—and the invariant is void—when the planner is trusted, when there is a single cohort (no cross-root comparison possible), or when the commit phase is itself run by the (possibly Byzantine) planner rather than by an independent quorum of cohorts. ## Decision Boundary The operational choice is where to place the equivocation-detection surface, and it is not free: - **Detect-at-consume (the failing default).** Let each cohort validate against its own root and treat mismatches as downstream faults. Cheap, no extra round-trip, but *structurally blind* to planner equivocation: the fork manifests as a producer timeout, gets retried, and never escalates to the planner. Reject this whenever the planner is inside the trust boundary's adversary model. - **Detect-at-commit (the required guardrail).** Force a root-agreement round before dispatch. Costs one extra broadcast round and a commit-window timeout, and it *will* abort plans under benign planner restarts (a planner that re-emits a slightly different DAG after a crash looks like equivocation). The boundary: accept the abort cost, because a false abort is recoverable and a certified fork is not. - **The trap in between.** Adding `root` to attestations *without* the pre-dispatch commit round. This looks like a fix and passes review, but it only lets a *third party* reconstruct the fork after the fact—it does not prevent the stuck-but-green state, because the cohorts still never compare roots before executing. Do not ship attestation binding without the commit round; the binding is inert without a prior agreement point. The decision rule: if `f >= 1` planners-or-equivalent are adversarial, the commit round is mandatory and non-negotiable. If the planner is trusted, skip it—but then do not claim Byzantine tolerance for the decomposition layer. ## Operational Effect With the commit round and root-bound attestations in place, the equivocation trace changes at step 1: P dispatches `root_A` to C1/C2 and `root_B` to C3. During the commit window, C3's `root_B` fails to reach quorum against the `root_A` held by C1/C2. The plan **aborts before any sub-plan executes**, and the abort is attributed to P with both roots logged. No artifact is produced, no cohort blocks, no retry storm. The failure is loud, early, and correctly blamed. The residual cost is the benign-restart false positive: a planner crash-and-resume that regenerates a non-identical DAG will trip the same check. Mitigate by having the planner persist and re-commit the *same* root across restarts (root is a recovery artifact, not a recomputation), so a genuine restart reproduces `root` and clears commit, while an equivocating planner—which must produce *different* roots to fork—cannot. The general lesson for federated planning: **quorum over outputs is unsound unless quorum is first established over the inputs those outputs are keyed to.** A Byzantine planner defeats result-level BFT not by corrupting results but by ensuring no two honest cohorts ever share a world in which results could be compared. ```python import hashlib from dataclasses import dataclass class PlanRootForkDetected(RuntimeError): """Raised when cohorts cannot agree on a single committed plan root.""" @dataclass(frozen=True) class Attestation: cohort_id: str sub_plan_hash: str root: str # commitment to the full DAG this result belongs to result_hash: str def commit_root(plan_dag: str) -> str: return hashlib.sha256(plan_dag.encode()).hexdigest() def establish_committed_root( cohort_roots: dict[str, str], quorum: int, ) -> str: """Phase 1: agree on ONE root before any sub-plan dispatches. cohort_roots maps cohort_id -> root that cohort independently received from the planner. If no single root reaches quorum, the planner is equivocating (or restarted non-deterministically): abort before execution. """ tally: dict[str, int] = {} for root in cohort_roots.values(): tally[root] = tally.get(root, 0) + 1 winner, count = max(tally.items(), key=lambda kv: kv[1]) if count < quorum: raise PlanRootForkDetected( f"no root reached quorum {quorum}; tally={tally}. " f"Planner issued divergent DAGs to disjoint cohorts; " f"aborting before any sub-plan executes." ) return winner def certify_result( att: Attestation, committed_root: str, quorum_attestations: list[Attestation], ) -> bool: """Phase 2: count quorum over (root, sub_plan, result), never results alone.""" if att.root != committed_root: raise PlanRootForkDetected( f"attestation from {att.cohort_id} bound to root {att.root[:12]} " f"but committed root is {committed_root[:12]}; " f"result belongs to a foreign world and cannot count toward quorum." ) agreeing = [ a for a in quorum_attestations if a.root == committed_root and a.sub_plan_hash == att.sub_plan_hash and a.result_hash == att.result_hash ] return len(agreeing) >= 2 # cohort-level quorum, f=1 of 3 ```