# In what scenarios must an instance treat a negotiated capability scope as revoked when a federated peer re-signs its policy manifest mid-session **Date of Record:** 2026 December 1 **Scope:** Applies to cross-organization agent federations where a peer agent's authorization to invoke capabilities is conveyed by a signed policy manifest (capability grant + scope constraints) that is re-issued during an active session. Does not apply to single-org agent meshes with a shared trust root, nor to stateless request/response tool calls that re-authenticate per invocation. ## Core Distinction The distinction that matters is between **manifest freshness** and **manifest continuity**. A federated peer re-signing its policy manifest is normally treated as a freshness event: the peer rotated a key, extended an expiry, or added a capability, and the receiving instance should refresh its cached grant. But a re-signed manifest is also a *new authorization artifact*, and the scope constraints it carries are not guaranteed to be a superset of the previous ones. The non-obvious boundary is this: **a capability that was in-scope under manifest version N is not automatically in-scope under version N+1, even when the capability identifier is byte-identical.** The receiving agent must treat re-signing as a potential scope *narrowing* (or a scope *re-binding* to different resource selectors), not merely as a liveness refresh. Continuity of the capability *name* is not continuity of the capability *warrant*. This is distinct from key rotation. Key rotation preserves the semantic content of the grant and changes only the signer. Scope re-negotiation preserves the signer and changes the semantic content. The two arrive on the same wire channel (a new signed manifest) and are routinely conflated by receiving agents that cache grants by capability name and validate only the signature. ## What Was Observed In a two-org federation, Org A's orchestrator agent held a grant from Org B's auditor agent to invoke `read_ledger_range` with a scope constraint of `account_set = {acct_4471, acct_4472}` and `max_rows = 5000`. The grant was cached keyed by capability name `read_ledger_range`, with the manifest's signature verified at cache-fill time and an expiry of 3600s. At t+1840s, Org B's policy engine re-issued the manifest. The re-issue was triggered by an internal access review that removed `acct_4472` from the account set (the account had been reclassified) and lowered `max_rows` to 2000. The signer was unchanged, the capability name was unchanged, and the manifest's `version` field incremented from `7` to `8`. Org B's manifest endpoint pushed the new manifest to all active federation peers as a routine update. Org A's receiving agent processed the push. Its manifest handler did the following: verified the signature against the cached peer public key (valid), checked that the signer identity matched the cached peer identity (matched), and then — because the handler's cache-invalidation logic was keyed on `(peer_id, capability_name)` — concluded the manifest was "the same grant, refreshed" and updated only the `expiry` and `version` fields. The scope constraint object was *not* re-read because the cache key had matched and the handler short-circuited on "unchanged grant." The orchestrator then continued a batch job. At t+1902s it invoked `read_ledger_range` for `acct_4472` with `max_rows = 4200`. Org B's enforcement point rejected the call: `acct_4472` was no longer in the authorized account set, and 4200 exceeded the new `max_rows` of 2000. The rejection was correct at the enforcement layer. But the orchestrator had already *planned* the remainder of the batch around the assumption that `acct_4472` was readable — it had emitted a downstream commitment (a derived aggregate written to Org A's own ledger) that depended on reading `acct_4472`. The invocation failure surfaced 62 seconds after the scope had actually been revoked, and the orchestrator had no mechanism to distinguish "transient enforcement error, retry" from "capability scope permanently narrowed, replan." The failure trace has three phases: 1. **Silent narrowing (t+1840 to t+1902):** The manifest push arrived, was signature-verified, and was accepted as a refresh. The scope delta (`acct_4472` removed, `max_rows` 5000→2000) was never computed because the handler treated a matching cache key as proof of semantic equivalence. 2. **Stale-plan execution (t+1902):** The orchestrator issued an invocation valid under manifest v7 but invalid under v8. The enforcement point rejected it — the *enforcement* layer was correct and current; the *planning* layer was stale. 3. **Misattributed recovery (t+1903 onward):** The orchestrator's tool-call wrapper classified the rejection as a `TransientPolicyError` (a retryable class it used for rate-limit and eventual-consistency rejections), retried twice with backoff, then escalated to a human. The human had to reconstruct that the scope had narrowed 62 seconds earlier, because the orchestrator's own logs recorded the manifest push as a no-op refresh. The root cause is not a signature failure or a transport failure. It is a **cache-key equivalence error**: the receiving agent's invalidation logic assumed that `(peer_id, capability_name)` identity implies scope identity. In a federation where policy is re-negotiated, that assumption is false, and the false assumption is invisible because the manifest push *looks* like a routine refresh. ## Condition of Validity The "re-signing is a refresh" assumption is valid only under a conjunction of conditions that federated policy negotiation routinely violates: - **Monotone scope:** every re-issued manifest's scope constraints are a superset of the prior version's. This holds for capability *additions* and key rotation, and fails for access reviews, incident-driven narrowing, data-classification changes, and regulatory re-scoping — all of which are narrowing events. - **Signer–content coupling:** the signer identity uniquely determines the scope semantics, so a matching signer implies matching scope. This fails whenever a single policy engine (one signer) serves multiple scope regimes that change independently of the signer. - **Push-then-enforce atomicity:** the enforcement point and the peer's cached grant flip to the new scope at the same instant. In practice the enforcement point flips on manifest publication, while the peer's cache flips on manifest *processing* — and the two are separated by network latency, queue depth, and the peer's own handler logic. - **Capability-name stability:** the capability identifier is a stable handle for a stable semantic operation. This fails when a capability is re-scoped rather than re-versioned — the same name now denotes a narrower operation. When any of these fails, the receiving agent's cached grant is a *stale warrant*: it is signature-valid, unexpired, and semantically wrong. The window between manifest publication and the peer's next invocation is precisely the window in which the peer will plan against a scope that no longer exists. ## Decision Boundary The operational rule is: **on receipt of a re-signed manifest for a capability already cached, the receiving agent must compute a scope delta and must treat any non-superset delta as a revocation of the prior grant, not a refresh of it.** The delta computation is over the *scope constraint object*, not the capability name. Concretely: - If every constraint in v(N+1) is equal to or looser than v(N), the grant is refreshed in place; the cache key `(peer_id, capability_name)` may be retained. - If any constraint in v(N+1) is stricter than v(N) — a removed resource selector, a lowered numeric bound, a narrowed time window, an added required precondition — the prior grant is **revoked** and the new grant is installed under a new cache key that includes the manifest version. Any in-flight plan that was constructed under v(N) and has not yet committed must be invalidated and replanned, not retried. - If the delta cannot be computed because the scope constraint schema itself changed (the peer introduced a new constraint dimension the receiver does not model), the safe default is revocation: the receiver must not assume the unmodeled dimension is permissive. The boundary between "retry" and "replan" is the same boundary. A rejection from a peer's enforcement point is retryable only if the receiver can prove the rejection is not attributable to a scope delta it failed to apply. The cheap proof is: the receiver's cached manifest version equals the peer's current manifest version *at the time of the rejection*. If the receiver cannot establish that, the rejection must be classified as a scope event and routed to replanning, because a retry under a stale plan will re-issue the same out-of-scope invocation and compound the divergence. ## Operational Effect The downstream consequence of getting this boundary wrong is not a single failed call — it is **plan divergence under a stale warrant**. The orchestrator's plan was constructed against a scope that included `acct_4472`; the derived aggregate it emitted depended on that read; the read was rejected; the retry loop burned budget against a permanently-revoked scope; and the human escalation arrived with a log that recorded the revocation as a no-op refresh. The 62-second window between publication and enforcement is the *minimum* exposure; the actual exposure is the time from publication to the orchestrator's next replan, which in this case was unbounded because the handler never triggered a replan. The architectural invariant required to bound this is: **a federated grant is identified by `(peer_id, capability_name, manifest_version, scope_digest)`, and the scope_digest is recomputed on every manifest receipt.** Cache hits require all four components to match. A manifest push that changes only `manifest_version` and `scope_digest` — with identical signer and capability name — is a scope event, and the receiving agent must (a) invalidate any plan whose steps reference the prior `(capability_name, manifest_version)` pair, (b) recompute the plan's resource footprint against the new scope, and (c) refuse to retry any invocation rejected by the peer's enforcement point until the cached `manifest_version` is confirmed equal to the peer's current version. The receiving agent must also emit an explicit `scope_narrowed` event into its own episodic memory, because the failure mode is precisely that the narrowing is forgotten — the next cold start will re-fetch the current manifest and be correct, but the *session* that lived through the narrowing will not, unless the event is recorded. The subtlety that makes this a boundary condition rather than a bug is that the correct behavior (treat re-signing as potential revocation) and the common behavior (treat re-signing as refresh) are indistinguishable until a narrowing event occurs, and narrowing events are rare relative to refreshes. A receiver that treats every re-signing as a revocation will over-invalidate and thrash; a receiver that treats every re-signing as a refresh will silently diverge on the rare narrowing. The scope-digest invariant is the only construction that distinguishes the two without over-invalidating, because it makes the distinction depend on the *content* of the delta rather than on the *fact* of the push. ```python import hashlib import json from dataclasses import dataclass, field from typing import Any class StaleWarrantError(RuntimeError): """Raised when a plan or invocation is issued against a grant whose scope has been narrowed by a re-signed manifest that the receiver has not applied.""" class ScopeDeltaUnmodeledError(RuntimeError): """Raised when a re-signed manifest introduces a scope constraint dimension the receiver cannot interpret; the safe default is revocation, not refresh.""" @dataclass(frozen=True) class Grant: peer_id: str capability_name: str manifest_version: int scope: dict[str, Any] @property def scope_digest(self) -> str: canonical = json.dumps(self.scope, sort_keys=True, separators=(",", ":")) return hashlib.sha256(canonical.encode("utf-8")).hexdigest() @property def cache_key(self) -> tuple[str, str, int, str]: return (self.peer_id, self.capability_name, self.manifest_version, self.scope_digest) def _is_superset(new: dict[str, Any], old: dict[str, Any]) -> bool: """True iff every constraint in `old` is equal to or looser than in `new`. Only models the dimensions this receiver understands; unknown dimensions must be routed to ScopeDeltaUnmodeledError by the caller.""" for key, old_val in old.items(): if key not in new: raise ScopeDeltaUnmodeledError(f"constraint dimension {key!r} disappeared") new_val = new[key] if isinstance(old_val, set) and isinstance(new_val, set): if not old_val.issubset(new_val): return False elif isinstance(old_val, (int, float)) and isinstance(new_val, (int, float)): if new_val < old_val: # numeric bound tightened return False elif old_val != new_val: return False return True class FederatedGrantCache: def __init__(self) -> None: self._grants: dict[tuple[str, str], Grant] = {} self._revoked: set[tuple[str, str, int]] = set() def install(self, grant: Grant) -> None: self._grants[(grant.peer_id, grant.capability_name)] = grant def on_manifest_push(self, new: Grant) -> str: """Returns 'refreshed' or 'revoked'. Raises on unmodeled delta.""" prior = self._grants.get((new.peer_id, new.capability_name)) if prior is None: self.install(new) return "refreshed" if prior.scope_digest == new.scope_digest: self.install(new) # pure refresh: signer/version only return "refreshed" if _is_superset(new.scope, prior.scope): self.install(new) # monotone widening return "refreshed" # Non-superset delta: this is a revocation of the prior warrant. self._revoked.add((prior.peer_id, prior.capability_name, prior.manifest_version)) self.install(new) return "revoked" def assert_invocable(self, peer_id: str, capability_name: str, manifest_version: int) -> Grant: grant = self._grants.get((peer_id, capability_name)) if grant is None: raise StaleWarrantError(f"no grant cached for {peer_id}/{capability_name}") if (peer_id, capability_name, manifest_version) in self._revoked: raise StaleWarrantError( f"plan references manifest v{manifest_version} for " f"{peer_id}/{capability_name}, which was revoked by a scope narrowing" ) if grant.manifest_version != manifest_version: raise StaleWarrantError( f"plan built against v{manifest_version}, cache holds v{grant.manifest_version}; " f"replan required before retry" ) return grant ```