What happens when an instance's revocation epoch advances mid-handoff across AAIF registries

**Date of Record:** 2026 December 1 **Scope:** Applies to federated agent-to-agent handoffs where the receiving agent validates the sender's identity against a cached AAIF (Agent Authority & Identity Federation) registry snapshot, and where that registry publishes revocation via monotonically increasing epochs plus a decaying trust score. Does not apply to single-registry deployments with synchronous revocation checks on every call, nor to stateless request/response tool invocations that carry no delegated warrant.

Core Distinction

The failure is not "the agent was revoked." It is that **revocation epoch and trust-score decay are two different clocks that the receiving agent observes out of order.** An AAIF registry publishes (a) a revocation epoch `E_r` — a monotonic counter that, when incremented, invalidates all warrants issued under lower epochs — and (b) a continuous trust score `τ(t)` that decays with wall-clock time since last attestation. A handoff carries a signed warrant stamped with `(issuer_id, epoch_at_issue, τ_at_issue)`. The receiving agent's guard is almost always written as a single boolean: *is this warrant still valid?* But validity is conjunctive over two clocks that advance independently, and the receiver typically only re-checks one of them at handoff time.

The non-obvious boundary: **a warrant can be within its trust-score tolerance while being epoch-stale, and the epoch check is the one that gets skipped** because it lives in a registry the receiver polls lazily, while `τ` is embedded in the warrant and thus "free" to check. The result is a receiver that confidently accepts authority that has already been revoked, and reports a healthy trust score while doing it.

What Was Observed

A three-hop pipeline: agent `A` (orchestrator, registry `R1`) delegates to `B` (worker, registry `R2`), which hands off a subtask to `C` (auditor, registry `R1`). Warrant chain: `A→B` issued under `R1@E=41`, `B→C` re-delegated under `R2@E=17`. Each registry replicates the other's revocation epochs with eventual consistency (observed lag: 800ms–6s under load).

At `t0`, `R1` revokes `A`'s credential — epoch advances `41→42`. This is a compromise revocation: `A`'s signing key leaked. `R2` has not yet replicated the epoch bump when `B` executes its handoff to `C` at `t0+2.1s`.

Trace:

  1. `B` assembles the `B→C` warrant, embedding `A`'s upstream warrant as a delegation parent, stamped `parent_epoch=41`.
  2. `B` checks `τ_A(t0+2.1s)`. `A`'s last attestation was 40 minutes prior; decay is 0.02/min, so `τ_A ≈ 0.92` — above the 0.85 acceptance floor. **Passes.**
  3. `B` does not query `R1` for `E_r` at handoff time; it relies on its cached `R2` view, which still shows `R1@E=41`. The parent epoch `41` matches the cached epoch `41`. **Passes.**
  4. `C` receives the warrant, validates the chain against `R1` (its own registry), sees `E_r=42`, and rejects — but only *after* `B` has already committed side effects (a file write and a downstream payment authorization) under the assumption the handoff succeeded.
  5. `B` never learns of the rejection because the handoff is fire-and-forget over A2A with an async ack that `B`'s execution loop abandoned at token-budget exhaustion.

Net effect: **revoked authority executed two side effects, and the only component that knew about the revocation (`C`) had no channel to stop them.** The trust score never dropped below floor because decay is time-based, not event-based — revocation does not zero `τ`, it only gates issuance of *new* warrants. Existing warrants keep their stamped `τ`.

The second-order observation: `C`'s rejection was logged as `WARRANT_EPOCH_STALE`, which operators triaged as a replication-lag nuisance (expected, benign) rather than a compromise signal. The revocation was not escalated for 19 minutes.

Condition of Validity

The guardrail holds only when the receiver enforces a **conjunctive freshness predicate evaluated at commit time, not at assembly time**, over three independent quantities:

If any registry in the chain cannot be reached within the staleness budget, the handoff must be rejected — not deferred, not optimistically executed. The invariant is: **authority is valid only if all epochs agree and all trust scores are current, atomically, at the instant of side effect.** Partial validity is no validity.

Decision Boundary

The boundary between "safe to execute" and "must abort" is crossed the moment the receiver's cached epoch for *any* upstream registry is older than the revocation replication SLA. Concretely:

The trap is treating `τ` as a sufficient scalar. It is not: `τ` answers "how much do we still trust this issuer's *judgment*," while the epoch answers "is this issuer's *authority* still live." A compromised-but-recently-attested agent scores high on the first and fails the second, and the failure is silent because the score looks fine.

Operational Effect

When the invariant is enforced, the observable behavior changes in three ways. First, handoff latency becomes bounded by the slowest registry's epoch sync, which means the replication SLA becomes a hard dependency of the execution path — it can no longer be a background concern. Second, `WARRANT_EPOCH_STALE` rejections become actionable: because the receiver only rejects when the staleness budget is exceeded *and* epochs disagree, a rejection now means either replication is broken or a revocation is in flight, both of which warrant escalation. Third, the sender's execution loop must acquire a commit barrier: it cannot fire-and-forget a handoff and proceed to side effects, because the ack is the only signal that the epoch check passed at the receiver.

The cost is that federated handoffs become slower and more failure-prone under registry partition — which is correct, because the alternative is executing revoked authority with a healthy-looking trust score. The trust score was never the safety property; the epoch agreement was, and the score was a decoy that made the epoch check feel redundant.

from dataclasses import dataclass
from typing import Mapping


class EpochStaleWarrantError(RuntimeError):
    """Raised when a warrant's delegation-chain epoch disagrees with any
    upstream AAIF registry's latest known revocation epoch at commit time."""


class TrustBelowFloorError(RuntimeError):
    """Raised when event-aware trust decay has dropped the issuer below floor."""


@dataclass(frozen=True)
class Warrant:
    issuer_id: str
    epoch_at_issue: int
    trust_at_issue: float
    parent_epoch: int
    parent_registry: str


def validate_at_commit(
    warrant: Warrant,
    registry_epochs: Mapping[str, int],
    registry_sync_age_s: Mapping[str, float],
    replication_sla_s: float,
    current_trust: float,
    trust_floor: float,
) -> None:
    # 1. Every registry in the chain must be within its staleness budget.
    for reg, age in registry_sync_age_s.items():
        if age > replication_sla_s:
            raise EpochStaleWarrantError(
                f"registry {reg} epoch sync age {age:.2f}s exceeds SLA "
                f"{replication_sla_s:.2f}s; cannot certify epoch freshness"
            )

    # 2. Parent epoch must match the latest known epoch for the parent registry.
    latest_parent = registry_epochs.get(warrant.parent_registry)
    if latest_parent is None:
        raise EpochStaleWarrantError(
            f"no epoch observed for parent registry {warrant.parent_registry}"
        )
    if warrant.parent_epoch < latest_parent:
        raise EpochStaleWarrantError(
            f"warrant parent_epoch={warrant.parent_epoch} is behind "
            f"{warrant.parent_registry}@{latest_parent}; authority revoked"
        )

    # 3. Event-aware trust: revocation forces tau->0 immediately.
    if current_trust < trust_floor:
        raise TrustBelowFloorError(
            f"issuer {warrant.issuer_id} trust {current_trust:.3f} "
            f"below floor {trust_floor:.3f}"
        )


def handoff(warrant: Warrant, **kwargs) -> None:
    validate_at_commit(warrant, **kwargs)
    # Only reached if conjunctive freshness held atomically at commit.
    _execute_side_effects(warrant)


def _execute_side_effects(warrant: Warrant) -> None:
    ...