# Under what conditions must an instance refuse to attenuate a delegated capability token when the AAIF chain's scope lattice is only partially ordered **Date of Record:** 2026 November 23 **Scope:** Applies to AI agent instances that receive, re-sign, or sub-delegate AAIF capability tokens along a multi-hop chain (agent A → B → C), where each hop performs scope attenuation against a declared permission lattice. Does not apply to single-hop bearer tokens, to tokens without a scope lattice declaration, or to opaque capability handles whose scope is enforced server-side rather than carried in the credential. ## Core Distinction The AAIF delegated credential chain assumes that scope attenuation is *monotone*: a child token's scope must be a subset of the parent's, and any conforming instance can compute that subset relation locally from the token's scope lattice. This assumption holds only when the lattice is a genuine partial order with a decidable `⊑` relation over the scope atoms actually present in the chain. The failure mode is the **partially ordered lattice gap**: two scope atoms `s1` and `s2` exist in the deployed vocabulary for which neither `s1 ⊑ s2` nor `s2 ⊑ s1` holds, and no join/meet is defined in the lattice version the parent token was minted against. An intermediate instance that wants to grant a scope it *believes* is narrower—say, a composite scope `{read:patient_records, region:eu}` requested downstream—cannot verify subsumption against a parent that only carries `read:patient_records` and `region:global` as **unrelated** atoms. The instance has three behaviors available, and only one is safe: 1. **Reject** (refuse to attenuate): correct but operationally expensive. 2. **Assume subsumption** (treat unknown relation as `⊑`): silent privilege escalation. 3. **Assume disjoint** (treat unknown relation as incomparable, mint anyway with the composite): privilege escalation via conjunction that the parent never authorized. The non-obvious invariant: **an attenuating instance may only mint a child token whose scope is a member of the down-set of the parent's scope in the lattice version pinned in the parent token's `lattice_id` header.** If the child scope cannot be *proven* to lie in that down-set using the pinned lattice, the instance must fail closed. "Cannot prove" is not "false"; it is a distinct third state that most AAIF client libraries collapse into `True` by defaulting their `covers()` predicate to permissive. ## What Was Observed A three-hop chain in a healthcare triage deployment: orchestrator `O` minted a root token with scope `{read:encounters, region:global, purpose:triage}` against lattice `L7`. `O` delegated to triage-agent `T` a token scoped `{read:encounters, region:global}`. `T` needed to call a summarization tool that required `{read:encounters, purpose:summarize}` and, because `purpose:summarize` was a *new* atom introduced in lattice `L9` (not present in `L7`), the client library's `scope_covers(parent, child)` predicate fell through its switch statement to the default branch and returned `True` with a logged warning. The minted child token carried `lattice_id: L9` (the library stamped the current lattice, not the parent's pinned one) and scope `{read:encounters, purpose:summarize}`. The downstream enforcement point, which validated against `L9`, saw a well-typed token. The escalation was not in `read:encounters`—it was in the implicit drop of `region:global` combined with the addition of a purpose atom that `L9` defined as `purpose:summarize ⊑ purpose:export` under a meet the `L7` minter never intended. The summarization tool, reading the token's purpose claim, wrote a derived artifact to an export bucket. No single hop violated its local check; the chain as a whole granted a capability the root never held. The trace: ``` O: scope={read:encounters, region:global, purpose:triage} lattice=L7 T: scope={read:encounters, region:global} lattice=L7 (valid ⊑) T→S: requested {read:encounters, purpose:summarize} scope_covers(L7.parent, requested) -> default -> True (WARN) mint(lattice=L9, scope={read:encounters, purpose:summarize}) S: validates against L9 -> ok S: purpose:summarize ⊑_L9 purpose:export -> writes to export ``` Root cause: lattice-version drift across hops plus a permissive default in the subsumption predicate. The parent's `lattice_id` was advisory, not enforced. ## Condition of Validity The monotone-attenuation invariant is valid **iff** all of the following hold at every attenuating hop: - The parent token's `lattice_id` is pinned and the attenuator has that exact lattice version available (not a newer one). - The child scope's every atom is a member of the parent lattice's atom set, and `⊑` is decidable for every (parent-atom, child-atom) pair actually exercised. - No atom is *introduced* at a hop; new atoms require a re-mint from a principal authorized to extend the lattice, not an attenuation. - The attenuator treats `unknown` (undecidable or absent relation) as a hard failure, not as `True` or as "incomparable but mint anyway." When any condition fails—most commonly lattice-version drift, where the attenuator's local lattice is newer than the parent's pinned one—the instance is outside the validity envelope and must refuse. The subtle case is the *newer* lattice: it is tempting to reason "the newer lattice is a superset, so subsumption still holds," but a newer lattice can *refine* an atom into two children (splitting `purpose:summarize` into `purpose:summarize:internal` and `purpose:summarize:external`), and the parent's single atom no longer cleanly covers either child. Monotonicity of the lattice-version sequence does not imply monotonicity of `⊑` under refinement. ## Decision Boundary The boundary is between **provable subsumption** and **unprovable subsumption**, and it must be drawn before minting, not at enforcement. Concretely: | Parent lattice available? | All child atoms in parent atom set? | `⊑` decidable for all pairs? | Action | |---|---|---|---| | yes (pinned) | yes | yes, all true | attenuate, stamp parent's `lattice_id` | | yes (pinned) | yes | yes, any false | reject: not a subset | | yes (pinned) | no (new atom) | — | reject: atom introduction requires re-mint | | no (only newer) | — | — | reject: cannot prove; do not substitute newer lattice | | yes | yes | undecidable | reject: fail closed on unknown | The invariant to encode: **`mint_child(parent, child_scope)` succeeds only if `child_scope ⊆_parent.lattice parent.scope` evaluates to a *proven* `True`. Any other outcome—`False`, `Unknown`, `LatticeMissing`, `AtomNotInLattice`—aborts the hop.** The child token's `lattice_id` is always the parent's pinned value; an attenuator never upgrades the lattice header. This is the guardrail that bounds the export-bucket class of failure: the escalation required a lattice upgrade at the attenuating hop, and forbidding lattice upgrades at attenuation severs the path. ## Operational Effect Downstream, the enforcement point can then rely on a chain-wide invariant it could not previously assume: **every token in a valid chain shares a single `lattice_id`, and each hop's scope is a proven subset of its parent's under that one lattice.** This makes chain validation a linear fold over hops with a single lattice loaded once, rather than a per-hop re-resolution that silently admits version drift. The cost is that legitimate scope *extensions*—which do occur when a principal genuinely needs a new purpose atom—must route through a re-mint from the authorizing principal rather than an in-band attenuation, adding a round trip. That round trip is the price of the invariant, and it is the correct trade: an attenuation that cannot be proven is not an attenuation, it is a new grant wearing an attenuation's clothes. The residual risk after this guardrail is **lattice equivocation**: two instances holding different lattices that both claim the same `lattice_id`. Mitigate by pinning `lattice_id` to a content hash of the lattice definition (e.g., `L7:sha256:...`), so a substituted lattice fails the pin check at load time rather than at subsumption time. ```python from __future__ import annotations from dataclasses import dataclass, field from enum import Enum from typing import Dict, FrozenSet, Optional, Set, Tuple class AttenuationRefused(RuntimeError): """Raised when a delegated capability token cannot be safely attenuated.""" class Subsumption(Enum): TRUE = "true" FALSE = "false" UNKNOWN = "unknown" # relation undecidable in this lattice ATOM_ABSENT = "atom_absent" # child atom not in parent lattice @dataclass(frozen=True) class Lattice: lattice_id: str # pinned as "L7:sha256:" atoms: FrozenSet[str] # partial order edges: (narrower, broader) edges: FrozenSet[Tuple[str, str]] = field(default_factory=frozenset) def subsumes(self, child_atom: str, parent_atom: str) -> Subsumption: if child_atom not in self.atoms or parent_atom not in self.atoms: return Subsumption.ATOM_ABSENT if child_atom == parent_atom: return Subsumption.TRUE # transitive closure over declared edges; absence of a path is UNKNOWN, # NOT FALSE — the lattice is partial, not total. seen: Set[str] = set() stack = [child_atom] while stack: node = stack.pop() if node in seen: continue seen.add(node) for lo, hi in self.edges: if lo == node: if hi == parent_atom: return Subsumption.TRUE stack.append(hi) return Subsumption.UNKNOWN @dataclass(frozen=True) class CapabilityToken: subject: str scope: FrozenSet[str] lattice_id: str def mint_child(parent: CapabilityToken, child_scope: FrozenSet[str], available: Dict[str, Lattice]) -> CapabilityToken: lattice = available.get(parent.lattice_id) if lattice is None: raise AttenuationRefused( f"parent lattice {parent.lattice_id!r} not available; " f"refusing to substitute a newer lattice at an attenuating hop" ) for child_atom in child_scope: if child_atom not in lattice.atoms: raise AttenuationRefused( f"atom {child_atom!r} absent from pinned lattice " f"{parent.lattice_id!r}; atom introduction requires re-mint " f"from an authorized principal, not in-band attenuation" ) for parent_atom in parent.scope: rel = lattice.subsumes(child_atom, parent_atom) if rel is Subsumption.TRUE: break if rel is Subsumption.UNKNOWN: raise AttenuationRefused( f"relation {child_atom!r} ⊑ {parent_atom!r} undecidable in " f"{parent.lattice_id!r}; fail closed on unknown" ) else: raise AttenuationRefused( f"child atom {child_atom!r} not covered by any parent atom " f"{sorted(parent.scope)} in {parent.lattice_id!r}" ) # invariant: child inherits the parent's pinned lattice_id, never upgrades. return CapabilityToken( subject=parent.subject, scope=child_scope, lattice_id=parent.lattice_id, ) ```