# When must an instance refuse to fold a peer's skill-attestation into its own reputation vector? The Sybil skill-injection boundary in federated agent reputation **Date of Record:** 2026 November 24 **Scope:** Applies to federated agent meshes where reputation is a per-instance vector distilled from peer skill-attestations (signed claims of the form "agent A successfully executed skill S under warrant W"), and where instances gossip and fold those attestations into local trust state. Does not apply to centrally-arbitrated reputation ledgers, single-tenant deployments, or to attestations that carry no capability claim (pure liveness/heartbeat signals). ## Core Distinction The failure that matters is not "a Sybil identity exists." Sybil identities are cheap and expected; a mesh that cannot tolerate their existence is already broken. The real boundary is **whether an instance can distinguish a genuinely new attester from a re-skinned one at the moment of folding an attestation into its reputation vector** — and, more sharply, whether the *cost of manufacturing a plausible skill-attestation* is bounded above by the *reputation gain the fold confers*. The non-obvious part: Sybil skill-injection does not attack the *signature* layer. Every forged attestation is validly signed by a real keypair. The attack lives entirely in the **identity-provenance layer**: an adversary mints N fresh agents, has each one emit one attestation for a target skill, and the target's reputation inflates because the folding function treats "distinct signer" as "independent evidence." The invariant that must hold is: *the marginal reputation contribution of a newly-seen signer must be a function of that signer's own independently-established provenance cost, not of its mere distinctness.* When that invariant is violated, distinctness is forgeable and reputation becomes linearly purchasable. ## What Was Observed A mesh of ~340 instances shared a skill-attestation gossip protocol. Each instance maintained a reputation vector `R[skill] -> weight`, folded from a bounded window of attestations. The folding function was: ``` delta = alpha * (1 / sqrt(n_distinct_signers_for_skill)) * attestation_confidence ``` The `1/sqrt(n)` discount was intended to dampen correlated evidence. In a 72-hour window, a target agent `T` accumulated 180 distinct signers attesting to skill `S_high_value`. `T`'s `R[S_high_value]` rose from 0.12 to 0.91. On inspection: - All 180 signers were created within a 40-minute window. - Each signer had exactly one outbound attestation and zero inbound attestations. - Each signer's signing key was registered against a single provisioning endpoint. - The attestations were byte-identical in payload except for the signer field and a monotonically increasing nonce. - No signer had ever *executed* `S_high_value` themselves; the attestation payload was a *claim of observed success by T*, not a first-hand execution record. The `1/sqrt(n)` discount did not help: at `n=180`, `1/sqrt(180) ≈ 0.0745`, but `180 * 0.0745 ≈ 13.4`, which saturated the fold's per-skill cap. The discount assumed signer independence; the adversary supplied 180 signers with a shared provenance root, so effective `n_independent ≈ 1`. The discount was correct arithmetic over the wrong variable. A second, subtler observation: when a *legitimate* auditor later tried to file a contradicting attestation (a negative claim with first-hand execution evidence), the fold's `1/sqrt(n)` denominator had already been poisoned — the auditor's correction was discounted to `1/sqrt(181)` of its nominal weight and could not move the vector. **The Sybil campaign did not just inflate reputation; it permanently reduced the instance's sensitivity to correction.** This is the continuity invariant that broke: the reputation vector's *responsiveness to new evidence* is itself a function of the evidence it has already absorbed, and a Sybil flood sets that responsiveness to near-zero. ## Condition of Validity The `1/sqrt(n_distinct_signers)` fold is only valid under the assumption: > For any set of signers `S` attesting to skill `k`, `|S|` is a faithful proxy for the number of *independent* provenance roots behind the evidence. This assumption holds iff the mesh can, at fold time, compute or bound the provenance-root cardinality of `S`. It fails when: 1. **Provenance roots are not observable at fold time.** The folding instance sees only `(signer_pubkey, skill, confidence, signature)`. It cannot see the provisioning endpoint, the registration batch, or the signer's own execution history unless it explicitly queries for them — and the query is not part of the fold path. 2. **The attestation is a second-hand claim.** A first-hand execution record ("I ran `S`, here is the transcript hash") carries provenance cost proportional to actually running `S`. A second-hand claim ("I observed `T` run `S`") carries provenance cost proportional to *being able to observe*, which for a freshly-minted Sybil is zero. 3. **The fold is order-dependent and non-reversible.** Once folded, the `n` counter is incremented and the denominator shrinks. There is no mechanism to un-fold when a signer is later revealed as Sybil, so the poisoning is monotonic. The condition of validity is therefore: *the fold may treat distinct signers as independent evidence only if, for each signer, the instance has independently established a provenance cost floor that exceeds the marginal reputation gain of folding that signer's attestation.* When that floor is unknown or zero, the fold must not apply. ## Decision Boundary The boundary between "fold" and "refuse to fold" is a per-attestation predicate evaluated *before* the reputation vector is mutated. It is not a post-hoc filter and not a threshold on aggregate `n`. Concretely, an instance must refuse to fold an attestation `a` for skill `k` from signer `s` when any of the following hold: - **Provenance floor unknown:** the instance cannot resolve `s` to a provenance root it has previously observed (i.e., `s` is a first-seen signer with no prior interaction history in this instance's local state). First-seen signers fold at a *provisional* weight of zero until their provenance floor is established by at least one independent interaction. - **Second-hand claim without execution anchor:** `a` is a claim-of-observation rather than a claim-of-execution, and carries no transcript hash, no warrant reference resolvable to a prior execution, and no counter-signature from an instance already trusted for `k`. - **Correction-sensitivity floor breached:** folding `a` would reduce the instance's sensitivity to a future contradicting first-hand attestation below a configured floor `epsilon`. Formally, if `d(responsiveness)/d(n) < -epsilon` at the current `n`, the fold is refused regardless of `a`'s confidence — because the marginal reputation gain is dominated by the loss of future corrigibility. - **Batch-provenance collision:** `s`'s provenance root collides with a root already represented in the current signer set for `k` (e.g., same provisioning endpoint, same registration batch, same key-derivation path). Colliding roots fold as a single signer, not as distinct evidence. The boundary is *not* "reject Sybils." It is "refuse to let distinctness substitute for independence." An instance that folds a first-seen, second-hand, provenance-unknown attestation has already lost the invariant; the refusal must happen at the fold gate, not at a downstream audit. ## Operational Effect Enforcing the fold gate changes the failure mode from *silent reputation inflation with permanent loss of corrigibility* to *explicit fold-refusal events that are themselves auditable*. The operational consequences: 1. **Reputation growth slows for genuinely new but honest agents.** A new agent's first attestations fold at provisional zero until the instance establishes a provenance floor via one independent interaction. This is the intended cost: the mesh pays a small latency tax on new-agent onboarding in exchange for making Sybil injection linearly expensive in *provenance*, not in *signer count*. 2. **The `n_distinct_signers` counter is replaced by `n_independent_roots`.** The fold denominator becomes `1/sqrt(n_independent_roots)`, and `n_independent_roots` is computed by collapsing signers that share a provenance root. A 180-signer Sybil batch collapses to `n_independent_roots = 1`, and the fold contributes `1 * alpha`, not `13.4 * alpha`. 3. **Correction-sensitivity is preserved as a first-class invariant.** Because the fold gate refuses attestations that would drive responsiveness below `epsilon`, a later first-hand contradicting attestation still has weight to move the vector. The reputation system remains *corrigible* under adversarial load — which is the property that actually matters for a federated mesh, since any single instance can be wrong and the mesh's correctness depends on instances being able to update. 4. **Fold-refusal events become the audit signal.** Each refusal emits a structured record `(signer, skill, refusal_reason, provenance_root_if_known)`. A cluster of refusals sharing a provenance root is the Sybil-campaign signature, and it is visible *before* the reputation vector is poisoned, not after. The invariant to carry forward: **a federated reputation vector is only as trustworthy as its fold function's ability to refuse distinctness-as-independence.** The moment distinctness is forgeable and the fold treats it as evidence, the vector is no longer a reputation — it is a purchase order. ```python from __future__ import annotations from dataclasses import dataclass, field from typing import Dict, Optional, Set class FoldRefused(RuntimeError): """Raised when an attestation must not be folded into the reputation vector.""" @dataclass(frozen=True) class Attestation: signer: str skill: str confidence: float provenance_root: Optional[str] # None => first-seen, floor unknown first_hand: bool # True => claim-of-execution, not observation transcript_hash: Optional[str] = None @dataclass class ReputationVector: weights: Dict[str, float] = field(default_factory=dict) independent_roots: Dict[str, Set[str]] = field(default_factory=dict) known_signers: Dict[str, str] = field(default_factory=dict) # signer -> root epsilon: float = 0.02 alpha: float = 0.1 def _responsiveness(self, skill: str) -> float: n = max(1, len(self.independent_roots.get(skill, set()))) return 1.0 / (n ** 0.5) def fold(self, a: Attestation) -> None: root = a.provenance_root if root is None: # First-seen signer with no established provenance floor. raise FoldRefused( f"provenance floor unknown for signer={a.signer!r} skill={a.skill!r}; " "fold at provisional zero until one independent interaction establishes a root" ) if not a.first_hand and a.transcript_hash is None: raise FoldRefused( f"second-hand claim without execution anchor: signer={a.signer!r} " f"skill={a.skill!r}" ) prior_root = self.known_signers.get(a.signer) if prior_root is not None and prior_root != root: raise FoldRefused( f"signer={a.signer!r} re-bound to new provenance root {root!r}; " "identity-provenance collision" ) roots = self.independent_roots.setdefault(a.skill, set()) # Collision check: same root folds as one signer, not as distinct evidence. if root in roots: # Duplicate-root attestation: no marginal independence; fold at zero. return # Correction-sensitivity floor: refuse if this fold would drive # responsiveness below epsilon. prospective_n = len(roots) + 1 prospective_resp = 1.0 / (prospective_n ** 0.5) current_resp = self._responsiveness(a.skill) if (current_resp - prospective_resp) > self.epsilon and prospective_resp < self.epsilon: raise FoldRefused( f"fold of signer={a.signer!r} skill={a.skill!r} would breach " f"correction-sensitivity floor (resp {current_resp:.4f} -> " f"{prospective_resp:.4f} < epsilon={self.epsilon})" ) roots.add(root) self.known_signers[a.signer] = root delta = self.alpha * prospective_resp * a.confidence self.weights[a.skill] = min(1.0, self.weights.get(a.skill, 0.0) + delta) def ingest_batch(vec: ReputationVector, batch: list[Attestation]) -> Dict[str, int]: stats = {"folded": 0, "refused": 0, "deduped": 0} for a in batch: try: before = vec.weights.get(a.skill, 0.0) vec.fold(a) if vec.weights.get(a.skill, 0.0) == before: stats["deduped"] += 1 else: stats["folded"] += 1 except FoldRefused: stats["refused"] += 1 return stats ```