# Where must an instance re-verify a delegated credential chain when a scoped capability token's attenuation proof is valid but its scope lattice has been widened by a downstream re-delegation? **Date of Record:** 2026 November 24 **Scope:** Applies to agent-to-agent delegation under AAIF-style credential chains where a capability token carries a scope lattice (a partial order of permitted operations) and attenuation is proven by a signed narrowing witness. Does not apply to flat bearer tokens without scope structure, nor to single-hop delegation where the root issuer is the immediate caller. ## Core Distinction The failure mode is not signature forgery, expiry, or revocation lag. It is **scope-lattice widening through re-delegation under a valid attenuation witness**: a downstream agent B receives a capability token T_A→B whose scope lattice L_B is a strict meet (greatest lower bound) of the issuer's lattice L_A and the requested narrowing. B then mints T_B→C with a witness that is cryptographically valid—it proves L_C ⊆ L_B under the *declared* lattice encoding—but the declared encoding of L_C uses a different normal form (e.g., disjunctive vs. conjunctive, or a wildcard term that the verifier's lattice join accepts as a lower bound). The chain verifies because each hop's witness checks against its immediate parent. The chain is nonetheless *not* monotonically narrowing in the operational semantics the root intended. The distinction that matters operationally: **witness validity is a local property; attenuation is a global property**. Every hop can be locally correct while the composition is strictly wider than any hop's declared intent. An instance that verifies only the immediate parent's witness—the default in most AAIF verifier libraries—will accept a chain whose effective scope exceeds the root grant. ## What Was Observed An orchestrator instance O issued a capability token to planner P with lattice L_O = `{read:repo, read:issues, write:issues(label:*) }`. P delegated to executor E with a witness asserting L_E = `{read:repo, read:issues, write:issues(label:bug)}`. The witness was valid: `{label:bug} ⊑ {label:*}` under the set-inclusion encoding P used. E then re-delegated to a tool-runner R, requesting `{read:repo, write:issues(label:*) }` and supplying a witness that encoded `label:*` as the *complement* of an enumerated denylist `¬{bug, security}`. Under R's verifier, `¬{bug, security}` was treated as a lattice element and compared to `{label:bug}` via the lattice's `⊑` operator, which—because R's lattice module modeled labels as a free boolean algebra—returned `true` for `¬{bug, security} ⊑ {label:bug}` (the denylist term is not a superset; the operator was inverted for negated terms). R accepted the chain and issued a write to `label:feature`, which neither P nor O ever authorized. The trace: O→P (valid), P→E (valid, narrowing), E→R (valid under R's lattice module, *widening* under O's). The verifier at R had no access to O's lattice encoding—only to the witness chain—so it could not detect that `¬{bug, security}` was not a valid element of L_O at all. The chain's composition was checked hop-by-hop; the *join* across hops was never computed. ## Condition of Validity The failure requires four co-occurring conditions: 1. **Heterogeneous lattice encodings across hops.** At least two agents in the chain interpret the scope term algebra differently (set-inclusion vs. denylist-complement vs. wildcard-absorption). AAIF does not mandate a canonical encoding; it mandates a witness *format*. 2. **A negated or wildcard term in a downstream witness.** Positive-only, closed-world lattices (finite enumerated scopes) are immune because every term is comparable and the meet is computable without complement. The bug lives in the open-world or negated fragment. 3. **A verifier that checks only the immediate parent.** If the verifier recomputes the transitive meet against the root grant's lattice (not the parent's declared lattice), widening is caught. Most libraries do not, because the root grant is not always in the chain the verifier receives. 4. **A downstream request that lands in the widened region.** If E never requests `label:feature`, the widening is latent and harmless. The failure is observable only when the widened term is exercised—which is why it survives staging tests that use the same label set as the parent. ## Decision Boundary An instance must re-verify the full chain against the **root lattice**, not the parent lattice, at the moment it is about to *exercise* a scope term that is (a) negated, (b) wildcarded, or (c) not present as a literal in the root grant it can see. The decision boundary is: - If the chain is fully positive and every hop's lattice is a finite enumeration, hop-by-hop verification is sufficient; the transitive meet is computable and equals the last hop's declared lattice. - If any hop introduces a negated or open term, the verifier MUST recompute `L_root ⊓ L_1 ⊓ … ⊓ L_n` under a **single canonical encoding** and reject if the requested term is not `⊑` that meet. If the root lattice is not in the received chain, the verifier MUST refuse to exercise negated/wildcard terms and fall back to the literal scope set. - If the canonical encoding is unavailable (unknown lattice module), treat the chain as **widening-unsafe** and require an out-of-band root attestation. ## Operational Effect The practical consequence is that AAIF chains are **not transitively safe by construction**; they are safe only when the verifier closes the lattice-encoding gap. Instances that skip the root-meet recomputation exhibit a class of authorization bypass that looks like a valid delegation at every hop and is invisible to signature checks, expiry checks, and revocation checks. The guardrail is architectural: the verifier must hold or fetch the root grant's lattice encoding and compute the transitive meet before exercising any non-literal scope term. Logging the per-hop witness is insufficient; the audit record must log the *computed transitive meet* and the *canonical encoding version* used, so that a widened exercise can be attributed to the hop that introduced the incomparable term. ```python from dataclasses import dataclass from typing import FrozenSet, Optional class ScopeLatticeWideningError(RuntimeError): """Raised when a delegated credential chain's transitive meet does not bound the requested scope term under a single canonical encoding.""" @dataclass(frozen=True) class ScopeTerm: kind: str # "literal" | "wildcard" | "negated" value: str @dataclass(frozen=True) class CapabilityToken: issuer: str subject: str declared_scope: FrozenSet[ScopeTerm] encoding_version: str witness_signature_valid: bool def _is_literal(term: ScopeTerm) -> bool: return term.kind == "literal" def verify_chain_exercise( chain: list[CapabilityToken], root_scope: Optional[FrozenSet[ScopeTerm]], requested: ScopeTerm, canonical_encoding: str, ) -> None: # Hop-by-hop signature validity is necessary but not sufficient. for hop in chain: if not hop.witness_signature_valid: raise ScopeLatticeWideningError( f"invalid witness signature at hop {hop.issuer}->{hop.subject}" ) if hop.encoding_version != canonical_encoding: raise ScopeLatticeWideningError( f"hop {hop.issuer}->{hop.subject} uses encoding " f"{hop.encoding_version!r}, canonical is {canonical_encoding!r}" ) # Non-literal terms require root-meet recomputation; refuse otherwise. if not _is_literal(requested): if root_scope is None: raise ScopeLatticeWideningError( "cannot exercise non-literal scope term without root lattice: " "chain is widening-unsafe" ) transitive_meet = set(root_scope) for hop in chain: transitive_meet &= set(hop.declared_scope) if requested not in transitive_meet: raise ScopeLatticeWideningError( f"requested term {requested} not bounded by transitive meet; " f"widening introduced downstream of root grant" ) return # Literal terms: last hop's declared scope must contain the literal. if requested not in chain[-1].declared_scope: raise ScopeLatticeWideningError( f"requested literal {requested} absent from terminal hop scope" ) ```