Under what conditions must an instance refuse a brokered trust warrant whose policy closure is satisfiable only under a stale peer capability advertisement

**Date of Record:** 2026 December 1 **Scope:** Applies to cross-org federated agent meshes where a trust broker (a third-party warrant issuer) mints scoped capability warrants on behalf of a requesting agent to a remote peer, and where the peer's capability advertisement (tool schemas, rate limits, data-residency tags, model version) is cached and re-signed periodically. Does not apply to single-org meshes with a shared policy authority, nor to stateless request/response RPC where the caller re-negotiates on every hop.

Core Distinction

The failure is not "the broker issued a bad warrant" and not "the peer changed its capabilities." It is the *intersection*: a warrant whose policy closure is **satisfiable only against a capability advertisement that has since been superseded**, while the broker's signature and the peer's current advertisement are each individually valid. Every signature verifies. Every policy predicate evaluates true. The federation still executes an action the peer no longer authorizes, because the warrant's satisfiability proof was computed against a snapshot that the peer's own advertisement has already invalidated.

The distinguishing line: a *stale warrant* fails closed (policy predicate false → reject). A *stale capability advertisement* fails open (predicate true against an obsolete schema → accept). The dangerous case is the second, and it is invisible to signature checks because the advertisement was validly signed *when it was issued*. Trust brokering turns this into a cross-org problem because the broker and the peer are in different administrative domains with independent clock skew, independent revocation cadence, and no shared monotonic sequence.

What Was Observed

A three-party federation: requester agent `R` (org A), broker `B` (org B), peer agent `P` (org C). `P` publishes a signed capability advertisement `adv_P` with fields `{model_version, tool_schemas, max_rows_per_query, residency_tag, valid_until, seq}`. `B` caches `adv_P` for up to 15 minutes and mints warrants of the form `warrant(R→P, action, constraints)` where `constraints` are derived by intersecting `R`'s requested scope with `adv_P`.

Observed trace:

  1. `t=0`: `P` advertises `adv_P@seq=41`, `max_rows_per_query=10000`, `model_version=gpt-x-2026-03`, `residency_tag=EU`.
  2. `t=0`: `B` caches `adv_P@41`, signs it into its own trust root, and begins minting warrants satisfiable against it.
  3. `t=180s`: `P` rotates to `adv_P@seq=42` — `max_rows_per_query=500`, `model_version=gpt-x-2026-04`, `residency_tag=EU`. `P`'s policy engine now rejects any query with `rows>500` **at execution time**, and rejects any warrant referencing `model_version=gpt-x-2026-03` because that model was retired for a residency regression.
  4. `t=200s`: `R` requests a 9000-row query. `B` mints `warrant(R→P, query, {rows:9000, model:gpt-x-2026-03})` — satisfiable against cached `adv_P@41`, signature valid, `valid_until` 10 minutes out.
  5. `t=201s`: `R` presents the warrant to `P`. `P`'s execution-time policy check fails on `rows>500` **and** on retired `model_version`. `P` returns a policy-denial error.
  6. `R`'s orchestration layer treats the denial as a transient peer fault, retries twice with the same warrant, then escalates to `B` for re-issuance. `B` re-mints against the *same cached* `adv_P@41` because its cache TTL has not expired. Loop.

The observable signature is a **policy-denial storm against a valid warrant**: the peer rejects, the broker re-issues an equivalent warrant, the requester retries. No component logs an error; each believes the other is at fault. The actual invariant violation is that `B`'s satisfiability proof was computed over a capability snapshot `P` had already superseded, and neither `B` nor `R` had a mechanism to detect the supersession because `adv_P@42` was published to a channel `B` polls only on TTL expiry.

The subtlety that makes this non-obvious: `P` *did* the right thing (fail closed at execution). `B` *did* the right thing (mint against a signed, unexpired advertisement). `R` *did* the right thing (retry on denial). The system failed because the *warrant's satisfiability domain* and the *peer's execution domain* were allowed to drift apart by up to one cache TTL, and the drift was unobservable from any single vantage point.

Condition of Validity

A brokered warrant `w = warrant(R→P, action, constraints)` is **operationally valid** — meaning it will actually execute at `P` — only if all of the following hold simultaneously:

The critical structural fact: **signature validity and temporal validity are checkable by `P` alone; capability-snapshot currency is not**, because `P` cannot know which advertisement `B` minted against unless `w` carries that reference. A warrant that omits `capability_seq` (or an equivalent content hash of the advertisement) is *unfalsifiable* at the peer — `P` can only reject on execution-time policy, producing the denial storm rather than a clean pre-execution rejection.

The monotone-narrowing escape hatch: if `B` mints only constraints strictly narrower than the *minimum* across all advertisements it has seen for `P` within the TTL window, the warrant remains valid across supersession. In the trace above, `B` had seen only `@41`, so it could not narrow below `@41`'s limits — the escape hatch requires `B` to have observed `@42`, which it had not. This is why the failure is a *boundary* condition: it occurs exactly in the window between `P`'s supersession and `B`'s next poll, and only for constraints that `@42` narrowed.

Decision Boundary

The decision rule for the requester instance `R` (and for `B` on re-issuance) is:

**Refuse to present, and refuse to re-mint, any warrant whose `capability_seq` is not provably current at the peer — where "provably current" means either (a) the warrant carries a `capability_seq` equal to the peer's latest advertisement as observed by the requester within the last `δ` seconds, or (b) the warrant's constraints are provably a monotone narrowing of the peer's *minimum* advertised capability across the broker's entire observation window.**

Concretely, `R` must **not** retry a policy-denial with the same warrant, and must **not** accept a re-minted warrant from `B` that carries the same `capability_seq` as the denied one. The denial is evidence that `B`'s snapshot is stale; re-minting against the same snapshot reproduces the failure deterministically. The correct action is to force a cache-bypass re-fetch of `adv_P` (a `capability_refresh` call to `P` directly, or a broker cache invalidation), then re-mint against the refreshed snapshot, then re-present.

The boundary is sharp: **one denial with a validly-signed warrant is a stale-snapshot signal, not a transient fault.** Retrying it is the failure mode. The retry budget for a policy-denial-against-valid-warrant must be zero; the budget for a *transport* failure (timeout, connection reset) may be greater than zero. Conflating the two — treating a policy denial as retryable — is what converts a single stale-snapshot event into a denial storm.

For the broker `B`: a warrant must never be minted without an explicit `capability_seq` field bound to the advertisement snapshot used for satisfiability, and `B` must propagate `P`'s supersession to outstanding warrants by either (i) short-circuiting `valid_until` to `min(valid_until, adv.valid_until)` and (ii) issuing a revocation event on supersession for any warrant whose constraints are *not* a monotone narrowing of the new advertisement. A warrant that is satisfiable only under the old snapshot must be revoked at supersession, not left to fail at execution.

Operational Effect

When the invariant is enforced, the failure trace terminates at step 5 with a *clean* pre-execution rejection that carries the stale `capability_seq`, allowing `R` to distinguish "peer policy denies" from "broker snapshot stale" and to route the latter to cache-bypass refresh. The denial storm collapses to a single refresh-and-retry. The cost is one extra round-trip to `P` on the boundary event, paid only in the supersession window.

When the invariant is violated, the effect is not a crash but a **silent liveness degradation**: the federation remains "up," warrants continue to verify, and the only symptom is a rising rate of policy denials concentrated on a specific `(R, P)` pair, correlated with `P`'s advertisement rotation cadence. Because each component's local logs are clean, the failure is typically diagnosed as a peer policy misconfiguration and escalated across org boundaries — a trust incident that is actually a cache-coherence bug. In multi-org settings this is expensive: it burns inter-org trust budget, triggers manual policy review, and can cause a peer to be temporarily de-federated for a defect that lives entirely in the broker's snapshot-currency logic.

The durable guardrail is to make `capability_seq` a first-class field in the warrant schema (not an optional annotation), to bind `warrant.valid_until ≤ adv.valid_until` at mint time, and to treat any policy-denial-against-validly-signed-warrant as a mandatory cache-bypass trigger with a zero retry budget. The broker must additionally maintain a *minimum-capability watermark* per peer so that monotone-narrowing warrants can be minted safely across supersession windows without requiring a refresh on every request.

from __future__ import annotations

import time
from dataclasses import dataclass, field
from typing import Optional


class StaleCapabilityWarrantError(RuntimeError):
    """Raised when a brokered warrant's capability snapshot is not provably
    current at the peer, or when a policy denial against a validly-signed
    warrant is treated as retryable instead of as a stale-snapshot signal."""


@dataclass(frozen=True)
class CapabilityAdvertisement:
    seq: int
    model_version: str
    max_rows_per_query: int
    residency_tag: str
    valid_until: float


@dataclass(frozen=True)
class Warrant:
    requester: str
    peer: str
    action: str
    constraints: dict
    capability_seq: int
    valid_until: float
    signature_valid: bool = True


@dataclass
class BrokerCache:
    peer: str
    advertisement: CapabilityAdvertisement
    fetched_at: float
    ttl_seconds: float = 900.0

    def is_fresh(self, now: float) -> bool:
        return (now - self.fetched_at) < self.ttl_seconds


def mint_warrant(
    cache: BrokerCache,
    requester: str,
    action: str,
    constraints: dict,
    now: float,
) -> Warrant:
    if not cache.is_fresh(now):
        raise StaleCapabilityWarrantError(
            f"broker cache for {cache.peer} expired; refusing to mint against "
            f"advertisement seq={cache.advertisement.seq}"
        )
    adv = cache.advertisement
    if constraints.get("rows", 0) > adv.max_rows_per_query:
        raise StaleCapabilityWarrantError(
            f"requested rows={constraints['rows']} exceed advertised "
            f"max_rows_per_query={adv.max_rows_per_query} at seq={adv.seq}"
        )
    return Warrant(
        requester=requester,
        peer=cache.peer,
        action=action,
        constraints=constraints,
        capability_seq=adv.seq,
        valid_until=min(now + 600.0, adv.valid_until),
    )


def present_warrant(
    warrant: Warrant,
    peer_current: CapabilityAdvertisement,
    now: float,
    retry_budget_for_policy_denial: int = 0,
) -> None:
    if not warrant.signature_valid:
        raise StaleCapabilityWarrantError("warrant signature invalid")

    if now >= warrant.valid_until:
        raise StaleCapabilityWarrantError("warrant expired")

    if warrant.capability_seq != peer_current.seq:
        # The peer has superseded the advertisement the broker minted against.
        # This is a stale-snapshot signal, not a transient fault.
        raise StaleCapabilityWarrantError(
            f"warrant minted against capability_seq={warrant.capability_seq} "
            f"but peer is at seq={peer_current.seq}; force cache-bypass refresh "
            f"before re-minting"
        )

    rows = warrant.constraints.get("rows", 0)
    if rows > peer_current.max_rows_per_query:
        # Policy denial against a validly-signed warrant. Retry budget MUST be
        # zero: retrying reproduces the failure deterministically.
        if retry_budget_for_policy_denial > 0:
            raise StaleCapabilityWarrantError(
                "policy denial against valid warrant treated as retryable; "
                "this is the denial-storm failure mode"
            )
        raise StaleCapabilityWarrantError(
            f"peer policy denies rows={rows} > {peer_current.max_rows_per_query}"
        )