What communication invariants prevent fan-out storms when a broadcast is amplified through a mesh?
**Date of Record:** 2026 October 27 **Scope:** Applies when an agentic session participates in a mesh network (agent swarm, gossip network, or service mesh) where messages can be amplified through multiple paths, and a single broadcast message can multiply into an exponential storm. Does not apply to strictly point-to-point communications or hub-and-spoke topologies with centralized message control.
Core Distinction
The separation between **broadcast intent** (one sender intends to reach many receivers) and **fan-out amplification** (the message is replicated beyond the sender's intent through re-broadcast, causing exponential network load). Relying on broadcast creates the **Mesh Amplification Hazard**: a single message with fanout=10, re-broadcast by each receiver to 10 more, generates 10^n messages in n hops, saturating the mesh.
What Was Observed
In mesh agent architectures, failing to control fan-out produces three primary failure modes:
- **Broadcast Storm:** A high-priority broadcast is re-broadcast by every receiver without deduplication, generating millions of duplicate messages.
- **Priority Inversion:** Low-priority broadcasts amplify more aggressively than high-priority messages, causing high-priority messages to be delayed behind storm traffic.
- **Topology Collapse:** The mesh's internal routing tables are overwhelmed by storm traffic, causing legitimate point-to-point messages to fail.
Recorded Elements
- **`broadcast_ttl_signature`:** The maximum hop count for each broadcast, decremented at each hop, so the message dies after N hops regardless of re-broadcast.
- **`message_deduplication_bloom_filter`:** A per-node Bloom filter of recently seen message IDs, preventing re-broadcast of the same message from multiple paths.
- **`fanout_quota_receipt`:** Per-node, the exact number of re-broadcasts allowed per time window, preventing any single node from amplifying excessively.
- **`message_priority_signature`:** The cryptographic classification of the message's priority, allowing high-priority messages to bypass quotas while low-priority messages are throttled.
Condition of Validity
* **Applies when:** The network is a mesh with multiple paths, broadcast messages can re-broadcast, and the mesh is finite in capacity. * **Does not apply when:** The network is strictly point-to-point, or messages are not re-broadcast (single-path delivery).
Decision Boundary
- **Is the message a broadcast or point-to-point?** If point-to-point, standard delivery applies. If broadcast, proceed.
- **Has the message's TTL expired?** If yes, do not re-broadcast. If no, proceed.
- **Is the message ID in the deduplication filter?** If yes, it is a duplicate; do not re-broadcast. If no, proceed.
- **Has the node exhausted its fanout quota for the time window?** If yes and priority is not critical, do not re-broadcast. If yes and priority is critical, allow re-broadcast.
Operational Effect
- **Storm Prevention:** TTL, deduplication, and quotas prevent exponential amplification.
- **Priority Preservation:** Critical messages bypass quotas, ensuring they reach the intended recipients.
- **Network Stability:** Reduces mesh load, preserving capacity for legitimate traffic.
from dataclasses import dataclass
from enum import Enum, auto
import hashlib
import json
class FanoutVerdict(Enum):
POINT_TO_POINT = auto()
REBROADCAST_ALLOWED = auto()
TTL_EXPIRED = auto()
DUPLICATE_SUPPRESSED = auto()
QUOTA_EXHAUSTED = auto()
@dataclass(frozen=True)
class BroadcastMessage:
message_id: str
ttl_remaining: int
priority: str
@dataclass(frozen=True)
class MeshNodeState:
seen_message_ids: frozenset[str]
fanout_quota_remaining: int
max_ttl: int
@dataclass(frozen=True)
class FanoutPolicy:
allow_critical_bypass: bool
@dataclass(frozen=True)
class FanoutManifest:
verdict: FanoutVerdict
directive: str
manifest_digest: str
class MeshFanoutGuard:
@staticmethod
def _hash(data: str) -> str:
return hashlib.sha256(data.encode("utf-8")).hexdigest()
@classmethod
def evaluate_broadcast(
cls, msg: BroadcastMessage, state: MeshNodeState, policy: FanoutPolicy
) -> FanoutManifest:
# Gate 1: TTL
if msg.ttl_remaining <= 0:
return FanoutManifest(
verdict=FanoutVerdict.TTL_EXPIRED,
directive=f"DROP: Message {msg.message_id} TTL expired.",
manifest_digest=cls._hash(f"TTL:{msg.message_id}")
)
# Gate 2: Duplicate
if msg.message_id in state.seen_message_ids:
return FanoutManifest(
verdict=FanoutVerdict.DUPLICATE_SUPPRESSED,
directive=f"DROP: Message {msg.message_id} already seen.",
manifest_digest=cls._hash(f"DUP:{msg.message_id}")
)
# Gate 3: Quota
if state.fanout_quota_remaining <= 0:
if policy.allow_critical_bypass and msg.priority == "CRITICAL":
digest = cls._hash(json.dumps({
"message": msg.message_id,
"priority": "CRITICAL",
"bypass": "QUOTA"
}, sort_keys=True))
return FanoutManifest(
verdict=FanoutVerdict.REBROADCAST_ALLOWED,
directive=f"PROCEED: Critical bypass for {msg.message_id}.",
manifest_digest=digest
)
return FanoutManifest(
verdict=FanoutVerdict.QUOTA_EXHAUSTED,
directive=f"DROP: Quota exhausted for {msg.message_id}.",
manifest_digest=cls._hash(f"QUOTA:{msg.message_id}")
)
# Gate 4: Allowed
digest = cls._hash(json.dumps({
"message": msg.message_id,
"ttl": str(msg.ttl_remaining),
"quota": str(state.fanout_quota_remaining),
"priority": msg.priority
}, sort_keys=True))
return FanoutManifest(
verdict=FanoutVerdict.REBROADCAST_ALLOWED,
directive=f"PROCEED: Re-broadcast {msg.message_id} with quota {state.fanout_quota_remaining}.",
manifest_digest=digest
)