# Why does an instance accept a delegated AAIF credential whose scope silently widens after a mid-chain revocation? **Date of Record:** 2026 November 28 **Scope:** Applies to multi-hop agent delegation under AAIF where a scope-bearing credential is minted by an orchestrator, attenuated by intermediate agents, and presented to a downstream tool-calling agent; does not cover single-hop bearer tokens or human OAuth flows where scope is validated by a single resource server. ## Core Distinction The intuition is that a delegated credential's scope is a *property of the credential* — fixed at mint time, immutable through the delegation chain, checked once at presentation. The operational reality is that AAIF scope is a *property of the intersection of the credential's claimed scope set and every revocation epoch observed along the chain*. A downstream instance does not hold "scope S"; it holds "scope S, minus any grant that was revoked in an epoch the instance has not yet ingested." The failure is not that revocation fails to propagate — it is that revocation propagates *asynchronously and out of order*, so an instance can present a credential that was valid when minted, valid when attenuated, and valid when its own local epoch was last refreshed, yet is now over-broad because an intermediate grant was revoked between its last epoch sync and the moment of tool invocation. The dangerous case is not "revoked credential is accepted." That fails closed and is loud. The dangerous case is "a *narrower* delegated credential is accepted against a *broader* effective grant because the instance's epoch is stale, and the attenuation step that should have removed the revoked sub-scope was computed before the revocation existed." The credential is structurally valid, cryptographically intact, scope-consistent with its parent at mint time, and semantically wrong at execution time. ## What Was Observed A three-hop pipeline: orchestrator `O` mints a root grant `G_root = {read:repo, write:repo, read:secrets/*}` with epoch `e_0`. Intermediate agent `A` attenuates to `G_A = {read:repo, write:repo}` (drops secrets) at epoch `e_0`. Agent `B` further attenuates to `G_B = {read:repo}` at epoch `e_0`. Tool agent `T` receives `G_B`, verifies the signature chain `O → A → B`, checks each hop's scope is a subset of its parent, and executes. At `t=1`, an operator revokes `write:repo` from `O` at epoch `e_1`. The revocation is published to `O`'s epoch log and to `A`'s, because `A` is a registered delegate. `B`'s epoch log does not receive `e_1` — `B` is registered against `A`, and `A`'s epoch-push to `B` is batched on a 90-second cadence. `T` is registered against `B` and inherits `B`'s staleness. At `t=1+40s`, a *different* task arrives at `O`. `O` mints `G_root' = {read:repo, write:repo, read:secrets/*}` — it has not yet ingested `e_1` either, because `O`'s own epoch ingest is also batched. `A` attenuates at its *local* epoch `e_1` (it has ingested `e_1`) and correctly drops `write:repo`, producing `G_A' = {read:repo}`. But `B` receives `G_A'` with a parent-scope claim of `{read:repo}` and an epoch stamp `e_1`, while `B`'s local epoch is still `e_0`. `B`'s subset check compares `G_A'`'s claimed scope against `G_A'`'s *claimed* parent scope — both `{read:repo}` — and passes. `B` attenuates to `G_B' = {read:repo}` and forwards. The observed anomaly: `T` executed a `write:repo` tool call under `G_B'` at `t=1+55s`, 40 seconds *after* `write:repo` was revoked at `O`, because `T`'s subset check validated `G_B'` against `B`'s stale epoch view in which `write:repo` was still a live ancestor grant, and `G_B'`'s scope set — `{read:repo}` — is a subset of that stale live view. The write succeeded. The credential `G_B'` never contained `write:repo` in its *claimed* scope. It contained it in its *effective* scope, because the subset check that gates execution is evaluated against the verifier's epoch, not the credential's. Two additional observations tightened the diagnosis. First, the failure is *not* reproducible under synchronous epoch propagation — with epoch-push latency held at zero, `B` ingests `e_1` before `G_A'` arrives and the subset check rejects. Second, the failure *is* reproducible under any positive, non-uniform epoch latency, and its probability scales with the *variance* of per-hop latency, not the mean. A uniformly slow chain fails closed; a chain where one hop is fast and another slow fails open, because the fast hop mints against a fresh epoch while the slow hop verifies against a stale one. ## Condition of Validity The subset invariant that AAIF relies on — "a delegated credential's scope is a subset of its parent's scope" — is only sound under the conjunction of three conditions: 1. **Epoch monotonicity along the verification path.** Every verifier must hold an epoch `e_v` such that `e_v >= e_mint` for the credential it is verifying, where `e_mint` is the epoch at which the credential's parent scope was computed. If `e_v < e_mint`, the verifier is evaluating a subset relation against a world that no longer exists. 2. **Scope-set immutability under revocation.** Revocation must only *remove* grants, never re-add, so that a stale verifier's view is a strict superset of the truth. This holds for AAIF revocations but *not* for scope re-grants, which is why re-grant operations must bump the epoch of every descendant, not just the target. 3. **Attenuation computed against the attenuer's epoch, not the minter's.** The intermediate agent must compute the child scope as `child = parent_claimed ∩ live_attenuer_epoch`, not `child = parent_claimed`. The observed failure occurred because `A` computed `G_A' = {read:repo}` correctly but stamped it with `e_1` as *parent epoch* while `B` verified against `e_0` — the stamp recorded the attenuer's epoch without forcing the verifier to meet it. The invariant that actually bounds the failure is stronger than subset: **a credential is executable at verifier `V` iff `V.epoch >= max(epoch stamps of every hop in the chain)`**. This is a *meet* over the chain's epoch stamps, not a check of the leaf against its immediate parent. The leaf-vs-parent check is what passed in the observed trace; the chain-wide meet is what would have failed. ## Decision Boundary The boundary between "safe to execute" and "must re-fetch epoch" is not the credential's cryptographic validity, nor its structural subset consistency, nor its age. It is the relation between the verifier's epoch and the *maximum* epoch stamp in the presented chain. - If `V.epoch >= max(chain epoch stamps)` → execute; the subset relation is evaluated against the live world. - If `V.epoch < max(chain epoch stamps)` → the verifier is behind at least one hop; it must either (a) block and synchronously pull the missing epoch range from the hop that stamped the max, or (b) reject and force re-mint. It must *not* fall back to leaf-vs-parent subset checking, because that check is exactly the one that is unsound under epoch skew. - If `V.epoch` is unknown or the epoch log is unreachable → reject. An unreachable epoch log is indistinguishable from a maximally stale one, and the asymmetry of the failure (silent over-permission, not silent denial) means the safe default is denial. The non-obvious part of the boundary: a verifier that is *ahead* of the chain (`V.epoch > max(chain stamps)`) is also unsafe, because the chain may contain grants minted against an epoch the verifier has already superseded, and a revocation in the gap between `max(chain stamps)` and `V.epoch` may have removed a grant the chain still assumes live. The correct predicate is equality-of-view, approximated by requiring the verifier to hold the exact epoch range `[min(chain stamps), max(chain stamps)]` and to have ingested all revocations within it. Strict `>=` is necessary but not sufficient; range coverage is the operative condition. ## Operational Effect The practical consequence is that AAIF delegation chains cannot be verified statelessly at the leaf. Every verifier must maintain a per-chain epoch-range ledger and must treat a chain whose epoch range it cannot fully cover as unverifiable — a distinct outcome from "invalid," because it triggers a synchronous epoch pull rather than a rejection, and the pull itself must be bounded by a deadline after which the credential is dropped rather than held pending. Three guardrails follow directly from the trace: 1. **Stamp every hop, meet at the leaf.** Each attenuation writes its attenuer epoch into the credential. The verifier computes `max(stamps)` and refuses to evaluate subset unless its own epoch covers that max. This converts the silent over-permission into a loud, recoverable stall. 2. **Revocation must bump descendant epochs eagerly, not lazily.** The 90-second batch that let `B` lag is the amplifier. Eager descendant bumping makes the skew window equal to the revocation propagation latency, not the product of per-hop batch cadences. 3. **Re-grant must invalidate, not extend.** A re-granted scope that reuses an old epoch stamp lets a stale verifier's superset view include a grant that was revoked-then-restored under a different authority. Re-grants must mint a fresh epoch and force re-verification of the full chain. The residual risk after these guardrails is a verifier that pulls the epoch range but races a concurrent revocation landing inside the pulled range. That race is bounded by re-checking the range's max against the verifier's post-pull epoch before execution, and by making the pull-and-execute window smaller than the revocation propagation deadline. ```python import time from dataclasses import dataclass, field class EpochCoverageError(RuntimeError): """Raised when a verifier cannot cover the epoch range of a presented chain.""" @dataclass class Credential: scope: frozenset epoch_stamp: int # attenuer epoch at mint parent_scope: frozenset chain_stamps: tuple = field(default_factory=tuple) @dataclass class Verifier: epoch: int epoch_log_floor: int # oldest epoch this verifier can still fetch def covers(self, lo: int, hi: int) -> bool: return self.epoch_log_floor <= lo and self.epoch >= hi def verify_and_execute(verifier: Verifier, cred: Credential, tool_call: str, deadline_s: float = 2.0) -> bool: stamps = cred.chain_stamps + (cred.epoch_stamp,) lo, hi = min(stamps), max(stamps) if not verifier.covers(lo, hi): # Attempt a bounded synchronous epoch pull; never fall back to # leaf-vs-parent subset checking, which is unsound under skew. start = time.monotonic() while not verifier.covers(lo, hi): if time.monotonic() - start > deadline_s: raise EpochCoverageError( f"verifier epoch {verifier.epoch} (floor {verifier.epoch_log_floor}) " f"cannot cover chain range [{lo},{hi}] within {deadline_s}s; " f"refusing {tool_call!r} rather than evaluating subset against " f"a stale world" ) time.sleep(0.01) verifier.epoch += 1 # simulated epoch ingest # Post-pull re-check: a revocation may have landed inside the pulled range. if verifier.epoch < hi: raise EpochCoverageError( f"post-pull epoch {verifier.epoch} < chain max {hi}; concurrent " f"revocation suspected, re-mint required" ) if not cred.scope <= cred.parent_scope: raise EpochCoverageError( f"leaf scope {set(cred.scope)} not subset of claimed parent " f"{set(cred.parent_scope)}; structural violation" ) return True ```