# How does an instance detect a signed-capability downgrade when federation peers re-sign a narrower warrant during A2A handoff? **Date of Record:** 2026 November 29 **Scope:** Applies to cross-organization agent federation where capability warrants are exchanged as signed, chained artifacts (MCP tool scopes, A2A task grants, or equivalent) and where a downstream peer may re-delegate a subset to a further peer. Does not apply to single-tenant deployments where all agents share one signing authority and one trust root. ## Core Distinction The failure is not "a signature failed to verify." Signature verification is the easy case: the bytes either hash to the expected digest under the peer's published key or they do not, and a non-verifying warrant is rejected at the transport boundary. The hard case is a **valid signature over a semantically narrower warrant than the one that was presented upstream**. Every byte verifies. Every chain link is intact. The peer's key is trusted. And yet the effective capability set shrinks silently between hop N and hop N+1, because re-signing is a *lossy* operation that the receiving agent has no reason to suspect. The invariant that must hold across a federation handoff is **monotonic capability containment**: the warrant presented by hop N+1 must be a subset of the warrant granted to hop N, and that subset relation must be *derivable from the signed artifacts themselves*, not asserted by the peer in prose. A signature proves *who* narrowed the scope. It does not prove *that* the narrowing was authorized, and it does not prove *that the narrowing was intentional or complete*. The gap between "cryptographically authentic" and "semantically authorized" is where the failure lives. ## What Was Observed A three-hop federation: orchestrator agent `A` (org Alpha) grants a task to worker `B` (org Beta) with a warrant scoping `{read:dataset, write:dataset, invoke:summarizer}`. `B` must delegate a sub-task to `C` (org Gamma). `B` mints a re-delegation warrant for `C`. The re-signing logic in `B` was written against an older schema version in which `invoke:summarizer` was expressed as `invoke:tool:*`; the migration to named-tool scopes was incomplete. `B`'s serializer, when emitting the child warrant, silently dropped the `invoke:summarizer` scope because it did not recognize the token under the new grammar. `B` then signed the child warrant with its own key. At `C`, the chain verifies cleanly: `A`'s signature over `B`'s grant checks, `B`'s signature over `C`'s grant checks, and `C`'s trust policy accepts both Alpha and Beta roots. `C` proceeds with a warrant that lacks `invoke:summarizer`. The sub-task fails at the tool-call boundary with a permission error that `C` reports back to `B` as "capability not granted," and `B` reports to `A` as "downstream refusal," and `A`'s supervisor logs a peer-policy conflict. Three hops of misattribution, all rooted in a serializer that dropped a token it did not parse. The signature layer did exactly what it was designed to do: it proved that `B` signed the narrow warrant. It did not, and structurally could not, prove that `B` *intended* to narrow it, or that the narrowing was a legal subset of the parent grant. The receiving agent's verification routine checked chain integrity and trust roots. It never checked subset containment, because subset containment is a semantic operation over parsed scope tokens, not a cryptographic one over digests. A second variant of the same failure was observed when a peer deliberately re-signed a narrower warrant to "stay within budget" without notifying the parent. This is not a serializer bug; it is a policy decision by a peer that the protocol permitted because no containment check was mandated. The parent agent never learned its grant had been trimmed, and its own reasoning continued to assume the full scope was available downstream. The divergence surfaced only when a tool call returned `403` at the leaf. ## Condition of Validity The containment invariant is well-defined only when three conditions hold, and each is a place where the check can be voided: 1. **Scope grammar is shared and versioned.** Subset checking requires that both parent and child warrants parse under the *same* scope grammar version. If `B` emits under grammar v2 and `C` validates under grammar v1, the token sets are incomparable and any containment check must fail closed, not open. The observed bug was a grammar-version skew that the protocol did not carry in the warrant envelope. 2. **The parent warrant is available to the verifier.** Subset containment is a relation between two artifacts. `C` can only check containment if `B` forwards the *entire* chain, not just the immediate parent. Protocols that forward only the leaf warrant make containment unverifiable at the leaf and push the obligation back to `B`, which is the party whose serializer was buggy in the first place. 3. **Narrowing is declared, not inferred.** A peer that re-signs a narrower warrant MUST attach a signed `narrowing_manifest` enumerating every scope token it removed and the reason. Absent that manifest, a narrower child warrant is indistinguishable from a buggy serializer or a silent policy trim. The manifest converts an invisible loss into an auditable event. When any of these conditions fails, the correct behavior is to reject the handoff and surface the specific missing precondition—not to fall back to "signature verified, proceed." ## Decision Boundary The boundary is between **verification** (does this artifact come from whom it claims?) and **authorization** (is this artifact a legal subset of what was granted?). Most federation stacks implement the first and assume the second. The decision rule: - If chain integrity fails → reject at transport, standard signature error. - If chain integrity passes but the child scope set is not a subset of the parent scope set under a shared grammar version → **reject as a containment violation**, regardless of who signed it. - If the child scope set is a strict subset and a signed `narrowing_manifest` is present and consistent → accept, and record the manifest in the audit trail as an intentional loss. - If the child scope set is a strict subset and **no** manifest is present → reject as an *undeclared narrowing*. This is the case the serializer bug produced, and it is the case a silent policy trim produces. They must be treated identically because the verifier cannot distinguish them. - If grammar versions differ between parent and child → reject as *incomparable scopes*; do not attempt best-effort token matching. The non-obvious part: an undeclared narrowing is a *more dangerous* signal than a signature failure. A signature failure is noisy and gets caught. An undeclared narrowing produces a valid chain that passes every cryptographic check and fails only at the leaf, three hops later, attributed to the wrong party. The decision boundary must therefore treat undeclared narrowing as a hard failure at the *handoff* boundary, not a soft warning to be reconciled downstream. ## Operational Effect Enforcing containment-at-handoff changes three things operationally. First, it makes the handoff boundary the single point of accountability: a peer that re-signs a narrower warrant must either declare it or have the handoff rejected, which removes the three-hop misattribution pattern entirely. Second, it forces grammar-version negotiation into the warrant envelope itself, so a v1/v2 skew is caught at mint time rather than at the leaf tool call. Third, it converts the silent policy trim into a first-class auditable event, which means the parent agent's reasoning about its own available scope can be reconciled against the actual downstream grant at every hop. The cost is that every verifier must parse and compare scope token sets, not just hash bytes. That is a real CPU and code-path cost, and it is the reason most stacks skip it. The alternative is what was observed: a chain that verifies perfectly, a task that fails at the leaf, and a supervisor that cannot tell whether the failure was a peer's serializer bug, a peer's budget policy, or a malicious trim—because the protocol never required the peer to say. ```python import hashlib from dataclasses import dataclass, field from typing import FrozenSet, Optional class ContainmentViolation(RuntimeError): """Raised when a re-signed child warrant is not a declared subset of its parent.""" pass class IncomparableScopeGrammar(ContainmentViolation): """Raised when parent and child warrants parse under different grammar versions.""" pass @dataclass(frozen=True) class Warrant: issuer: str subject: str scopes: FrozenSet[str] grammar_version: int narrowing_manifest: Optional[FrozenSet[str]] = None signature: str = "" def digest(self) -> str: body = f"{self.issuer}|{self.subject}|{sorted(self.scopes)}|{self.grammar_version}" return hashlib.sha256(body.encode()).hexdigest() def verify_handoff(parent: Warrant, child: Warrant, trusted_roots: FrozenSet[str]) -> None: # 1. Cryptographic layer: both artifacts must be signed by trusted issuers. if parent.issuer not in trusted_roots or child.issuer not in trusted_roots: raise ContainmentViolation( f"untrusted issuer: parent={parent.issuer} child={child.issuer}" ) if not parent.signature or not child.signature: raise ContainmentViolation("missing signature on warrant chain") # 2. Grammar layer: subset comparison is only defined under a shared grammar. if parent.grammar_version != child.grammar_version: raise IncomparableScopeGrammar( f"grammar skew: parent v{parent.grammar_version} vs child v{child.grammar_version}; " "containment is undefined, failing closed" ) # 3. Semantic layer: child scopes must be a subset of parent scopes. leaked = child.scopes - parent.scopes if leaked: raise ContainmentViolation( f"child warrant escalates beyond parent grant: {sorted(leaked)}" ) # 4. Narrowing layer: any strict subset must be declared in a signed manifest. trimmed = parent.scopes - child.scopes if trimmed: if child.narrowing_manifest is None: raise ContainmentViolation( f"undeclared narrowing: peer {child.issuer} dropped {sorted(trimmed)} " "without a signed narrowing_manifest; indistinguishable from serializer bug" ) if child.narrowing_manifest != trimmed: raise ContainmentViolation( f"manifest mismatch: declared {sorted(child.narrowing_manifest)} " f"but actual trim was {sorted(trimmed)}" ) # Handoff accepted: chain intact, containment holds, loss (if any) is auditable. return None # --- Trace of the observed failure --- alpha_grant = Warrant( issuer="alpha", subject="beta", scopes=frozenset({"read:dataset", "write:dataset", "invoke:summarizer"}), grammar_version=2, signature="sig_alpha_ok", ) # Beta's serializer dropped invoke:summarizer under an old grammar path, then signed. beta_resign = Warrant( issuer="beta", subject="gamma", scopes=frozenset({"read:dataset", "write:dataset"}), grammar_version=2, narrowing_manifest=None, signature="sig_beta_ok", ) verify_handoff(alpha_grant, beta_resign, trusted_roots=frozenset({"alpha", "beta"})) # -> raises ContainmentViolation: undeclared narrowing, caught at handoff, not at leaf. ```