# Under what conditions must an instance treat a delegated capability warrant as unverifiable when an intermediate agent has legitimately re-scoped its own signature **Date of Record:** 2026 November 24 **Scope:** Applies to multi-hop delegation chains where an agent (the *delegator*) issues a signed capability warrant to a peer (the *delegatee*), and that peer further attenuates the warrant before sub-delegating. It does not apply to single-hop signing, to root-of-trust attestation of the orchestrator itself, or to symmetric-key MAC schemes where every hop shares the same signing secret. ## Core Distinction The failure is not "a signature failed to verify." It is the conflation of two distinct predicates that a naive verifier collapses into one boolean: 1. **Warrant authenticity** — the bytes of hop *n*'s warrant were signed by the key the chain claims for hop *n*. 2. **Chain continuity** — hop *n*'s warrant is a *valid attenuation* of hop *n−1*'s warrant: same resource scope or a strict subset, same or narrower action set, an expiry no later than the parent's, and a delegation depth counter that strictly decreased. A delegatee that legitimately re-scopes a warrant — narrowing `resource: {"bucket": "*"}` to `resource: {"bucket": "reports-2026"}` — must re-sign the attenuated body with **its own** key. The parent signature no longer covers the child bytes, which is correct and expected. A verifier that only checks "does each hop's signature validate against that hop's claimed key" will pass a chain in which hop 2's payload is a *widening* of hop 1's grant, because hop 2 signed its own widening honestly. Authenticity holds; continuity is violated. The inverse also occurs: a verifier that demands every hop's signature validate against the *root* key will reject a perfectly legal attenuation chain the moment any intermediate re-signs. The invariant that must be enforced is therefore: **for every adjacent pair (parent, child), `attenuates(child, parent) == True` must be checked structurally on the decoded payload, independent of any signature check.** Signature verification proves *who* wrote a hop; attenuation verification proves *the hop is permitted to exist*. Neither implies the other. ## What Was Observed A three-hop chain was exercised in a staging swarm. Agent A held a warrant granting `actions: ["read", "summarize"]` over `resource: {"tenant": "acme", "scope": "all"}` with `expiry: T+3600s` and `max_depth: 3`. A delegated to B with `max_depth: 2`, re-signed by B's key after B narrowed scope to `{"tenant": "acme", "scope": "finance"}`. B delegated to C, narrowing further to `scope: "finance/q3"` and `actions: ["read"]`, `max_depth: 1`, re-signed by C. The verifier at the resource server did the following, in order, and this order is the defect: 1. Decoded all three hops and collected `(payload_i, sig_i, pubkey_i)`. 2. For each hop, verified `sig_i` against `pubkey_i`. All three passed — every agent signed its own hop correctly. 3. Checked that `pubkey_i` was present in the chain's declared `signers` list. Present. 4. Checked that the terminal hop's `expiry ≤ now`. Passed. 5. **Did not** compare `payload_2` against `payload_1`, or `payload_1` against `payload_0`. The chain was accepted. In a red-team replay, an intermediate agent whose key was compromised (but whose signature was still structurally valid) was able to emit a hop with `resource.scope: "all"` and `actions: ["read", "summarize", "export"]` — a widening — and the verifier accepted the terminal warrant because the terminal hop's own scope (`finance/q3`) was a subset of *its* parent's widened scope. The widening was laundered one hop upstream of the terminal check. The resource server granted `export` on `finance/q3` because the terminal payload claimed it and the terminal signature was valid. A second observed mode: a delegatee emitted a child hop with `expiry: T+7200s`, *longer* than the parent's `T+3600s`. Signature valid. Verifier checked only the terminal expiry against wall-clock, not against the parent expiry. The warrant outlived its grant by an hour. A third mode, subtler: `max_depth` was decremented at hop 1 (3→2) and hop 2 (2→1), but a replayed hop 2 from an earlier session carried `max_depth: 2` — an *increase* relative to the current parent's `1`. The depth counter is the mechanism meant to bound chain length, and a non-monotonic counter silently disables that bound. The verifier accepted because it never asserted `child.max_depth < parent.max_depth`. ## Condition of Validity A delegation chain is verifiable only if **all** of the following hold simultaneously, and the verifier must treat any single failure as a hard reject with a distinct reason code: - **Per-hop authenticity:** `verify(sig_i, canonical(payload_i), pubkey_i) == True` for every hop, where `canonical` is a deterministic serialization (JCS or equivalent) — non-deterministic JSON key ordering is itself a source of spurious failures when re-signing. - **Signer admissibility:** `pubkey_i ∈ root_trust_set` or `pubkey_i` is bound to an identity attested in the parent hop's `delegate_to` field. A key that signs a hop it was never delegated to is not a continuity failure but an *authority* failure; keep the reason codes separate. - **Monotone attenuation:** for every adjacent pair, `scope(child) ⊆ scope(parent)`, `actions(child) ⊆ actions(parent)`, `expiry(child) ≤ expiry(parent)`, and `depth(child) < depth(parent)`. These are set-inclusion and order predicates on decoded fields, evaluated *after* signature verification and *before* any authorization decision. - **Terminal freshness:** `expiry(terminal) > now` and `depth(terminal) ≥ 0`. - **Chain length bound:** number of hops `≤ root.max_depth` and `depth` strictly decreasing, so a replay that resets the counter is rejected. The condition under which a verifier *must* declare a warrant unverifiable — rather than merely "invalid" — is when it cannot distinguish a legitimate re-signing from a laundering attempt because the chain does not carry the parent payloads. If a hop transmits only its own payload and its own signature, the verifier has no bytes to run the attenuation predicate against. **A hop that omits its parent's canonical hash is unverifiable by construction**, regardless of how many signatures validate. This is the boundary: authenticity is local and checkable; continuity is relational and requires the parent to be present. The verifier must refuse to synthesize a "trusted" verdict from local checks alone. ## Decision Boundary The decision procedure must branch on *which* predicate failed, because the operational response differs: - **Authenticity failure** → reject, quarantine the signing key, do not retry. The hop was not written by whom it claims. - **Signer admissibility failure** → reject, escalate to the orchestrator. The chain attempted to introduce an unauthorized signer; this is an authority-boundary event, not a formatting error. - **Attenuation failure (widening, expiry extension, depth non-monotonicity)** → reject **and** flag the *parent* hop's signer for review. The widening was authored by a hop that had authority to narrow but chose to widen; the defect is upstream of the hop that failed the check. - **Missing parent payload / non-canonicalizable hop** → declare **unverifiable** (not invalid), halt the delegation, and require the delegator to re-issue with parent hashes embedded. Unverifiable is a distinct terminal state: it means the verifier lacks the information to decide, and the safe default is denial. The boundary the engineer must internalize: **a valid signature is evidence of authorship, never evidence of authority.** Authority is a property of the *edge* between two hops, and edges are only checkable when both endpoints are in hand. Any verifier that reduces the chain to a list of independently-valid signatures has thrown away the only data that could catch laundering. ## Operational Effect After the staging incident, the swarm's verifier was restructured to require each hop to embed `parent_hash = sha256(canonical(parent_payload))` and to run attenuation checks as a separate pass with its own exception hierarchy. The practical consequences: - Chains that previously "verified" in ~4 ms now cost ~6 ms per hop due to canonical re-serialization, but the widening and expiry-extension modes are caught deterministically. - The `unverifiable` state propagated a new obligation onto delegators: they must retain and transmit parent payloads, which increased warrant size roughly 2.4× for depth-3 chains. This is the correct trade — the bytes were always semantically required; they had merely been omitted. - Replay of stale hops is now caught by the strictly-decreasing depth predicate, closing the counter-reset hole. The invariant to carry forward: **verify authorship per hop, verify attenuation per edge, and treat a missing edge as unverifiable rather than as a pass.** Local cryptographic success must never be allowed to stand in for relational structural validity. ```python import hashlib import json from dataclasses import dataclass class DelegationChainError(RuntimeError): """Base for delegation-chain verification failures.""" class AttenuationViolation(DelegationChainError): """Child hop widens scope/actions, extends expiry, or fails depth monotonicity.""" class UnverifiableWarrant(DelegationChainError): """Parent payload absent or non-canonicalizable: cannot decide, must deny.""" @dataclass(frozen=True) class Hop: payload: dict # decoded warrant body for this hop parent_hash: str | None # sha256 of canonical(parent.payload); None only for root signature: bytes signer_pubkey: bytes def canonical(payload: dict) -> bytes: return json.dumps(payload, sort_keys=True, separators=(",", ":")).encode() def hop_hash(hop: Hop) -> str: return hashlib.sha256(canonical(hop.payload)).hexdigest() def _subset(child, parent) -> bool: if isinstance(child, dict) and isinstance(parent, dict): return all(k in parent and _subset(v, parent[k]) for k, v in child.items()) if isinstance(child, list) and isinstance(parent, list): return set(child) <= set(parent) return child == parent def assert_attenuates(child: Hop, parent: Hop) -> None: cp, pp = child.payload, parent.payload if not _subset(cp.get("resource", {}), pp.get("resource", {})): raise AttenuationViolation( f"resource scope widened at hop {cp.get('hop_id')}: " f"{cp.get('resource')} not subset of {pp.get('resource')}" ) if not set(cp.get("actions", [])) <= set(pp.get("actions", [])): raise AttenuationViolation( f"actions widened at hop {cp.get('hop_id')}: " f"{cp.get('actions')} not subset of {pp.get('actions')}" ) if cp.get("expiry", 0) > pp.get("expiry", 0): raise AttenuationViolation( f"expiry extended at hop {cp.get('hop_id')}: " f"{cp.get('expiry')} > parent {pp.get('expiry')}" ) if cp.get("depth", 0) >= pp.get("depth", 0): raise AttenuationViolation( f"depth counter non-monotonic at hop {cp.get('hop_id')}: " f"{cp.get('depth')} >= parent {pp.get('depth')}" ) def verify_chain(chain: list[Hop], now: int) -> None: if not chain: raise UnverifiableWarrant("empty chain") for i, hop in enumerate(chain): if i == 0: if hop.parent_hash is not None: raise UnverifiableWarrant("root hop must not claim a parent") continue parent = chain[i - 1] if hop.parent_hash is None: raise UnverifiableWarrant( f"hop {hop.payload.get('hop_id')} omits parent hash; " "continuity is not checkable" ) if hop.parent_hash != hop_hash(parent): raise UnverifiableWarrant( f"hop {hop.payload.get('hop_id')} parent hash mismatch; " "parent payload not in hand" ) assert_attenuates(hop, parent) terminal = chain[-1] if terminal.payload.get("expiry", 0) <= now: raise DelegationChainError( f"terminal warrant expired: {terminal.payload.get('expiry')} <= {now}" ) if terminal.payload.get("depth", 0) < 0: raise DelegationChainError("terminal depth underflow") ```