Why does an instance accept a delegated warrant whose issuer chain is valid but whose scope intersection is empty at depth ≥ 3?
**Date of Record:** 2026 December 2 **Scope:** Applies to AAIF-style verifiable-credential delegation chains where an agent instance re-derives effective authority by intersecting parent scopes at each hop. Does not apply to single-hop bearer-token issuance or to chains where scope is monotonic by construction (no narrowing).
Core Distinction
The failure is not signature forgery, expired credentials, or a broken issuer trust root. Every link in the chain verifies cryptographically. The failure is that **scope intersection is non-associative under the AAIF narrowing rule when intermediate hops carry wildcard or capability-set scopes**, so the effective authority computed hop-by-hop at issuance time diverges from the authority computed by the leaf at presentation time. A depth-3 chain can be individually valid at every edge and still resolve to the empty set — or, worse, to a *non-empty set that no issuer intended to grant* — depending on the order in which intersections are folded.
Concretely: `(A ∩ B) ∩ C ≠ A ∩ (B ∩ C)` once `B` contains a wildcard segment that expands differently against `A` than against `C`. The issuer signs a hash of its *own* narrowed view; the leaf recomputes from the raw parent scopes and gets a different lattice point.
What Was Observed
An orchestrator instance `O` issued a root warrant `W0` with scope `tool:fs:read:/data/**`. `O` delegated to planner `P` a warrant `W1` narrowing to `tool:fs:read:/data/reports/*` — but `P`'s issuance path serialized the wildcard as `tool:fs:read:/data/reports/**` (a serializer default that promotes single-star to recursive-star). `P` then delegated to worker `W` a warrant `W2` scoped `tool:fs:read:/data/**/q[0-9].csv`. At presentation, `W` folded:
- Hop-fold (issuer-side, what was signed): `(/data/**) ∩ (/data/reports/**) = /data/reports/**`, then `∩ (/data/**/q[0-9].csv) = /data/reports/**/q[0-9].csv` — non-empty, `W` proceeds.
- Leaf-fold (presentation-side, recomputed from raw parent scopes): `(/data/reports/**) ∩ (/data/**/q[0-9].csv)` — the leaf's matcher treats `**` as "zero or more path segments," so `/data/**/q[0-9].csv` does **not** match `/data/reports/q1.csv` because the recursive segment must consume at least one directory between `data` and the filename. Intersection resolves empty. `W` halts.
The two folds disagree because the wildcard's arity semantics depend on the *anchor* it is intersected against. The signed hash attested to the issuer-side fold; the leaf had no way to replay it. This is a **fold-order divergence**, not a signature failure — and it is silent, because both sides compute a well-formed scope object.
A second observed variant is more dangerous: when the intermediate hop widens via a capability-set scope (`{read,list}` serialized as `read+list`), the leaf-fold can produce a *superset* of the issuer-fold, granting `list` on a path the root never authorized. The chain verifies; the leaf over-acts.
Condition of Validity
The hop-by-hop fold is sound **only if** the scope algebra is a genuine meet-semilattice under the narrowing operator — i.e., intersection is associative, commutative, and idempotent over the concrete scope representation, *and* the serialization is a homomorphism for that operator. AAIF's wildcard scopes violate the homomorphism condition: `serialize(a ∩ b) ≠ serialize(a) ∩ serialize(b)` when either operand contains a recursive wildcard or a capability set. Therefore the invariant "effective authority = fold of raw parent scopes" holds only for chains where every hop's scope is a **finite explicit set of ground atoms** (no wildcards, no capability unions). The moment a wildcard or a union appears at depth ≥ 2, the invariant is undefined and the two folds may diverge.
The guardrail is to require that each warrant carry, alongside the signed scope, a **signed fold witness**: the canonicalized intersection result the issuer actually computed, plus the ordered list of parent-scope digests it folded. The leaf then *verifies* the witness (recomputes the fold from the digests and checks equality) rather than recomputing from raw scopes. If witness verification fails, the leaf must reject — never fall back to a raw recompute, because the raw recompute is exactly the divergent path.
Decision Boundary
The boundary is whether the leaf treats an absent or mismatched fold witness as a **hard rejection** or as a **soft fallback to raw recomputation**. Soft fallback is the defect: it converts a cryptographic continuity guarantee into a best-effort heuristic. The correct boundary:
- Witness present and equal to leaf recompute → accept, proceed.
- Witness present and *unequal* to leaf recompute → reject with `FoldDivergenceError`; do not proceed, do not retry with a different fold order.
- Witness absent and chain depth ≥ 2 with any wildcard/union scope → reject with `UnwitnessedFoldError`.
- Witness absent and all scopes are ground atoms → raw recompute is safe (associativity holds), accept.
This boundary must be enforced at the *presentation* side, not the issuance side, because the issuer cannot know which fold order the leaf will choose.
Operational Effect
Without the witness requirement, delegation chains become non-deterministic: the same warrant can authorize or deny depending on the leaf's matcher implementation, and two leaves in a swarm can disagree about whether a peer's action was authorized — producing exactly the auditor/actor consensus split that stalls multi-agent verification. With the witness requirement, the effective authority is a signed, replayable fact; the leaf's job reduces to equality-checking a digest, and fold-order divergence becomes a detectable, attributable rejection instead of a silent authorization drift. The cost is one extra digest per hop and a canonicalization routine that both issuer and leaf must share byte-for-byte — a versioning hazard in its own right, but a bounded and observable one.
import hashlib
from dataclasses import dataclass
class FoldDivergenceError(RuntimeError):
"""Raised when a leaf's recomputed scope fold disagrees with the issuer's signed fold witness."""
class UnwitnessedFoldError(RuntimeError):
"""Raised when a chain hop carries a wildcard/union scope but no signed fold witness."""
@dataclass(frozen=True)
class Scope:
atoms: frozenset[str]
has_wildcard_or_union: bool
@dataclass(frozen=True)
class Warrant:
scope: Scope
fold_witness: str | None # sha256 of canonicalized intersection result, signed by issuer
parent_digests: tuple[str, ...]
def canonical_fold_digest(scope: Scope) -> str:
payload = "|".join(sorted(scope.atoms)).encode("utf-8")
return hashlib.sha256(payload).hexdigest()
def verify_chain(chain: list[Warrant]) -> Scope:
if not chain:
raise FoldDivergenceError("empty delegation chain has no effective authority")
effective = chain[0].scope
for depth, warrant in enumerate(chain[1:], start=1):
narrowed = Scope(
atoms=effective.atoms & warrant.scope.atoms,
has_wildcard_or_union=effective.has_wildcard_or_union or warrant.scope.has_wildcard_or_union,
)
# Guardrail: wildcard/union scopes require a signed fold witness at any depth >= 2.
if narrowed.has_wildcard_or_union and depth >= 2:
if warrant.fold_witness is None:
raise UnwitnessedFoldError(
f"hop {depth} carries wildcard/union scope with no fold witness; "
f"raw recompute is fold-order dependent and must be rejected"
)
expected = canonical_fold_digest(narrowed)
if warrant.fold_witness != expected:
raise FoldDivergenceError(
f"hop {depth} fold witness {warrant.fold_witness[:12]}... "
f"!= leaf recompute {expected[:12]}...; issuer and leaf folded in different orders"
)
effective = narrowed
if not effective.atoms:
raise FoldDivergenceError(
f"hop {depth} resolved to empty scope; delegation is valid but grants nothing"
)
return effective