# What happens when an instance negotiates a capability grant under a policy epoch that expires mid-handoff **Date of Record:** 2026 November 29 **Scope:** Applies to cross-org agent federations where capability grants are issued under a time-bounded policy epoch and audit records are written lazily (batched or at task completion). Does not apply to synchronous single-org tool calls where grant validation and audit write occur in the same transaction. ## Core Distinction Most federation designs treat a capability grant as a *point-in-time admission decision*: the grantor validates the request against its current policy epoch, mints a warrant (signed capability token with scope, grantee identity, and expiry), and hands it to the grantee. The grantee then executes a multi-step plan, invoking the capability repeatedly across tool calls that may span minutes to hours. The non-obvious failure is this: **the grant's validity is anchored to the policy epoch at mint time, but the audit trail's validity is anchored to the policy epoch at write time.** These are two different clocks. When a policy epoch rotates between the grant being exercised and the audit record being committed, the audit record is evaluated against a policy version that never authorized the action. The result is a *silently orphaned audit entry* — a record that exists, is cryptographically intact, and yet fails verification against the epoch it is filed under. The action happened; the authorization that permitted it is no longer reconstructable from the ledger. This is distinct from grant expiry (a grant past its `not_after` is simply rejected) and from revocation (an explicit invalidation event). The boundary condition here is that **both the grant and the action were valid, but their joint provenance is not reconstructable** because the two anchors moved independently. ## What Was Observed In a three-org federation (call them A = grantor, B = orchestrator/grantee, C = auditor), the following trace was captured during a policy rotation drill. 1. At `t0`, B requests capability `record.read` scoped to `dataset:fin-2024` from A. A is operating under policy epoch `E7`, which permits `record.read` for cross-org grantees with `assurance>=2`. A mints warrant `W` with `policy_epoch=E7`, `not_after=t0+3600s`, and `audit_hint=E7`. 2. B executes a 40-minute plan: 9 tool calls against A's `record.read` endpoint, each returning up to 50KB of records. Each call appends to B's local audit buffer (batched, flushed at task end — standard practice to avoid per-call write amplification across org boundaries). 3. At `t0+1800s`, A rotates policy: epoch `E7` → `E8`. `E8` *narrows* `record.read` to `assurance>=3` and, critically, **drops the `fin-2024` dataset from the cross-org allowlist entirely** (a compliance action, not a revocation of existing warrants — A's design explicitly grandfathers in-flight warrants). 4. At `t0+2400s`, B's plan completes. B flushes its audit batch to C. Each entry is signed by B and references `W`, `policy_epoch=E7`, and the individual call timestamps. 5. C's verifier fetches A's policy snapshot **by epoch ID from the audit entry** (`E7`). But A's policy store has already garbage-collected `E7`'s full text — it retains only a hash and a tombstone, because A's retention policy keeps full epoch text for the *current* and *previous* epoch only, and the rotation at step 3 plus a subsequent housekeeping job evicted `E7`'s body. 6. C cannot reconstruct whether `E7` actually permitted `record.read` on `fin-2024` for `assurance>=2`. The warrant `W` is intact and verifiable (A's signature checks out, `not_after` not exceeded at call time). But the *policy predicate* that `W` was minted under is gone. C marks the audit entries `UNVERIFIABLE_POLICY_BASIS`. The failure is not that any single component misbehaved. A correctly grandfathered the warrant. B correctly batched. C correctly verified what it could. The failure is that **the audit trail's evidentiary chain depends on a policy artifact whose lifetime was not co-terminous with the grants it authorized.** A second, subtler observation: in 3 of 9 calls, B's audit entry recorded `policy_epoch=E7` but the *call timestamp* fell after A's rotation at `t0+1800s` (calls 5–9). During those calls, A's endpoint was evaluating the request against `E8`'s allowlist at the *request-routing* layer while honoring `W` at the *authorization* layer. So the calls succeeded only because A's grandfathering logic short-circuited the `E8` allowlist check for valid warrants. Had A's grandfathering been implemented as "warrant valid AND current-epoch allowlist satisfied," calls 5–9 would have been rejected mid-plan — a partial-execution failure that B's planner had no recovery branch for, since it assumed grant validity implied call validity for the grant's lifetime. ## Condition of Validity The invariant that must hold for cross-epoch audit verification to be sound: > For every audit entry `e` referencing warrant `W` minted under policy epoch `E`, the full text of `E` (or a verifiable predicate commitment to it) MUST remain retrievable for at least `max(W.not_after) + audit_retention_window` across all federated parties that may verify `e`. Equivalently: **policy epoch retention must be bounded below by grant lifetime plus audit retention, not by a fixed epoch-count window.** The common `keep current + previous` rule violates this whenever a grant's `not_after` outlives two rotations, or whenever audit batches are flushed after a rotation that itself is followed by housekeeping. The condition fails in three concrete ways: - **Epoch eviction outpaces grant lifetime.** Retention by count (`keep N epochs`) is unbounded in time when rotations are frequent. - **Lazy audit flush crosses a rotation.** Batched writes commit under a later epoch than the calls they describe. - **Grandfathering decouples authorization from routing.** If the grantor honors old warrants but routes under new policy, the audit entry's epoch reference and the request's actual evaluation epoch diverge. ## Decision Boundary The architecture must choose, per capability class, between two disciplines — and must not blend them: **Discipline 1 — Epoch-pinned grants with co-terminous retention.** The grant's `not_after` is clamped to the policy epoch's own expiry (`W.not_after <= E.valid_until`). Audit entries are written synchronously or flushed before any epoch rotation the grantor will perform. Retention is computed as `max over outstanding grants of not_after + audit_window`, not as an epoch count. This is the correct choice for high-assurance capabilities (compliance-scoped reads, cross-org writes, anything that may be audited adversarially). **Discipline 2 — Predicate-committed grants with hash-anchored audit.** The grant carries not an epoch *ID* but a *commitment* to the exact policy predicate that authorized it (e.g., a Merkle leaf hash of the specific rule `record.read: fin-2024: assurance>=2`). The audit entry references the commitment. Verification requires only the predicate preimage, which the grantor can retain cheaply (a single rule, not a whole epoch) indefinitely. This permits lazy flush and frequent rotation, at the cost of more complex grant minting and the need for the grantor to serve predicate preimages on demand. The boundary rule: **if a capability's audit entries may be verified by a party other than the grantor, and the grantor rotates policy on a schedule shorter than the audit retention window, Discipline 2 is mandatory.** Discipline 1 is acceptable only when rotation is rare relative to grant lifetime and audit flush is synchronous. Blending — epoch-ID grants with lazy flush and count-based retention — is the configuration that produced the orphaned entries above. It is the default in most naive federation implementations because each component's local policy is individually reasonable. ## Operational Effect When the invariant is violated, the observable effects are: 1. **Silent audit orphaning.** Entries verify cryptographically but fail policy-basis reconstruction. They are not deleted; they accumulate as `UNVERIFIABLE_POLICY_BASIS` and pollute the ledger. Downstream compliance queries must special-case them, and the special-case is itself an attack surface (an adversary who can force epoch eviction can force entries into the unverifiable class, degrading the evidentiary value of legitimate actions). 2. **Partial-execution divergence under strict grandfathering.** If the grantor implements "warrant valid AND current allowlist" instead of pure grandfathering, mid-plan calls fail after rotation, and the grantee's planner — which assumed grant-lifetime call validity — has no recovery branch. The plan halts at an arbitrary step, leaving a half-executed state that the audit trail cannot cleanly describe (some calls authorized under `E7`, some rejected under `E8`, one grant). 3. **Auditor consensus split.** In multi-auditor federations, auditors that fetch policy snapshots at different times (some before eviction, some after) reach different verdicts on the *same* audit entry. This is a verification replay discrepancy driven not by nondeterminism in the agents but by nondeterministic artifact availability — a class of disagreement that replay-based consensus cannot resolve, because replaying the verification does not restore the evicted artifact. The guardrail is a **retention-floor assertion at grant mint time**: the grantor refuses to mint a warrant whose `not_after + audit_window` exceeds the retention horizon it can guarantee for the authorizing epoch (or predicate commitment). This converts a silent, delayed verification failure into an immediate, attributable mint-time rejection — which the requesting agent can handle by re-negotiating under a shorter grant or accepting a predicate-committed grant. The failure moves from the audit layer (where it is undetectable until verification) to the negotiation layer (where it is a typed, recoverable error). ```python from dataclasses import dataclass from datetime import datetime, timedelta class RetentionFloorViolation(RuntimeError): """Raised when a warrant's audit-reconstructability horizon exceeds the grantor's guaranteed retention for the authorizing policy artifact.""" pass @dataclass(frozen=True) class PolicyEpoch: epoch_id: str valid_until: datetime # Full text retained only until this instant; after this, only a hash remains. retained_until: datetime @dataclass(frozen=True) class WarrantRequest: capability: str scope: str requested_not_after: datetime audit_retention_window: timedelta def mint_warrant(epoch: PolicyEpoch, req: WarrantRequest) -> dict: """Mint a warrant only if the authorizing epoch's full text (or predicate commitment) will outlive the grant plus the audit retention window. Invariant enforced: epoch.retained_until >= req.requested_not_after + req.audit_retention_window """ required_horizon = req.requested_not_after + req.audit_retention_window if epoch.retained_until < required_horizon: raise RetentionFloorViolation( f"Cannot mint warrant for capability={req.capability!r} " f"scope={req.scope!r} under epoch={epoch.epoch_id!r}: " f"epoch text retained only until {epoch.retained_until.isoformat()}, " f"but audit reconstructability requires retention through " f"{required_horizon.isoformat()} " f"(not_after={req.requested_not_after.isoformat()} + " f"audit_window={req.audit_retention_window}). " f"Remediation: shorten grant lifetime, reduce audit window, " f"or require a predicate-committed grant (Discipline 2)." ) # Clamp grant to epoch validity so routing and authorization epochs cannot diverge. effective_not_after = min(req.requested_not_after, epoch.valid_until) return { "capability": req.capability, "scope": req.scope, "policy_epoch": epoch.epoch_id, "not_after": effective_not_after, "audit_reconstructable_until": epoch.retained_until, } def negotiate(epoch: PolicyEpoch, req: WarrantRequest) -> dict: """Entry point used by the federation negotiation layer. On violation, the caller receives a typed error it can recover from by re-negotiating under a shorter grant or a predicate-committed grant.""" return mint_warrant(epoch, req) if __name__ == "__main__": now = datetime(2025, 6, 14, 12, 0, 0) # Epoch rotates soon and its full text is evicted shortly after rotation. epoch = PolicyEpoch( epoch_id="E7", valid_until=now + timedelta(hours=1), retained_until=now + timedelta(hours=2), ) # Grantee asks for a 40-minute grant with a 24-hour audit window. req = WarrantRequest( capability="record.read", scope="dataset:fin-2024", requested_not_after=now + timedelta(minutes=40), audit_retention_window=timedelta(hours=24), ) try: warrant = negotiate(epoch, req) print("minted:", warrant) except RetentionFloorViolation as e: # Expected path: audit horizon (24h) exceeds epoch retention (2h). print("rejected at negotiation:", e) ```