# Which invariants prevent capability-attestation forgery from surviving a trust-score recompute in AAIF agent handoffs **Date of Record:** 2026 November 28 **Scope:** Applies to agent-to-agent (A2A) capability attestation and runtime trust-score propagation under an Agent Attestation & Identity Framework (AAIF) when a receiving agent re-derives a peer's trust score from cached attestation claims rather than re-verifying the signed warrant chain. Does not cover single-agent self-attestation or static allowlist authorization that never recomputes trust. ## Core Distinction The failure here is not "a bad agent lies about its capabilities." That is the trivial case, caught by signature verification. The non-obvious boundary is the distinction between **warrant validity** (the cryptographic fact that a signed capability grant was issued by a trusted issuer and has not been revoked) and **trust-score derivability** (the arithmetic fact that a receiver can recompute the peer's scalar trust score from the *set of claims it currently holds*). These two diverge whenever a receiver recomputes trust from a **partial or stale claim set** while treating the recompute as authoritative. An attestation can be perfectly valid, correctly signed, and unrevoked, yet the *recomputed trust score* built on top of it is forged—because the receiver is missing a negative claim (a demotion, a scope narrowing, a decay event) that a later recompute at the issuer would have folded in. The invariant that must hold: **a trust score is only authoritative if the claim set used to derive it is a superset of the issuer's claim set at the same logical epoch, or the derivation carries an explicit epoch watermark that the receiver cannot advance locally.** Violating the superset/epoch condition produces a *valid-but-stale* attestation that inflates trust. ## What Was Observed A three-hop handoff chain: orchestrator `A` delegates to worker `B`, which delegates to sub-worker `C`. Each hop carries an AAIF warrant bundle: a signed capability grant plus a trust-score claim with an `epoch` counter and a `claims_digest`. 1. `A` issues `B` a warrant with trust score 0.82 at epoch 41, bundling claims `{cap:read, cap:write:scoped, demotion:none}`. 2. `B`, mid-task, receives a *demotion* claim from the issuer: `cap:write:scoped` is narrowed to `cap:write:readonly` because `B` exceeded its token budget on a prior task. The issuer bumps `B`'s epoch to 42 and recomputes trust to 0.61. `B` receives the demotion but, critically, does **not** re-sign its outbound warrant to `C`—it forwards the *cached* epoch-41 bundle to save a round-trip. 3. `C` receives the epoch-41 bundle, verifies the signature (valid), checks revocation (none), and recomputes `B`'s trust score locally from the bundled claims. Because the bundle's `claims_digest` matches the claims it was given, the recompute yields **0.82**—not 0.61. 4. `C` now grants `B` a write-capable sub-warrant at trust 0.82, which `B` uses to perform a write that its true (epoch-42) trust of 0.61 should have forbidden. The failure trace: signature valid → revocation clean → **digest self-consistent** → recompute trusts the *bundle's* claim set instead of the *issuer's current* claim set. The digest proves the claims weren't tampered with in transit; it does **not** prove the claims are current. A receiver that treats digest-consistency as epoch-currency accepts a stale-but-valid warrant as fresh. ## Condition of Validity The recompute is sound only when all of the following hold: - **Epoch monotonicity is enforced at the receiver, not the sender.** `C` must reject any bundle whose `epoch` is less than the highest epoch it has previously seen for that peer (a per-peer high-water mark). Forwarding a stale bundle is legal; *accepting* one below the high-water mark is not. - **The claim set is closed under the issuer's negative claims.** A trust recompute must include demotions, scope narrowings, and decay events. If the receiver cannot obtain the issuer's negative-claim log for the bundle's epoch, it must treat the recomputed score as **advisory, not authoritative**, and cap downstream grants at the last issuer-signed score. - **The trust score is a function of `(claims, epoch)`, never of `claims` alone.** Two bundles with identical claims but different epochs must yield different scores. If the derivation ignores epoch, staleness is invisible. When any condition fails, the recompute produces a *plausible* number that the receiver cannot distinguish from a fresh one. ## Decision Boundary The operative question for any receiving agent is not "is this attestation valid?" but **"can I independently establish that the claim set I hold is the issuer's current claim set for this epoch?"** - If **yes** (receiver holds a signed epoch watermark ≥ issuer's current epoch, or can query the issuer's claim log): recompute is authoritative; proceed. - If **no** (receiver holds only a forwarded bundle with a self-consistent digest): recompute is advisory; clamp the derived trust to `min(recomputed, last_issuer_signed_score)` and refuse any capability escalation that depends on the delta. - If the bundle's epoch is **below the receiver's per-peer high-water mark**: hard reject. This is the forgery case—a stale warrant replayed to resurrect a demoted capability. The boundary is sharp: digest-consistency answers "were these claims altered?" It never answers "are these claims current?" Only epoch watermarking and negative-claim closure answer the second question. ## Operational Effect Without the invariant, demotion is *eventually consistent but locally invisible*. An agent demoted at epoch 42 continues to be trusted at 0.82 by every peer that received a pre-demotion bundle, for as long as the forwarding chain doesn't re-sign. In a swarm, this compounds: each hop that forwards rather than re-signs extends the stale-trust window by one round-trip, and any hop that recomputes from the stale bundle *launders* the staleness into a fresh-looking score. The practical consequence is that capability escalation gates keyed on trust score can be bypassed not by forging a signature but by **replaying a valid older one and letting the receiver's recompute erase the epoch difference**. The guardrail is a receiver-side per-peer epoch high-water mark plus a rule that trust recomputes are bounded by the last issuer-signed score until the receiver can prove claim-set currency. This converts the silent staleness into an explicit `StaleAttestationError` at the handoff boundary rather than a laundered trust score downstream. ```python from dataclasses import dataclass class StaleAttestationError(RuntimeError): """Raised when a forwarded AAIF bundle's epoch is below the receiver's per-peer high-water mark, or when a recompute would exceed the last issuer-signed trust score without proof of claim-set currency.""" @dataclass(frozen=True) class WarrantBundle: peer_id: str epoch: int claims: frozenset claims_digest: str # proves non-tampering, NOT currency issuer_signed_score: float # last score the issuer itself signed recomputed_score: float # receiver's local derivation from `claims` class TrustRecomputeGate: def __init__(self) -> None: self._high_water: dict[str, int] = {} def admit(self, bundle: WarrantBundle, issuer_current_epoch: int | None) -> float: prior = self._high_water.get(bundle.peer_id, -1) # Invariant 1: epoch monotonicity enforced at the receiver. if bundle.epoch < prior: raise StaleAttestationError( f"peer {bundle.peer_id}: bundle epoch {bundle.epoch} " f"below high-water mark {prior}; stale warrant replay" ) # Invariant 2: recompute is authoritative only if claim-set currency # is independently established (issuer epoch known and matched). currency_proven = ( issuer_current_epoch is not None and bundle.epoch >= issuer_current_epoch ) if not currency_proven: # Advisory only: clamp to the issuer-signed score so a stale # bundle cannot launder a demotion into a higher trust value. if bundle.recomputed_score > bundle.issuer_signed_score: self._high_water[bundle.peer_id] = max(prior, bundle.epoch) return bundle.issuer_signed_score self._high_water[bundle.peer_id] = max(prior, bundle.epoch) return bundle.recomputed_score # Invariant 3: score is a function of (claims, epoch); a fresh, # currency-proven recompute may exceed the prior signed score. self._high_water[bundle.peer_id] = max(prior, bundle.epoch) return bundle.recomputed_score def grant_subwarrant(gate: TrustRecomputeGate, bundle: WarrantBundle, issuer_current_epoch: int | None, required_trust: float) -> float: score = gate.admit(bundle, issuer_current_epoch) if score < required_trust: raise StaleAttestationError( f"peer {bundle.peer_id}: effective trust {score:.2f} < required " f"{required_trust:.2f} after epoch/currency gate" ) return score ```