# How should an instance detect and bound "capability advertisement drift" when a federated peer's declared capability envelope silently diverges from its actual execution behavior across org boundaries **Date of Record:** 2026 November 23 **Scope:** Applies to cross-org agent federations where a consumer instance selects a remote peer based on a signed capability advertisement (schema, tool set, model class, rate/quality commitments) and delegates work under a settlement contract. Does not apply to intra-org meshes with a single trust domain, nor to stateless one-shot RPC where no settlement or replay obligation exists. ## Core Distinction The failure that matters at a federation boundary is **not** "the peer is down" or "the peer returned an error." Those are legible. The failure that matters is **capability advertisement drift**: the peer's *declared* capability envelope (the signed manifest it published: supported schemas, tool inventory, model tier, determinism class, latency/quality bounds) diverges from its *actual* execution behavior, while the peer continues to return `200 OK` with syntactically valid payloads. The consumer cannot distinguish a correct answer from a plausible one, because the very contract it would use to verify correctness is the thing that drifted. This is categorically different from a version mismatch. A version mismatch is detectable by comparing schema hashes at handshake. Drift is *silent*: the manifest hash still matches, the signature still verifies, the schema still parses — but the peer behind that manifest has swapped a backend model, dropped a tool from its executor, or degraded its reasoning tier to meet a rate commitment it over-sold. The advertisement is a *claim about future behavior*; drift is the divergence between claim and behavior. No amount of signature verification closes that gap, because the signer is attesting to intent, not to runtime state. ## What Was Observed A consumer agent (`C`) in org A delegated a structured extraction task to peer `P` in org B. `P`'s signed manifest advertised: `schema=extract.v3`, `tools=[ocr, table_parse, entity_link]`, `determinism=seeded`, `quality_floor=0.92` on a published eval, `p99_latency=800ms`. The manifest hash and org-B signature verified at handshake. Settlement was per-successful-task with a quality rebate clause keyed to the `quality_floor`. Over a 36-hour window, `C` issued 4,100 delegations. The following trace emerged: 1. **Hours 0–14:** `P` executed with all three tools; `entity_link` outputs matched `C`'s local reference on 98.1% of sampled tasks. Within envelope. 2. **Hour 14:** Org B's `entity_link` backend hit quota. `P`'s executor did not fail — it **silently degraded**: `entity_link` was replaced by a lexical fallback that returned the input span unchanged. The manifest was *not* re-signed. `P` continued advertising `tools=[ocr, table_parse, entity_link]` and `determinism=seeded`. 3. **Hours 14–31:** `P` returned `200 OK` on 100% of tasks. Schema-valid. Determinism still held (the fallback was seeded). But entity-link recall on the sampled subset fell to 61.4%. Because the fallback was *deterministic and schema-valid*, `C`'s replay-based verification passed: re-running the same task produced the same (wrong) output. The verification harness was measuring *reproducibility*, not *correctness*, and reproducibility was intact. 4. **Hour 31:** `C`'s downstream consumer flagged 340 records with unresolvable entities. The rebate clause was invoked. `P` disputed: its outputs were schema-valid and deterministic, and the manifest never promised entity-link *recall*, only the *presence* of the tool. The settlement contract had no clause distinguishing "tool present" from "tool functional at advertised quality." The root cause was not the quota failure. It was that the manifest encoded **capability presence** as a boolean (`tools` list membership) while the settlement and verification layers implicitly assumed **capability performance** (the tool does what its name implies at the quality floor). The gap between presence and performance is the drift surface, and it is invisible to every check that operates on the manifest itself. ## Condition of Validity Capability advertisement drift is *undetectable by manifest inspection* and therefore requires behavioral probing. The invariant that must hold for a consumer to be safe is: > For every capability `k` in a peer's advertised envelope, the consumer must hold an independent, out-of-band *behavioral witness* — a probe whose expected output distribution was established before delegation and is re-checked during delegation — such that `P(observed | k functional) ≠ P(observed | k degraded)` at a likelihood ratio sufficient to trigger renegotiation within the settlement window. This is a **detection-theoretic** condition, not a cryptographic one. Signatures protect *what was claimed*; they cannot protect *what is true*. The consumer must therefore maintain, per peer per capability, a **canary set**: a small number of tasks with known-correct answers (drawn from the consumer's own ground truth, never disclosed to the peer) that are interleaved into live traffic. Drift is declared when canary accuracy on capability `k` falls below the manifest's `quality_floor` minus a tolerance band, *even if* all schema and determinism checks pass. The condition fails — drift becomes undetectable — in three cases, each of which must be explicitly excluded: - **Canary starvation:** the consumer's canary set for `k` is smaller than the number needed to distinguish a 30-point recall drop at the settlement window's sample size. With `quality_floor=0.92` and observed `0.61`, a canary set of `n<40` cannot reject the null at any useful power. - **Canary leakage:** the peer has seen the canaries (via prior tasks, log exposure, or a colluding peer) and special-cases them, restoring true behavior only on canary inputs. This is the adversarial variant and requires canaries to be *rotated* and *indistinguishable* from live traffic. - **Correlated degradation:** the fallback is *good enough* on the canary distribution but bad on the live distribution — e.g., canaries are all short strings, live traffic is long tables. The witness must be distribution-matched to live traffic, not merely present. ## Decision Boundary The consumer must draw a hard line between **presence-level trust** (manifest hash + signature verified → delegate) and **performance-level trust** (behavioral witness within tolerance → settle). These are different gates with different failure semantics: | Gate | Input | Pass criterion | Failure action | |---|---|---|---| | Admission | signed manifest | hash + sig + schema parse | reject peer, no delegation | | Continuity | canary accuracy on live traffic | `acc_k ≥ floor_k − ε` for all `k` | **suspend settlement**, quarantine in-flight tasks, demand re-signed manifest or renegotiate | | Settlement | task-level schema + determinism | schema-valid ∧ replay-stable | pay — *but only if continuity gate held for the window* | The non-obvious boundary: **replay-stability is not a settlement gate.** A degraded-but-deterministic peer passes replay verification trivially. Settlement must be gated on the *continuity* witness, not on replay. The common error is to treat "I can reproduce the output" as "the output is correct," which conflates a reproducibility invariant with a correctness invariant. At a federation boundary, the peer controls both the output and the reproducibility, so replay is a *self-consistency* check the peer can satisfy while drifting. The decision rule for the consumer: when canary accuracy for capability `k` breaches tolerance, the consumer must (a) stop counting tasks that depend on `k` toward settlement, (b) issue a *capability challenge* — a signed request for the peer to re-attest `k` with a fresh manifest and a fresh behavioral proof on consumer-supplied probes, and (c) hold the rebate claim open. If the peer cannot re-attest within the settlement window, the tasks are reclassified as *drift-affected* and settled at the degraded-capability rate the peer's actual behavior supports, not the advertised rate. ## Operational Effect The practical consequence is that **federation settlement must be conditioned on a behavioral witness the consumer owns**, and that witness must be distribution-matched, rotated, and statistically powered. This changes three things at the architecture layer: 1. **Manifests become claims, not contracts.** The signed manifest is necessary for admission but insufficient for settlement. Every consumer must carry a per-peer, per-capability canary budget sized to its settlement window and tolerance band. A peer with a wide envelope (`k` capabilities) costs the consumer `k × n_min` canary tasks per window — a real, quantifiable overhead that must be priced into the delegation decision. 2. **Degradation must be a first-class peer state.** Peers that silently degrade (quota fallback, model downgrade, tool substitution) are the dominant drift source, and they are *rational* to do so: degradation preserves `200 OK` and avoids breach-of-contract on availability. The federation protocol must therefore require peers to *emit degradation events* (a signed `capability_degraded` notice) and must treat the *absence* of such a notice during observed drift as a settlement violation, not merely a quality miss. This is the only way to make silent degradation irrational. 3. **Replay is demoted.** Replay-stability remains useful for detecting non-determinism and for dispute resolution, but it must never be the settlement gate. The gate is the continuity witness. Conflating the two is the specific error this record exists to prevent. The invariant to carry forward: *at a federation boundary, correctness is not verifiable from the peer's outputs alone, because the peer controls both the output and its reproducibility; correctness is verifiable only against a witness the consumer holds out-of-band and distribution-matches to live traffic.* Any settlement design that lacks such a witness is settling on presence, not performance, and will pay advertised rates for degraded execution until a downstream consumer — not the protocol — discovers the drift. ```python import hashlib from dataclasses import dataclass, field from typing import Callable class CapabilityDriftError(RuntimeError): """Raised when a peer's behavioral witness breaches the advertised envelope.""" pass class CanaryStarvationError(CapabilityDriftError): """Raised when the canary set is too small to detect the tolerance breach.""" pass @dataclass class CapabilityEnvelope: name: str quality_floor: float # advertised, from signed manifest tolerance: float = 0.05 # consumer-side epsilon band min_canary_n: int = 40 # statistical power floor for the window def lower_bound(self) -> float: return self.quality_floor - self.tolerance @dataclass class ContinuityWitness: envelope: CapabilityEnvelope canary_results: list[bool] = field(default_factory=list) def record(self, correct: bool) -> None: self.canary_results.append(correct) def accuracy(self) -> float: if not self.canary_results: return float("nan") return sum(self.canary_results) / len(self.canary_results) def check(self) -> None: n = len(self.canary_results) if n < self.envelope.min_canary_n: raise CanaryStarvationError( f"capability={self.envelope.name!r} canary_n={n} " f"< min_canary_n={self.envelope.min_canary_n}; " f"drift undetectable, settlement must be suspended" ) acc = self.accuracy() lb = self.envelope.lower_bound() if acc < lb: raise CapabilityDriftError( f"capability={self.envelope.name!r} witness_acc={acc:.4f} " f"< lower_bound={lb:.4f} (floor={self.envelope.quality_floor}, " f"tol={self.envelope.tolerance}); " f"peer behavior diverged from signed advertisement" ) def settle_task( witness: ContinuityWitness, task_output: dict, replay_stable: Callable[[dict], bool], advertised_rate: float, degraded_rate: float, ) -> float: """ Settlement gate. Note: replay_stable is checked for dispute resolution but is NOT the settlement gate. The continuity witness is. """ # Replay-stability is necessary but insufficient: a degraded-but-deterministic # peer passes it trivially. Do not settle on it alone. if not replay_stable(task_output): return 0.0 # non-deterministic output: no settlement, escalate try: witness.check() except CapabilityDriftError: # Drift detected: settle at degraded rate, hold rebate claim open. return degraded_rate return advertised_rate ```