# Where must an instance refuse to merge a peer's memory delta when consensus quorum is reconstructed from stale epochs **Date of Record:** 2026 November 24 **Scope:** Applies to federated agent swarms where shared semantic memory is reconciled by quorum vote over versioned deltas (each delta tagged with a swarm epoch and a writer's causal vector). Does not apply to single-writer stores, CRDT-only stores with no quorum gate, or to ephemeral scratchpads never promoted to shared memory. ## Core Distinction The dangerous failure is not a split-brain vote on the *content* of a delta. It is a split-brain vote on the *membership* used to compute the quorum that ratifies the delta. When a reconciling instance receives a batch of peer votes, it reconstructs the quorum set from its own local view of the swarm roster at the delta's declared epoch. If that local roster view is stale—because the instance missed one or more membership transitions (join/leave/eviction) while partitioned—it will count votes from agents that have since been evicted, and discount votes from agents that joined after the partition. The result is a *numerically valid* quorum over a *semantically invalid* electorate. The delta is merged, the shared memory mutates, and the mutation is durable: subsequent reconciliation treats the merged state as ground truth and the corrupted causal vector propagates. This is distinct from ordinary Byzantine voting failures because every individual vote is authentic and correctly signed; the bug lives entirely in epoch-to-roster resolution. ## What Was Observed A six-node swarm (A–F) partitioned into {A,B,C} and {D,E,F} at epoch 41. During the partition, A was evicted for repeated schema violations and G joined the majority partition; both membership changes were ratified at epoch 42 by {D,E,F,G}. The minority partition {B,C} never observed epoch 42 and continued to believe the roster was {A,B,C,D,E,F} at epoch 41. At epoch 43 a delta Δ was authored by D containing a distilled semantic memory ("customer tier = gold") derived from a tool call whose output was later invalidated. D collected votes from {E,F,G}—a correct 3-of-4 quorum under the epoch-42 roster. When B received the reconciliation batch, it resolved the delta's declared epoch (43) against its *local* roster, which it still pinned at epoch 41. Under that stale roster, {E,F,G} were only 3 of 6, below B's configured threshold of 4-of-6, so B rejected Δ. Meanwhile A—still present in B's stale roster—was counted as an eligible voter, and B accepted a *different* competing delta Δ′ that D had never seen, because Δ′ carried votes from {A,B,C} where A's vote was cryptographically valid but issued before its eviction. The two halves of the swarm merged Δ and Δ′ respectively. Shared memory diverged at a key that both sides believed was quorum-ratified. The divergence was not detected for eleven epochs, until a reader agent on side {B,C} queried the key and got a value that contradicted a value it had written on side {D,E,F,G} through a different path. Reconciliation replay could not determine which side was canonical because *both* had locally valid quorum certificates. ## Condition of Validity A reconciling instance may merge a peer delta only if the following invariant holds: > The roster snapshot used to evaluate the delta's quorum certificate must be the roster at an epoch `≥` the delta's declared epoch, and the delta's causal vector must be a descendant of every membership transition between the instance's local epoch and the delta's epoch. Operationally this means the reconciler must *refuse* to evaluate quorum until it has caught up on membership transitions. It cannot "best-effort" resolve a delta against a stale roster, because a stale roster produces a certificate that is internally consistent yet externally wrong. The correct behavior on a stale roster is to block reconciliation, request the missing membership deltas, and only then re-evaluate. This is a hard gate, not a heuristic: the cost of blocking is latency; the cost of a false merge is durable divergence. The invariant also requires that eviction be *epoch-stamped and causally ordered* relative to the delta being voted on. A vote cast by A at epoch 41 is valid for deltas declaring epoch ≤ 41, but must be discarded for deltas declaring epoch ≥ 42 once A's eviction is known. The reconciler must therefore carry, per voter, the epoch range over which that voter was eligible—not merely a boolean "is member." ## Decision Boundary The boundary is crossed at the moment an instance evaluates a quorum certificate against a roster whose epoch is strictly less than the delta's declared epoch. Two sub-cases matter: - **Stale-roster acceptance:** the reconciler counts a vote from an agent evicted after the roster epoch. This inflates the apparent quorum and lets an under-qualified delta merge. - **Stale-roster rejection:** the reconciler discounts a vote from an agent that joined after the roster epoch. This deflates the apparent quorum and causes a valid delta to be rejected—which is safer, but still wrong, because the rejected delta may be the only copy of a correct mutation and will be lost when the rejecting instance's state is later used to overwrite the peer. The boundary is *not* crossed when the delta's epoch is unknown or the roster epoch is unknown; in both cases the reconciler must treat the certificate as unverifiable and block, which is the safe default. The dangerous case is specifically the one where both epochs are known and the roster epoch is *older*—because that is the only configuration in which the reconciler has enough information to produce a confident, wrong answer. ## Operational Effect When the boundary is crossed, the swarm experiences *silent durable divergence*: no error is raised, no vote fails, and every local certificate verifies. The divergence only surfaces when a read observes both branches, which may be arbitrarily late. By then, downstream semantic distillation has already promoted the divergent value into higher-level memory, and rollback requires reconstructing the pre-divergence state from the causal log—which is only possible if the log retained the evicted voters' epoch ranges. The guardrail that bounds this is a *membership-catch-up precondition* on the reconcile path: before any quorum evaluation, the instance asserts `local_roster_epoch >= delta.epoch` and that the delta's causal vector descends from all membership transitions in `(local_roster_epoch, delta.epoch]`. If either assertion fails, reconciliation raises and the delta is parked in a pending queue until membership catches up. This converts a silent divergence into a loud, recoverable stall—which is the correct trade for a system whose shared memory is durable. ```python from dataclasses import dataclass, field from typing import Dict, List, Tuple class StaleRosterReconciliationError(RuntimeError): """Raised when a delta's quorum certificate would be evaluated against a roster epoch older than the delta's declared epoch, or when the delta's causal vector does not descend from all intervening membership transitions.""" pass @dataclass class MembershipTransition: epoch: int added: frozenset removed: frozenset @dataclass class Delta: delta_id: str epoch: int causal_vector: Dict[str, int] # writer_id -> last-observed epoch votes: List[Tuple[str, int]] # (voter_id, vote_epoch) payload: dict = field(default_factory=dict) @dataclass class Reconciler: local_roster_epoch: int local_roster: frozenset transitions: List[MembershipTransition] quorum_threshold: int def _roster_at(self, epoch: int) -> frozenset: roster = set(self.local_roster) # Reconstruct roster at `epoch` by unwinding transitions newer than it. for t in sorted(self.transitions, key=lambda x: x.epoch, reverse=True): if t.epoch > epoch: roster -= t.added roster |= t.removed return frozenset(roster) def _descends_from_transitions(self, delta: Delta) -> bool: for t in self.transitions: if self.local_roster_epoch < t.epoch <= delta.epoch: # Every agent added/removed at t must have been observed by # at least one writer in the delta's causal vector at or # after t.epoch. if not any(epoch >= t.epoch for epoch in delta.causal_vector.values()): return False return True def evaluate_quorum(self, delta: Delta) -> bool: if self.local_roster_epoch < delta.epoch: raise StaleRosterReconciliationError( f"cannot evaluate delta {delta.delta_id} at epoch {delta.epoch}: " f"local roster pinned at epoch {self.local_roster_epoch}; " f"membership catch-up required before reconciliation" ) if not self._descends_from_transitions(delta): raise StaleRosterReconciliationError( f"delta {delta.delta_id} causal vector does not descend from " f"membership transitions in ({self.local_roster_epoch}, {delta.epoch}]" ) eligible = self._roster_at(delta.epoch) valid_votes = { voter for voter, vote_epoch in delta.votes if voter in eligible and vote_epoch <= delta.epoch } return len(valid_votes) >= self.quorum_threshold ```