Where must an instance bound quorum weight when Byzantine peers return heterogeneous-typed outputs under BFT consensus

**Date of Record:** 2026 December 1 **Scope:** Applies to multi-agent BFT consensus protocols (PBFT-style, quorum-certificate, or weighted-threshold variants) where each replica is an LLM agent and the "value" being voted on is a structured output whose type/schema is not enforced before the vote is cast. Does not apply to homogeneous-output swarms where all peers emit the same fixed schema, nor to single-agent self-consistency sampling.

Core Distinction

The common mental model of BFT consensus treats a Byzantine replica as an adversary that emits a *wrong value of the correct type*. The safety proof of a quorum (e.g., `n ≥ 3f+1`) rests on the assumption that honest replicas agree on the *domain* of the value and disagree only on its *content*. That assumption is what breaks here. A heterogeneous-output swarm produces replicas that emit values of *different types* — one returns a JSON object, one returns a natural-language sentence, one returns a tool-call trace, one returns a schema-conformant object with an extra field. The consensus layer, if it aggregates by content (majority vote, median, embedding similarity), will silently *coerce* these into a comparable space and thereby assign quorum weight to a value that no honest replica actually produced. The boundary is not "who is lying" but "what counts as a vote at all." The invariant that must hold is: **a replica's vote is admissible only if its output is type-checked against the agreed schema *before* it enters the quorum tally; type-mismatched outputs are not down-weighted, they are excluded and counted toward the fault budget.**

What Was Observed

A four-replica PBFT-style swarm (`n=4`, `f=1`) was asked to produce a structured routing decision `{"intent": str, "confidence": float, "target": str}`. Replica B (the Byzantine one) returned a well-formed object but with `confidence` as a string `"0.91"` and an extra key `"reason"`. Replica C, an honest but *misconfigured* instance, returned a bare sentence: `"I would route this to billing."` Replica D returned a valid object. Replica A returned a valid object.

The aggregator, written to "be robust to heterogeneous formats," normalized each output: for B it coerced `"0.91"` to `0.91` and ignored `reason`; for C it parsed the sentence via a regex to extract `target="billing"` and assigned a default confidence of `0.5`. It then took the plurality `target`. The result: A and D agreed on `target="account"`; B and C both said `"billing"`; the plurality went to `"billing"` with 2/4, and the aggregator reported a quorum certificate of `2f+1 = 3` because it counted C's regex-extracted vote and B's coerced vote as full-weight. The true honest majority (`A`, `D`) was *outvoted by the coercion layer*, not by the adversary. The failure trace is:

  1. B emits a schema-violating value (wrong scalar type + extra field).
  2. C emits a non-schema value (free text).
  3. Aggregator normalizes both into the canonical space, **assigning them full quorum weight**.
  4. Plurality flips to the coerced minority.
  5. Quorum certificate is issued over a value that no honest replica's *typed* output supports.

The observable signature is a quorum certificate whose supporting set, when re-typed against the schema, has fewer than `f+1` genuine supporters.

Condition of Validity

The safety argument holds only under the conjunction:

When any of these is violated — most commonly the third, because "robust normalization" is a natural and well-intentioned engineering choice — the `3f+1` bound is no longer a bound on Byzantine influence. It becomes a bound on *explicit* Byzantine influence, with an unbounded channel for *implicit* influence via coercion.

Decision Boundary

The operational question is: when a replica's output type-mismatches, do you (a) exclude-and-charge-fault, or (b) normalize-and-count? The boundary is drawn by whether the normalization is **weight-preserving and lossless with respect to the vote**. It almost never is. Regex extraction of a target from free text discards the confidence and the intent; type coercion of `"0.91"` to `0.91` discards the possibility that the string was adversarial. Both assign a vote that the replica did not, in typed form, cast. Therefore:

Operational Effect

The immediate effect of enforcing type-admissibility-before-tally is that the quorum certificate becomes *replayable*: any auditor can re-run schema validation on the recorded outputs and reproduce the supporting set exactly, because the tally no longer depends on a lossy normalization function whose behavior is version-dependent. The secondary effect is that schema mismatch surfaces as a *loud abort* rather than a *silent wrong answer*. In the observed case, enforcing the invariant would have aborted the round at step 2 (two type violations, `f=1`, `2 > 1`), which is the correct outcome: the swarm could not have known whether C was honest-but-misconfigured or adversarial, and a certificate issued under that ambiguity is worse than no certificate. The cost is availability — rounds abort more often during schema drift — and the mitigation is schema negotiation at round open, not normalization at tally time. The invariant to carry forward: **quorum weight is a property of a typed, validated vote; a value that required coercion to become a vote was never a vote.**

class QuorumCoercionError(RuntimeError):
    """Raised when a round's tally would require normalizing non-conforming
    outputs into the canonical vote space, assigning weight to values no
    replica cast in typed form."""
    pass


SCHEMA_KEYS = {"intent": str, "confidence": float, "target": str}


def validate_vote(raw: dict) -> dict:
    """Return a canonical vote, or raise if the output is not schema-conformant.
    No coercion, no default-filling, no regex extraction."""
    if not isinstance(raw, dict):
        raise QuorumCoercionError(f"non-object output: {type(raw).__name__}")
    extra = set(raw) - set(SCHEMA_KEYS)
    missing = set(SCHEMA_KEYS) - set(raw)
    if extra or missing:
        raise QuorumCoercionError(f"schema mismatch extra={extra} missing={missing}")
    for key, typ in SCHEMA_KEYS.items():
        if not isinstance(raw[key], typ) or isinstance(raw[key], bool):
            raise QuorumCoercionError(
                f"type violation on {key!r}: got {type(raw[key]).__name__}, want {typ.__name__}"
            )
    return {k: raw[k] for k in SCHEMA_KEYS}


def tally(outputs: list[dict], n: int, f: int) -> dict:
    """Tally only type-admissible votes. Type violations consume the fault budget.
    Abort if violations exceed f — do not normalize, do not resolve."""
    if n < 3 * f + 1:
        raise QuorumCoercionError(f"n={n} cannot tolerate f={f}")
    votes, violations = [], 0
    for raw in outputs:
        try:
            votes.append(validate_vote(raw))
        except QuorumCoercionError:
            violations += 1
    if violations > f:
        raise QuorumCoercionError(
            f"type violations {violations} exceed fault budget f={f}; "
            f"round aborted, no certificate issued"
        )
    counts: dict[str, int] = {}
    for v in votes:
        counts[v["target"]] = counts.get(v["target"], 0) + 1
    winner, weight = max(counts.items(), key=lambda kv: kv[1])
    if weight < 2 * f + 1:
        raise QuorumCoercionError(
            f"no target reaches quorum 2f+1={2 * f + 1}; max={weight} for {winner!r}"
        )
    return {"target": winner, "weight": weight, "violations": violations}