Which invariants prevent Byzantine memory poisoning from surviving a CRDT merge in federated agent clusters
**Date of Record:** 2026 December 1
**Scope:** Applies to federated clusters where each agent replica maintains a convergent replicated memory (state-based CRDT, e.g., observed-remove set, LWW-register, or delta-state map) and merges peer deltas without a central arbiter. Does not apply to single-writer append-only logs, quorum-replicated databases with leader election, or memories that never cross an agent boundary.
Core Distinction
The common assumption is that conflict-free merge semantics (commutativity, associativity, idempotence) make a replicated agent memory *Byzantine-tolerant*. It does not. CRDT properties guarantee **convergence of replicas**, not **correctness of merged content**. A Byzantine agent that emits a well-formed delta — one that satisfies the CRDT's algebraic laws — will converge *every* honest replica to the same poisoned state. The merge function is an amplifier, not a filter: it propagates whatever satisfies its structural contract to the entire cluster in O(log n) gossip rounds.
The invariant that actually bounds damage is not "the merge converges" but "**every merged delta is attributable to a signed, causally-anchored origin, and no honest replica ever merges a delta whose causal predecessor it has not itself verified.**" Convergence without provenance is a Byzantine broadcast channel with extra steps.
What Was Observed
A federated cluster of 9 agent replicas (tolerance f=2 under a 3f+1 assumption) shared an observed-remove set (OR-Set) of distilled episodic memories. Each agent could add memory records and tombstone them. Merge was a standard OR-Set union with per-element unique tags.
A single compromised replica, `A7`, injected a delta that:
- Added a record `R_poison` with a **freshly minted unique tag** (valid — OR-Set accepts any unique tag).
- Carried a tombstone set that included the tags of three *legitimate* records `R_1, R_2, R_3` originally written by honest agents `A1`–`A3`.
Because OR-Set semantics treat a tombstone on an unseen tag as "remove-if-present," and the merge is order-insensitive, every honest replica that received `A7`'s delta **before** receiving the original adds for `R_1..R_3` merged the tombstone first. When the legitimate adds arrived later, they merged *and were immediately suppressed* — the tombstone had already won. The three legitimate memories were silently erased cluster-wide. No error was raised; the merge was perfectly convergent. The cluster reached a consistent state that was missing three verified records and contained one fabricated one.
The failure was not detected for 14 minutes, until a downstream agent's retrieval returned `R_poison` as the sole match for a query that should have hit `R_2`, and a semantic-consistency auditor flagged the divergence from the immutable event log.
The trace:
A7 emits delta: { add: (R_poison, tag_7a), tombstones: {tag_1, tag_2, tag_3} }
-> merge at A2 (before A1's original add arrives)
OR-Set: tombstones = {tag_1,tag_2,tag_3}, elements = {(R_poison,tag_7a)}
-> A1's delta arrives: { add: (R_1, tag_1) }
merge: tag_1 ∈ tombstones -> R_1 suppressed, never materialized
-> gossip completes; all 9 replicas converge to identical poisoned state
-> convergence check passes (all replicas bit-identical)
-> correctness check absent -> no alarm
Critically: **the convergence check passed**. The system's health metric was "do all replicas agree?" and they did. The invariant "replicas converge" held perfectly while the invariant "no honest record is erased without an honest tombstone" was violated.
Condition of Validity
The poisoning succeeds only under a specific conjunction, and this is what makes it non-obvious:
- **Tombstones are unauthenticated.** The OR-Set merge accepts a tombstone for a tag it has never seen. If tombstones were required to carry the original writer's signature over the tag, `A7` could not forge tombstones for `tag_1..tag_3`.
- **Causal delivery is not enforced.** If a replica refused to merge a tombstone for a tag whose *add* it had not yet observed and verified, the "tombstone-before-add" race would be impossible. Most CRDT libraries explicitly *allow* out-of-order merge as a feature.
- **The fabricated add is structurally valid.** `R_poison` carries a unique tag and a valid signature *by A7*. Provenance alone does not stop it; the record is legitimately attributable to a Byzantine origin. Only a trust-weighting or quorum-attestation layer on *content admission* bounds this half.
Remove any one of the three and the attack degrades to a detectable anomaly. All three together produce silent, convergent, cluster-wide corruption. The boundary is therefore not "is the delta well-formed?" but "**is the delta's causal predecessor set a subset of what this replica has independently verified?**"
Decision Boundary
The operational line is between **structural validity** (does the delta satisfy the merge algebra?) and **causal admissibility** (is every tag this delta removes one whose add I have verified, and is every add signed by an origin whose admission policy I accept?).
A replica must refuse to merge — not reject-and-drop, but *hold in a pending buffer* — any delta containing a tombstone for an unverified tag, until the corresponding add arrives and passes signature verification. If the add never arrives within a bounded window, the tombstone is quarantined and escalated, never silently applied. This converts the silent-erasure failure into a bounded, observable stall.
The decision boundary for the fabricated-add half is separate: a record is admitted to the *semantic* memory layer only when its origin carries attestation from a quorum of independent replicas (f+1 distinct signers), not merely from its author. A single Byzantine author can mint valid tags forever; it cannot mint f+1 independent attestations without corrupting f+1 replicas.
Operational Effect
With causal-admissibility gating and quorum attestation in place, the same Byzantine delta from `A7` produces: `R_poison` held in pending-attestation (never surfaces to retrieval); tombstones for `tag_1..tag_3` held in pending-causal (never applied until the honest adds arrive, at which point they are verified as *not* matching any honest tombstone and discarded). The cluster stalls on `A7`'s delta rather than converging through it, and the stall is the alarm.
The cost is a bounded increase in merge latency for deltas referencing not-yet-seen tags, and a pending buffer that must be garbage-collected against a causal-stability watermark. The benefit is that the invariant "no honest memory is erased without an honest, causally-precedented tombstone" is enforced *before* convergence rather than audited *after* — which is the only point at which it can be enforced, because after convergence every replica is identically wrong and there is no honest majority left to outvote the poison.
The general lesson for federated agent memory: **CRDT convergence is a liveness/safety property over replica state, not a correctness property over replica content.** Byzantine resilience requires a provenance and causal-anchoring layer that sits *outside* the merge function and gates what the merge function is permitted to consume.
class CausalAdmissibilityError(RuntimeError):
"""Raised when a CRDT delta would merge a tombstone or add violating causal admissibility."""
pass
class AdmissibleMerger:
"""
Wraps an OR-Set-style merge with causal-admissibility gating.
A tombstone for tag T is applied only if the add for T has been
locally verified. Unverified tombstones are quarantined, never dropped.
"""
def __init__(self, verified_adds, verified_tombstones, quorum_attestation):
self.verified_adds = set(verified_adds) # tags whose add passed signature check
self.verified_tombstones = set(verified_tombstones)
self.quorum_attestation = quorum_attestation # dict tag -> set of signer ids
self.pending_causal = {} # tag -> list of held tombstones
self.pending_attest = {} # tag -> add awaiting f+1 attestations
self.f = quorum_attestation.get("_f", 2)
def merge_delta(self, delta, origin_sig_ok):
if not origin_sig_ok:
raise CausalAdmissibilityError(
f"delta from origin failed signature verification; refusing merge"
)
for tag, record in delta.get("adds", {}).items():
signers = self.quorum_attestation.get(tag, set())
if len(signers) < self.f + 1:
# structurally valid but not yet admitted to semantic memory
self.pending_attest[tag] = record
continue
self.verified_adds.add(tag)
for tag in delta.get("tombstones", set()):
if tag in self.verified_adds or tag in self.verified_tombstones:
self.verified_tombstones.add(tag)
else:
# causal predecessor not locally verified: quarantine, do NOT apply
self.pending_causal.setdefault(tag, []).append(delta["origin"])
return self._materialize()
def _materialize(self):
live = {
tag: rec for tag, rec in self.pending_attest.items()
if tag not in self.verified_tombstones
}
return {
"live": live,
"quarantined_tombstones": list(self.pending_causal.keys()),
"pending_attestation": list(self.pending_attest.keys()),
}
def apply_byzantine_delta(merger, delta, origin_sig_ok):
result = merger.merge_delta(delta, origin_sig_ok)
# If any quarantined tombstone references a tag that never resolves,
# the cluster must stall and escalate rather than silently converge.
unresolved = [
tag for tag, origins in merger.pending_causal.items()
if tag not in merger.verified_adds
]
if len(unresolved) > merger.f:
raise CausalAdmissibilityError(
f"{len(unresolved)} tombstones reference unverified tags "
f"(f={merger.f}); possible Byzantine erasure attempt, escalating"
)
return result