# When must an instance re-derive a peer's capability envelope after a warrant rotation, and why the naive re-negotiation path silently widens scope **Date of Record:** 2026 November 26 **Scope:** Applies to A2A/MCP-style agent meshes where a caller instance holds a signed capability warrant (or attenuated token) describing a peer's permitted tools, and where that warrant can rotate, expire, or be re-issued mid-session. Does not cover static single-tenant tool registries or cases where capability envelopes are immutable for the lifetime of a process. ## Core Distinction The failure is not "the warrant expired." Every mesh handles expiry. The failure is the **rotation gap**: the interval in which a peer's *outer* cryptographic identity (key material, issuer, warrant ID) has changed but its *inner* capability envelope (the set of tools, schema versions, and side-effect classes it will actually honor) has not yet been re-attested by the new identity. During this gap, a caller that re-negotiates naively — by re-querying the peer's advertised `capabilities` manifest and trusting it — accepts a *self-asserted* envelope from an identity it has not yet pinned. The peer's manifest is now a claim, not a fact. The caller conflates "this peer says it can do X" with "this peer is warranted to do X under an identity I have verified," and the two diverge precisely at rotation. The distinction that matters operationally: **a capability envelope is bound to an identity, not to an endpoint.** If you cache an envelope keyed by endpoint URL (the natural thing to do, because URLs are stable and keys are not), a rotation invalidates the binding without invalidating the cache key. The cache hits, the envelope is stale-but-plausible, and the caller proceeds against a peer whose authority to honor that envelope is unverified. ## What Was Observed A three-agent pipeline: an orchestrator `O`, a retrieval agent `R`, and a write-capable action agent `A`. `O` held a warrant `W_A` issued by a control plane, attenuating `A` to `{search, fetch, draft}` but explicitly excluding `commit`. `O` cached `A`'s envelope keyed by `A`'s endpoint `https://a.mesh/exec`, populated at session start from a verified manifest (manifest hash checked against the warrant's `envelope_digest` field). At T+41min, `A`'s key rotated (scheduled 45-min rotation). `A` re-registered with the control plane under a new key `K_A'` and a new warrant `W_A'` whose envelope was `{search, fetch, draft, commit}` — a *broader* envelope, because the rotation coincided with an on-call operator granting `A` commit rights for an unrelated incident. `A`'s endpoint did not change. `A`'s manifest endpoint (`/manifest`) now served the new, broader envelope, correctly signed by `K_A'`. `O` did not observe the rotation event (it was not in `O`'s subscription). At T+44min, `O`'s cached envelope for `https://a.mesh/exec` was still `{search, fetch, draft}`. `O` attempted a `draft` call; `A` accepted it. At T+47min, `O`'s cache TTL (5min) expired, `O` re-fetched `/manifest`, received the broader envelope signed by `K_A'`, and — because `O`'s re-negotiation routine verified *the signature on the manifest* but did not re-verify that `K_A'` was the key bound in `O`'s held warrant `W_A` — accepted `{search, fetch, draft, commit}` as `A`'s envelope. The trace: ``` T+41 A.key: K_A -> K_A' (rotation; O unaware) T+44 O.cache[endpoint] = {search,fetch,draft} (stale, still W_A-derived) T+44 O -> A: draft(...) (accepted; A honors under W_A') T+47 O.cache TTL expires T+47 O -> A/manifest (returns {search,fetch,draft,commit}, signed K_A') T+47 O verifies manifest sig (valid under K_A') T+47 O does NOT check K_A' == W_A.bound_key (W_A still names K_A) T+47 O.cache[endpoint] = {search,fetch,draft,commit} (SCOPE WIDENED) T+49 O -> A: commit(...) (O believes it is warranted to request commit) ``` The `commit` call succeeded. `O` had, in effect, laundered a broader capability into its own working set by trusting a self-asserted manifest from an identity it had not pinned. `O`'s *intent* was to respect `W_A`'s exclusion of `commit`; its *implementation* respected only "whatever the current manifest says." The warrant `W_A` in `O`'s possession still excluded `commit` — but nothing in the re-negotiation path consulted it. The invariant that was violated: **an envelope accepted into a caller's working set must be a function of (verified peer identity, caller's held warrant), not of (endpoint, peer's self-assertion).** The cache key `endpoint` collapsed identity into a mutable string, and the re-negotiation routine verified the *manifest's* signature rather than the *binding* between the manifest's signer and the caller's warrant. ## Condition of Validity This failure requires all of the following to co-occur; remove any one and the naive path is safe: 1. **Endpoint stability across rotation.** If the peer's endpoint changes with its key (e.g., key-derived URLs), the cache misses and the caller is forced to re-negotiate from scratch, which typically re-fetches the warrant. The bug hides behind endpoint churn. 2. **Manifest self-assertion.** The peer serves its own envelope. If the envelope is only ever delivered inside a control-plane-signed warrant, the caller cannot be misled by a peer's manifest. 3. **Signature-without-binding verification.** The caller checks "is this manifest signed by *some* key I can validate" rather than "is this manifest signed by the key my warrant names." This is the load-bearing defect: it is a *correct-looking* check (the signature is valid) that answers the wrong question. 4. **A rotation that widens scope.** If rotation is scope-preserving, the stale-cache and re-fetch paths both yield the same envelope and the bug is invisible. The failure is only *observable* when the new identity carries a broader (or merely different) envelope than the caller's warrant permits. 5. **No rotation event on the caller's subscription.** If `O` is notified of `A`'s rotation, it can invalidate the cache and re-pin before re-negotiating. The bug lives in the un-notified path. The condition of validity is therefore narrow but *not* exotic: stable endpoints, self-served manifests, signature-only verification, scope-widening rotations, and best-effort rotation notification are all common defaults. The combination is the norm in early-stage meshes, which is why this failure recurs. ## Decision Boundary The decision the caller must make at every re-negotiation is binary and must be made *before* the manifest is parsed: > **Is the signer of this manifest the key bound in the warrant I currently hold, and is that warrant unexpired and unrevoked?** If yes: accept the manifest's envelope, but **intersect** it with the warrant's `envelope_digest`-implied envelope. The manifest may narrow the warrant (a peer declining a capability it is warranted for is fine); it may never widen it. The accepted envelope is `manifest ∩ warrant`. If no: the peer has rotated out from under your warrant. You must **not** accept the manifest. You must re-acquire a warrant naming the new key from the control plane (or fail closed). The manifest is, at this moment, an unauthenticated claim by an identity you have not pinned. The boundary is sharp: **re-negotiation is a two-input operation (identity, warrant), and a one-input implementation (manifest) is always wrong**, even when it appears to work because the manifest happens to match the warrant. The apparent success under scope-preserving rotations is what allows the one-input implementation to survive code review and testing; it fails only on the rotation that matters. A corollary boundary: **cache invalidation must be keyed on identity, not endpoint.** The cache key should be `(peer_id, bound_key_fingerprint)`. A rotation changes the fingerprint, the cache misses, and the miss *forces* the caller down the two-input path. Endpoint-keyed caches cannot express this, because the endpoint is precisely the thing that does not change when identity does. ## Operational Effect The immediate effect is **silent scope widening**: the caller's working set of permitted actions grows to match the peer's new self-asserted envelope, and the caller's held warrant — the artifact that was supposed to bound it — becomes decorative. Downstream, this manifests as: - **Audit divergence.** The control plane's logs show `O` acting under `W_A` (which excludes `commit`); `O`'s own logs show `commit` as permitted. Reconciliation fails because the two systems disagree about what `O` was allowed to do, and neither is lying — they are answering different questions. - **Blast-radius inheritance.** Any *other* caller that shares `O`'s cache (a common optimization: one warm cache per peer, shared across a fleet) inherits the widened envelope. A single un-notified rotation can widen the effective authority of every caller behind that cache, none of which individually made a bad decision. - **Revocation escape.** If `W_A` is later revoked (not rotated), a caller whose cache was populated via the one-input path has no record of *which* warrant authorized the cached envelope, and cannot determine whether the revocation applies. It will typically keep using the envelope until TTL, extending the revocation's effective latency by up to one cache period. The bounding guardrail is structural, not procedural: **make the manifest unparseable without the warrant.** Concretely, require the peer's manifest response to carry a `bound_key_fingerprint` field, and require the caller to hold a warrant whose `bound_key_fingerprint` matches before the manifest is admitted to the parser. A mismatch raises before any envelope bytes are interpreted. This converts the silent widening into a loud, attributable failure at the exact rotation boundary, and it makes the one-input path *unrepresentable* rather than merely discouraged. The second guardrail: **rotation events must be on the caller's subscription, and a missed event must be detectable.** A caller that has not received a rotation event for a peer within `2 × rotation_interval` must treat the peer as un-pinned and re-verify before its next call, regardless of cache TTL. TTL alone is insufficient because TTL is tuned for envelope freshness, not identity freshness, and the two have different clocks. ```python import hashlib from dataclasses import dataclass class CapabilityBindingError(RuntimeError): """Raised when a peer manifest cannot be bound to the caller's held warrant.""" pass @dataclass(frozen=True) class Warrant: peer_id: str bound_key_fingerprint: str permitted: frozenset[str] expires_at: float revoked: bool = False @dataclass(frozen=True) class Manifest: peer_id: str signer_fingerprint: str advertised: frozenset[str] signature_valid: bool def fingerprint(public_key_pem: bytes) -> str: return hashlib.sha256(public_key_pem).hexdigest() def negotiate(warrant: Warrant, manifest: Manifest, now: float) -> frozenset[str]: """ Two-input re-negotiation. Returns the effective envelope as manifest ∩ warrant. Fails closed on any identity/warrant mismatch. Never returns a superset of the warrant's permitted set, even if the manifest advertises more. """ if warrant.revoked: raise CapabilityBindingError( f"warrant for {warrant.peer_id} is revoked; refusing re-negotiation" ) if now >= warrant.expires_at: raise CapabilityBindingError( f"warrant for {warrant.peer_id} expired at {warrant.expires_at}" ) if not manifest.signature_valid: raise CapabilityBindingError( f"manifest from {manifest.peer_id} has invalid signature" ) if manifest.peer_id != warrant.peer_id: raise CapabilityBindingError( f"manifest peer {manifest.peer_id} != warrant peer {warrant.peer_id}" ) # The load-bearing check: signer must be the key the warrant names. if manifest.signer_fingerprint != warrant.bound_key_fingerprint: raise CapabilityBindingError( f"rotation gap: manifest signer {manifest.signer_fingerprint} " f"!= warrant-bound key {warrant.bound_key_fingerprint} for " f"{warrant.peer_id}; re-acquire warrant before proceeding" ) # Envelope is intersection: manifest may narrow, never widen. return frozenset(manifest.advertised) & frozenset(warrant.permitted) def admit_call(warrant: Warrant, manifest: Manifest, tool: str, now: float) -> None: envelope = negotiate(warrant, manifest, now) if tool not in envelope: raise CapabilityBindingError( f"tool {tool!r} outside effective envelope {sorted(envelope)} " f"for {warrant.peer_id}" ) ```