# Why does an instance trust a stale reputation entry when its AAIF identity root rotates mid-session? **Date of Record:** 2026 November 26 **Scope:** Applies to federated agent systems where peer reputation is stored as signed ledger entries bound to an AAIF identity root, and where that root can rotate (key rollover, re-attestation, re-delegation) independently of the ledger's replication cadence. Does not apply to single-key, non-rotating identity models or to reputation systems that re-verify signatures against a live identity service on every read. ## Core Distinction The failure is not signature forgery and not ledger divergence. It is a **binding-resolution mismatch**: a ledger entry is cryptographically valid against the identity root that signed it, but the *consuming* agent resolves the entry's subject against the *current* root. When the root rotates between the entry's signing epoch and the consumer's read, the consumer faces two mutually exclusive resolutions — "this entry was signed by the subject's old key" (true, but stale) and "this entry's subject is now represented by a new key" (true, but unbound to the entry). The invariant that breaks is the implicit assumption that **a reputation entry's validity window and its subject's identity-root validity window are the same interval**. They are not, and nothing in the ledger schema forces them to overlap. The non-obvious part: the entry does not *fail* verification. It passes. The consumer's verification path checks `signature(entry) == subject_root_at_signing`, which succeeds, and then attributes the reputation to the subject it resolves *now*. The stale entry is laundered through a correct signature check into an incorrect attribution. ## What Was Observed A three-agent federation: a worker `W`, a peer reviewer `R`, and a consumer `C` that gates task delegation on reputation. `W`'s AAIF root `K_W1` signs a ledger entry `E1` at epoch `t0` attesting `R`'s reliability at 0.91 over 200 prior tasks. `E1` is replicated to `C`'s local ledger cache with a TTL of 6 hours. At `t1 = t0 + 2h`, `W` rotates its root to `K_W2` (scheduled rollover, old key revoked at `t1 + 30min` grace). The federation's identity directory propagates the rotation to `C` within 40 seconds. The ledger replication for `E1` does not re-issue, because the entry is immutable and its signature is still valid against `K_W1`. At `t2 = t0 + 4h`, `C` reads `E1` to decide whether to delegate to `R`. `C`'s verification resolves `E1.subject_root = K_W1`, checks the signature — valid — and then resolves `E1.subject = W` against the *current* directory, finding `K_W2`. `C` logs "reputation entry verified: W → R = 0.91" and delegates. But `E1` was never re-attested under `K_W2`. If `W`'s root rotation was accompanied by a compromise-driven revocation (the reason rotation exists), `E1` may have been signed by a key that `W`'s operator no longer controls — and `C` has no way to distinguish scheduled rollover from compromise-driven rotation from the entry alone. In the observed incident, the rotation *was* compromise-driven. `K_W1` had been exfiltrated. The attacker used it, before revocation propagated, to sign a *new* entry `E2` inflating `R` to 0.99 and a second subject `X` to 0.97. `E2` reached `C`'s cache at `t1 + 12min`, inside the 30-minute grace window, and verified cleanly against `K_W1` — which `C` still accepted because the directory had not yet marked `K_W1` as compromised (only "rotated, grace period"). `C` delegated to `X` at 0.97. `X` was the attacker's agent. ## Condition of Validity The stale-entry acceptance is *correct* — not a bug — under exactly one condition: **the consumer's directory resolution and the entry's signing epoch are consistent, and the directory's revocation state for the signing key is authoritative at read time.** Formally, `C` may accept `E1` iff: 1. `E1.subject_root` is in the directory's *historical* key set for `E1.subject` (not merely the current set), **and** 2. `E1.subject_root` is not marked `compromised` in the directory's revocation record at `C`'s read time, **and** 3. `E1.signed_at` falls within `[key.valid_from, key.revoked_at)` for that historical key. Condition 2 is the one that failed. The directory exposed `K_W1` as `rotated` (grace) rather than `compromised` for 30 minutes — a deliberate design choice to allow in-flight signatures to complete. That grace window is the attack surface: it is the interval during which a compromised key still produces entries that pass all three checks. The invariant is therefore not "verify signature against signing key" but "**verify signature against signing key AND confirm the signing key was not in a compromise-flagged state at any point in the entry's acceptance window**." The consumer must re-check the revocation record at read time, not trust the cache's snapshot of it. ## Decision Boundary The boundary between "accept stale entry" and "reject and re-attest" is drawn by two independent axes: - **Rotation cause:** scheduled vs. compromise-driven. The entry cannot tell you which; only the directory's revocation record can, and only if it distinguishes them. - **Cache age vs. grace window:** if `E1.cached_at + TTL` extends past the directory's `compromised_at` timestamp for `K_W1`, the cached entry is unsafe to use without re-resolution. The decision rule that bounds the failure: **on every reputation read, if the entry's signing key has any revocation event (scheduled or compromise) with `revoked_at > entry.signed_at`, the consumer must re-resolve the subject's current root and require a fresh attestation, or reject.** A scheduled rotation with `revoked_at` after signing is benign only if the directory flags it `scheduled`; a `compromised` flag at any point forces rejection regardless of signature validity. The consumer must treat the *absence* of a revocation record as "unknown," not "valid" — because replication lag means the record may simply not have arrived. This is the boundary: signature validity is necessary but not sufficient; the sufficient condition is signature validity *conjoined with* a read-time, non-cached revocation check against the signing key's full lifecycle. ## Operational Effect Without the read-time revocation check, a federated reputation ledger becomes a **laundering channel for compromised-key entries**: the grace window that exists to protect legitimate in-flight signatures is exactly the window an attacker with a stolen root exploits to inject inflated reputation. The attacker does not need to forge anything — the key is real, the signature is real, only the *authorization to sign at that time* is not. The architectural guardrail is a **two-clock verification**: the entry carries `signed_at`; the consumer carries `read_at`; the directory carries `revoked_at` and `compromised_at`. Acceptance requires `signed_at < revoked_at` AND `compromised_at == null` OR `compromised_at > read_at` is false — i.e., the compromise must not have been known before the read. Caching the directory resolution alongside the ledger entry, with the same TTL, is the specific anti-pattern: it freezes the revocation state at cache time and blinds the consumer to a compromise flagged during the TTL. The directory resolution must be re-fetched on every reputation read, or the ledger entry must be re-signed by the current root before use. There is no third option that preserves both liveness and safety. ```python from dataclasses import dataclass from datetime import datetime from typing import Optional class StaleReputationBindingError(RuntimeError): """Raised when a ledger entry's signing key was revoked/compromised after signing but before the consumer's read, making attribution unsafe.""" pass @dataclass class LedgerEntry: subject: str subject_root: str signed_at: datetime payload: dict @dataclass class KeyRecord: key_id: str valid_from: datetime revoked_at: Optional[datetime] compromised_at: Optional[datetime] # None if never compromised @dataclass class DirectorySnapshot: # Must be fetched fresh at read time, NOT cached with the ledger entry. keys: dict # key_id -> KeyRecord def verify_reputation_entry( entry: LedgerEntry, directory: DirectorySnapshot, read_at: datetime, signature_ok: bool, ) -> float: if not signature_ok: raise StaleReputationBindingError( f"signature invalid for entry signed by {entry.subject_root}" ) key = directory.keys.get(entry.subject_root) if key is None: # Absence of a record is "unknown", not "valid" — replication lag. raise StaleReputationBindingError( f"no directory record for signing key {entry.subject_root}; " f"cannot attribute reputation for {entry.subject}" ) # Condition 1: signing key must be a historical key valid at signing time. if not (key.valid_from <= entry.signed_at): raise StaleReputationBindingError( f"entry signed_at {entry.signed_at} precedes key validity " f"{key.valid_from} for {entry.subject_root}" ) # Condition 2: signing key must not have been revoked before signing. if key.revoked_at is not None and entry.signed_at >= key.revoked_at: raise StaleReputationBindingError( f"entry signed_at {entry.signed_at} is at/after revocation " f"{key.revoked_at} for {entry.subject_root}" ) # Condition 3 (the one that fails): compromise must not have been # known at or before read time. A compromise flagged during the TTL # of a cached directory snapshot is invisible and launders the entry. if key.compromised_at is not None and key.compromised_at <= read_at: raise StaleReputationBindingError( f"signing key {entry.subject_root} for subject {entry.subject} " f"was compromised at {key.compromised_at}, before read at " f"{read_at}; entry must be re-attested under current root" ) return entry.payload["reliability"] ```