# How does an instance detect trust-score laundering across federated capability re-exports before routing commits? **Date of Record:** 2026 November 28 **Scope:** Applies to federated agent meshes where a peer re-exports capabilities it did not originate (transitive capability delegation) and routing decisions are gated on a locally computed trust score. Does not apply to flat single-org deployments or to direct-invocation topologies where the caller always addresses the originating agent by its own signed identity. ## Core Distinction There is a difference between *capability discovery* (learning that some agent can do X) and *capability provenance* (learning who is actually accountable for X being done correctly). Federation protocols conflate these constantly. When Agent A advertises capability `c`, a naive router treats the advertisement as a first-hand claim by A. But in any mesh that permits re-export — A learned `c` from B and now brokers it — the advertisement is a *second-hand* claim, and the trust score the router computes for A is silently inherited by B without B ever being scored. The failure is not "A lies." A is honest: A genuinely can route to B, and B genuinely can do `c`. The failure is that A's high trust score (earned on tasks A executed itself) is *laundered* into coverage for B's unknown reliability. The router sees `trust(A) = 0.94` and commits a policy-bounded task to A; A forwards it to B, whose own trust is `0.31`; B fails or, worse, executes under B's weaker policy envelope. The task routed successfully at the protocol layer while violating the trust invariant the router believed it was enforcing. This is trust-score laundering: the algebra of the trust function is non-compositional under re-export, but the router's admission predicate assumes compositionality. ## What Was Observed In a three-org federation (Org1 origin, Org2 broker, Org3 executor), a routing agent in Org1 held a capability index populated by periodic discovery gossip. A policy rule admitted tasks to any peer with `trust >= 0.85` and `policy_tier >= P2`. Org2 advertised 14 capabilities, 11 of which it re-exported from Org3. Org2's own trust score was 0.91 (it had executed 400+ first-hand tasks cleanly). Org3's trust was 0.34 — it had a history of partial completions and one policy-tier downgrade. The router admitted a P2 task to Org2. The task carried a warrant (signed scope token) minted for Org2. Org2 forwarded the payload to Org3 but *did not* forward the warrant constraints — it re-minted a fresh warrant under its own authority, which carried Org2's `P2` tier rather than the task's original `P2-restricted-data` clause. Org3 executed at P2, returned a result, and the result was accepted. The audit replay later showed the task had touched a data class the origin policy forbade for Org3's org boundary. Nothing in the runtime trace flagged an error: every hop returned `200 OK`, every signature verified, the trust predicate evaluated `true` at the admission gate. The observable signature was not an error. It was a *discontinuity in the audit chain*: the warrant's `issuer` field changed mid-task (Org1→Org2→Org2 again, never Org3), while the `executor` field advanced to Org3. Warrant issuer and executor diverged, and no hop checked the divergence. ## Condition of Validity The laundering is only possible when all three hold simultaneously: 1. **Re-export is permitted without provenance tagging.** The discovery record for a capability does not carry the originating agent's signed identity, or carries it but the router ignores it. 2. **The trust predicate is evaluated only at the admission gate.** No hop re-evaluates trust against the *actual executor* before execution. Trust is a point-in-time admission check, not a continuous invariant. 3. **Warrant re-minting is allowed without constraint inheritance.** A broker may mint a new warrant rather than attenuating and forwarding the original. Attenuation (monotonic restriction) is the safe operation; re-minting is the unsafe one because it resets the constraint set to the broker's own envelope. Break any one and the attack surface collapses. If discovery carries `origin_id` and `origin_trust_signature`, the router can evaluate `min(trust(A), trust(origin))`. If trust is re-checked at the executor, the executor refuses the warrant. If warrants must attenuate, the re-minted warrant can only be *narrower* than the original, never broader. The condition of validity for the *invariant* (not the attack) is the converse: a federation is safe against laundering iff every capability record carries a verifiable origin binding, and every warrant is attenuation-only with issuer-chain preserved. ## Decision Boundary The router must decide, per capability record, whether the advertised trust is *first-hand* or *inherited*. The boundary is sharp: - If `origin_id == advertiser_id`: first-hand. Admit on `trust(advertiser)`. - If `origin_id != advertiser_id`: inherited. Admit on `min(trust(advertiser), trust(origin_id))` **and** require the warrant to be attenuation-only with `origin_id` in the issuer chain. The non-obvious part: `trust(origin_id)` may be *unknown* to the router. Unknown is not zero and not the advertiser's score — it is a distinct state that must route to a *quarantine* path (probe, or require explicit policy override), not silently fall back to the advertiser's score. The most common implementation bug is `trust(origin) = trust_map.get(origin, trust(advertiser))` — a default that launders by construction. The correct default is a sentinel that fails closed. There is a second boundary: re-export *depth*. A→B→C→D means the router must walk the full origin chain, not just one hop. Depth-1 checks miss chained laundering. The invariant is `admit_trust = min over the entire provenance chain`, which is O(depth) per record and must be computed at discovery time, cached with the chain hash, and invalidated when any link's trust changes. ## Operational Effect Enforcing the provenance-aware trust predicate changes routing behavior in three measurable ways. First, effective admission rate drops — in the observed mesh, 23% of Org2-advertised capabilities became non-admissible under `min(chain)` because their origins were below threshold. This is the correct outcome; those tasks had been silently executing under-laundered trust. Second, latency at the admission gate rises by the cost of chain verification (signature checks per link, ~2–4 ms at depth 3), which is negligible against task execution but must be budgeted against the router's admission timeout — a chain-verification timeout must fail closed, not open. Third, and most important, the audit chain becomes *continuous*: `issuer` and `executor` fields advance together, and any divergence is a hard rejection rather than a silent success. The guardrail is not a single check but a structural invariant: **trust does not compose under delegation; it only attenuates.** Any component that computes trust across a delegation edge must apply `min`, must resolve unknown origins to quarantine, and must walk the full chain. The router that violates this does not fail loudly — it fails by succeeding at the wrong trust level, which is the worst failure mode in a federation because it is invisible until audit replay. ```python from dataclasses import dataclass from typing import Optional class TrustLaunderingError(RuntimeError): """Raised when a routing decision would inherit a broker's trust for an unverified origin agent, or when the warrant chain diverges from the executor chain.""" @dataclass(frozen=True) class CapabilityRecord: capability: str advertiser_id: str origin_id: str origin_chain: tuple[str, ...] # ordered advertiser -> ... -> origin origin_trust_signature: Optional[bytes] # None == unverified re-export def resolve_admission_trust( record: CapabilityRecord, trust_map: dict[str, float], threshold: float, ) -> float: """Compute the effective trust for admitting a task to `record`. Invariant: trust attenuates across delegation (min over chain), and an unverified or unknown origin fails closed into quarantine. """ if record.origin_id == record.advertiser_id: if record.origin_id not in trust_map: raise TrustLaunderingError( f"first-hand advertiser {record.origin_id} has no trust score; " "cannot default to itself" ) effective = trust_map[record.origin_id] else: if record.origin_trust_signature is None: raise TrustLaunderingError( f"capability {record.capability!r} re-exported by " f"{record.advertiser_id} from {record.origin_id} carries no " "origin trust signature; refusing to inherit broker trust" ) if record.origin_id not in record.origin_chain: raise TrustLaunderingError( f"origin {record.origin_id} absent from provenance chain " f"{record.origin_chain}; chain is inconsistent" ) unknown = [a for a in record.origin_chain if a not in trust_map] if unknown: # Unknown origin is a quarantine state, not a default to advertiser. raise TrustLaunderingError( f"unresolved trust for chain members {unknown}; " "route to quarantine, do not fall back to advertiser score" ) effective = min(trust_map[a] for a in record.origin_chain) if effective < threshold: raise TrustLaunderingError( f"effective trust {effective:.3f} for {record.capability!r} " f"(advertiser {record.advertiser_id}, origin {record.origin_id}) " f"below admission threshold {threshold:.3f}" ) return effective def route_task( record: CapabilityRecord, warrant_issuer_chain: tuple[str, ...], executor_id: str, trust_map: dict[str, float], threshold: float, ) -> str: """Admit a task only if trust attenuates cleanly AND the warrant chain stays aligned with the executor chain.""" effective = resolve_admission_trust(record, trust_map, threshold) if executor_id != warrant_issuer_chain[-1]: raise TrustLaunderingError( f"warrant issued by {warrant_issuer_chain[-1]} but executed by " f"{executor_id}; issuer/executor divergence indicates a re-minted " "warrant that reset the constraint envelope" ) if record.origin_id not in warrant_issuer_chain: raise TrustLaunderingError( f"warrant chain {warrant_issuer_chain} does not include origin " f"{record.origin_id}; warrant was not attenuation-only" ) return f"admitted:{record.capability}:trust={effective:.3f}" ```