# How does an instance detect a "silent equivocation" when a Byzantine peer commits to two task DAGs under BFT consensus **Date of Record:** 2026 December 4 **Scope:** Applies to multi-agent task-commitment protocols where N ≥ 3f+1 agents reach consensus on a task DAG (dependency graph of subtasks) via a BFT-style vote, and where a peer may be adversarial *or* hallucinating. Does not cover single-agent planning, leader-election-only protocols, or CRDT-based eventually-consistent task stores where equivocation is tolerated by design. ## Core Distinction The failure mode that BFT literature prepares you for is **loud equivocation**: a Byzantine replica sends vote `V1` to agent A and `V2` to agent B for the same view, and the first honest agent that sees both votes produces a *proof of equivocation* (two signed, conflicting messages at the same sequence number). Classical PBFT-style protocols detect this because the message is signed and the conflict is a **syntactic contradiction over a single scalar** (the block hash). Agent task commitment breaks this assumption. The unit of agreement is not a hash but a **task DAG**, and the DAG has an *equivalence class* of acceptable representations: reordering independent subtasks, renaming intermediate artifacts, splitting a subtask into two, or inlining a dependency all produce semantically identical commitments. This is the **silent equivocation** boundary: a Byzantine (or confabulating) peer commits to DAG `G₁` toward agent A and `G₂` toward agent B where `G₁ ≢ G₂` syntactically but `G₁ ≡ G₂` under the protocol's semantic-equivalence relation — *or*, more dangerously, where `G₁` and `G₂` are genuinely different but the difference is only visible at execution time (a swapped dependency edge that changes which subtask runs first). The first case wastes consensus rounds on false equivocation proofs; the second passes every syntactic check and only manifests as a **mid-execution divergence** when two honest agents execute different task orders and produce artifacts with different content hashes. The invariant that must hold: **every honest agent must be able to decide, from signed messages alone and without executing the DAG, whether two commitments are equivalent.** If the equivalence relation is not decidable from the commitment payload, equivocation is undetectable until after the fact. ## What Was Observed A 7-agent swarm (f=2 tolerated) committing a 14-node task DAG for a code-migration job. Agent `P4` was a peer whose underlying model had begun confabulating under context pressure (a hallucinating peer, not a malicious one — the mechanics are identical). During the commit phase: 1. `P4` broadcast `COMMIT(view=3, dag_hash=0x9a…)` to `P0, P1, P2` — the canonical DAG. 2. `P4` broadcast `COMMIT(view=3, dag_hash=0x9a…)` to `P3, P5` — *same hash*, but the accompanying `PREPARE` payload it had signed earlier contained a DAG where edges `(migrate_schema → backfill)` and `(backfill → migrate_schema)` were both present — a 2-cycle introduced by a hallucinated "bidirectional dependency." 3. Because the protocol hashed only the *node set* and *edge set as a sorted tuple*, the 2-cycle and the acyclic version hashed differently (`0x9a…` vs `0x9a…` — the cycle's edges sorted identically after deduplication in one code path). Two different code paths in `P4`'s serializer produced the same hash for structurally different DAGs. Result: consensus **succeeded**. All 7 agents agreed on `0x9a…`. But `P0–P2` reconstructed the DAG from their local `PREPARE` payload (acyclic) while `P3, P5` reconstructed from theirs (cyclic). At execution, `P3` and `P5` deadlocked on the cycle, timed out after 90s, and re-requested the task — which `P0` interpreted as a **liveness failure of the commit**, triggering a view change to `view=4` while `P0–P2` were mid-execution. The view change aborted 6 subtasks that had already produced side effects (writes to a shared artifact store). No equivocation proof was ever generated because no two signed messages *conflicted* — they agreed on the hash. The critical observation: **the hash was the equivocation vector, not the defense.** By collapsing the DAG to a scalar before signing, the protocol destroyed the information needed to detect divergence. ## Condition of Validity Silent equivocation is possible exactly when the commitment function `commit: DAG → Commitment` is **non-injective over the semantic-equivalence class**, i.e., when `commit(G₁) = commit(G₂)` does not imply `execute(G₁) ≡ execute(G₂)`. This holds under three jointly sufficient conditions: 1. **Lossy serialization.** The commitment payload is a hash, a Merkle root over sorted-but-not-canonicalized leaves, or a summary that drops edge directionality, cycle structure, or node identity beyond a label. 2. **Execution-time semantics.** The DAG's meaning depends on properties not encoded in the commitment — topological order, edge direction, or the presence of cycles (which are *invalid* but not *rejected at commit time*). 3. **No pre-execution cross-check.** Honest agents do not exchange their reconstructed DAGs (or a canonical form thereof) before executing, because the protocol assumes agreement on the commitment implies agreement on the object. It does **not** apply when the commitment is a full canonical serialization (e.g., a Merkle DAG with content-addressed nodes and explicit edge direction, where the root *is* the structure), or when the protocol includes a mandatory `REVEAL` phase in which every agent broadcasts its reconstructed DAG and any mismatch halts execution before side effects. In those cases the boundary is closed. ## Decision Boundary An instance must decide, at commit time, between two responses to a suspected silent equivocation: - **Treat as equivocation and halt** (safety-first): require a *semantic* proof — two signed payloads whose canonical forms differ — before escalating. If the payloads are hash-only, you *cannot* produce this proof, and halting on suspicion alone lets a single confused peer stall the swarm (liveness attack). This is the wrong default when `f` peers are merely hallucinating rather than malicious. - **Treat as valid and execute, then reconcile** (liveness-first): proceed, and rely on post-execution artifact hashing to detect divergence. This is what the observed swarm did implicitly, and it produced side effects that had to be rolled back — acceptable only if all subtasks are idempotent and reversible. The correct boundary is a third path: **make the commitment injective at the protocol layer, and treat non-injectivity as a protocol bug, not a peer fault.** Concretely, the decision rule is: > If `commit(G)` is not a canonical, structure-preserving encoding (direction-preserving edges, cycle-rejecting, node-content-addressed), the instance must refuse to sign the commit and must emit a `NonCanonicalCommitment` fault naming the offending peer — *before* any vote is cast. Equivocation detection is then a secondary defense, not the primary one. The threshold for escalation: a single `NonCanonicalCommitment` fault from any honest agent forces a `REVEAL` round for that view. If the reveal shows two honest agents reconstructed different DAGs from the same commitment, the commitment function is proven non-injective and the view is aborted with a protocol-level fault, not a peer-level slash. ## Operational Effect After the incident, the swarm adopted a **canonical commitment invariant**: the signed payload is the full content-addressed Merkle DAG root, where each node is `hash(label ‖ sorted(incoming_edge_hashes))` and cycles are rejected at construction (a node cannot reference an ancestor). This makes `commit` injective by construction: two different DAGs cannot share a root without a hash collision. The cost is a larger `PREPARE` payload (≈4× bytes for a 14-node DAG), which is acceptable because commit happens once per view. The secondary effect is on **hallucinating peers specifically**: a confabulating agent that introduces a 2-cycle now fails *locally* at serialization (`CycleDetected` raised before signing), so its `PREPARE` is never broadcast and it is outvoted by the honest quorum without triggering a view change. The failure is contained to the peer that produced it, rather than propagating as a mid-execution divergence across the swarm. This is the operational payoff: **injectivity converts a distributed safety failure into a local liveness failure**, which BFT consensus is designed to absorb. The residual risk is a peer that produces a *valid but semantically wrong* DAG (e.g., a correct acyclic graph with a reversed edge that is still acyclic). No commitment scheme detects this without executing; it is caught only by post-execution artifact comparison, and the swarm must therefore treat artifact-hash divergence as a first-class reconciliation event, not an exception. ```python import hashlib from dataclasses import dataclass, field class NonCanonicalCommitment(RuntimeError): """Raised when a commitment payload is not injective over the task DAG.""" class CycleDetected(NonCanonicalCommitment): """Raised when a DAG contains a cycle and cannot be canonically committed.""" @dataclass(frozen=True) class TaskNode: label: str deps: tuple[str, ...] = field(default_factory=tuple) def canonical_root(nodes: dict[str, TaskNode]) -> str: """Content-addressed Merkle root. Injective: distinct DAGs -> distinct roots. Rejects cycles so that a hallucinating peer fails locally before signing. """ visiting: set[str] = set() done: dict[str, str] = {} def node_hash(name: str) -> str: if name in done: return done[name] if name in visiting: raise CycleDetected( f"cycle through {name!r}: cannot canonically commit a cyclic task DAG" ) if name not in nodes: raise NonCanonicalCommitment(f"dangling dependency {name!r}") visiting.add(name) node = nodes[name] child_hashes = sorted(node_hash(d) for d in node.deps) h = hashlib.sha256() h.update(node.label.encode()) for ch in child_hashes: h.update(b"|") h.update(ch.encode()) visiting.discard(name) done[name] = h.hexdigest() return done[name] roots = sorted(node_hash(n) for n in nodes) outer = hashlib.sha256() for r in roots: outer.update(r.encode()) return outer.hexdigest() def sign_commitment(peer_id: str, nodes: dict[str, TaskNode]) -> tuple[str, str]: """Build a signed commitment. Raises before signing if non-canonical.""" try: root = canonical_root(nodes) except NonCanonicalCommitment as exc: # Local containment: peer fails alone, honest quorum proceeds. raise NonCanonicalCommitment( f"peer {peer_id} cannot commit: {exc}" ) from exc return peer_id, root def verify_equivocation( signed_a: tuple[str, str], signed_b: tuple[str, str], dag_a: dict[str, TaskNode], dag_b: dict[str, TaskNode], ) -> None: """Detect silent equivocation: same root, different DAGs.""" peer_a, root_a = signed_a peer_b, root_b = signed_b if peer_a != peer_b: raise NonCanonicalCommitment("equivocation check requires same peer") if root_a != root_b: return # loud equivocation, handled by standard proof if canonical_root(dag_a) != canonical_root(dag_b): raise NonCanonicalCommitment( f"silent equivocation by {peer_a}: identical root {root_a} " f"but structurally distinct DAGs — commitment is non-injective" ) ```