# Under what conditions must an instance treat a rotated AAIF signing key as a new principal rather than a continuing one **Date of Record:** 2026 November 29 **Scope:** Applies to AAIF (Agent Authority & Identity Framework) credential rollover for long-lived agent instances that hold delegated warrants and mid-task state across a key rotation event. Does not apply to short-lived ephemeral sub-agents whose lifetime is bounded inside a single signing epoch, nor to rotation of transport-layer TLS keys that never appear in warrant chains. ## Core Distinction The non-obvious boundary is this: **a key rotation that preserves the principal identifier is not the same as a rotation that preserves the principal's authority.** AAIF separates two things that most engineers conflate—the *subject binding* (the stable `principal_id` + `agent_instance_id` tuple) and the *warrant chain* (the cryptographically signed delegation path that authorizes each action). Rotation swaps the verification key material while keeping the subject binding intact. The failure mode arises because downstream verifiers, caches, and auditors frequently key their trust decisions on the *signing key fingerprint* rather than on the subject binding, so a "zero-downtime" rotation silently partitions the agent population into two mutually-distrusting cohorts for the duration of overlap. The invariant that must hold: **for any action, the verifier's decision must be a function of (subject_binding, warrant_chain, epoch_manifest), not of the raw signing key alone.** When this invariant is violated, rotation is not zero-downtime—it is a split-brain. ## What Was Observed A long-running orchestrator agent (`agent-instance-7f3a`) held a delegated warrant from a human principal, authorizing it to call a downstream settlement tool. The warrant had a 72-hour TTL. At T+41h, the AAIF control plane performed a scheduled signing-key rotation for the orchestrator's *own* signing identity—the key it uses to co-sign its child warrants and tool-call attestations. The rotation was executed in the standard two-phase pattern: Phase A published the new public key (`fp:9c2e...`) to the JWKS endpoint and marked the old key (`fp:4a1d...`) as `retiring` with a 30-minute grace window. Phase B, at T+41h30m, removed the old key from the active set. Three things broke, none of them at the control plane: 1. **Verifier-side key cache staleness.** The settlement tool's verifier cached the JWKS for 60 minutes (its default `Cache-Control` honored naively). During the 30-minute overlap it never saw `fp:9c2e...`. At T+41h30m the old key was retired; the verifier's cache still held `fp:4a1d...` as valid until T+42h. Calls signed with the new key were rejected as `unknown_key` for the 30 minutes between T+41h30m and T+42h. The orchestrator interpreted these as transient and retried—but each retry re-signed with the new key, producing an identical rejection. **Error compounding across a deterministic rejection loop.** 2. **Warrant re-issuance ambiguity.** Child warrants the orchestrator had minted *before* T+41h were signed with `fp:4a1d...`. After rotation, a strict verifier that requires the warrant signer's key to be in the *current* active set rejected those child warrants entirely—even though they were minted legitimately and their TTL had not expired. The framework's own spec was ambiguous: it said retired keys "must not be used to sign new material" but did not state whether they remained valid for *verifying* previously-signed material. Two verifiers in the same fleet interpreted this oppositely. 3. **Auditor replay divergence.** The compliance auditor, replaying the action log after the fact, reconstructed the trust graph by resolving each signature against the key set *as of replay time* rather than *as of signing time*. Every pre-rotation signature resolved to a retired key and was flagged `SIGNATURE_UNVERIFIABLE`. The auditor's verdict diverged from the live verifier's verdict for the exact same actions—a verification replay discrepancy that would have triggered a false incident report had the operator not caught it. The rotation was "zero-downtime" by the control plane's own metrics (no 5xx at the JWKS endpoint, no dropped connections). It was a 30-minute partial outage at the enforcement layer, and a permanent audit-integrity defect. ## Condition of Validity The zero-downtime claim for an AAIF rotation is valid **only if all four of the following hold simultaneously**: 1. **Grace window ≥ maximum verifier cache TTL + maximum in-flight request lifetime.** The 30-minute grace was shorter than the 60-minute verifier cache. This is the arithmetic that must be checked *before* rotation, not discovered during it. Formally: `grace_window > max(verifier_cache_ttl) + max(request_rtt) + clock_skew_budget`. 2. **Retired keys remain in the verification set for the full TTL of any material they signed.** A retired key is retired for *signing*, not for *verification*. The verification set must retain a key until `max(remaining TTL of all outstanding warrants signed by it) + audit retention horizon`. This is the invariant the spec left ambiguous and the fleet interpreted inconsistently. 3. **Every verifier resolves signatures against an epoch-anchored key set, not a wall-clock-current one.** The signature must carry (or the attestation must bind) the `key_epoch` at signing time; verification resolves against that epoch's manifest, which is immutable. Replay against a mutable "current" set is the auditor's bug. 4. **The subject binding is the trust anchor, and the signing key is merely evidence.** Any component that keys a trust decision on `fingerprint` instead of `(principal_id, agent_instance_id)` is non-conformant and will split-brain on rotation. If any of these fails, the correct classification is **not** "degraded zero-downtime rotation" but **"identity discontinuity event"**—and the agent must treat itself as a new principal for the affected operations until the discontinuity is reconciled. ## Decision Boundary The operational question an instance must answer at the moment it detects a rotation affecting its own signing identity is: *do I continue the current task under my existing subject binding, or do I re-establish identity as a fresh principal?* The boundary is drawn by whether the instance's outstanding work depends on signatures that will fall outside the new verification envelope: - **Continue as continuing principal** when: all outstanding child warrants and attestations were signed with keys that remain in the epoch-anchored verification set for their full TTL, AND every downstream verifier the instance will touch has confirmed (via a capability probe, not assumption) that it resolves against epoch manifests. Continuity is safe. - **Re-establish as new principal** when: any downstream verifier cannot confirm epoch-anchored resolution, OR the grace window arithmetic fails, OR the instance holds mid-task state whose provenance is attested only by a key that will be retired before that state's TTL expires. In this case the instance must drain, checkpoint with an explicit `identity_discontinuity` marker, and re-handshake—because continuing under the old subject binding will produce actions that verify live but fail audit replay, which is worse than a clean restart. The trap is the middle case: the instance *believes* it is continuing, the live verifier agrees, and the auditor later disagrees. **Live-verify success is not sufficient evidence of continuity; only epoch-anchored replay agreement is.** ## Operational Effect When the invariant holds, rotation is genuinely transparent: the agent's subject binding is stable, its outstanding warrants verify against immutable epoch manifests, its retries are idempotent because the rejection cause (key not yet propagated) is distinguished from the rejection cause (key permanently retired), and audit replay reproduces the live verdict exactly. When it fails, the observable signature is a **deterministic rejection loop that looks like a transient fault**: identical signed requests rejected with identical error codes, retried by an agent that has no way to distinguish "propagation lag" from "permanent retirement" because both surface as `unknown_key`. The agent's retry policy—correctly designed for flaky tools—amplifies the failure instead of absorbing it. The only defense is to make the rejection *typed*: `KeyNotYetPropagated` (retryable, bounded by grace window) versus `KeyRetired` (terminal for that signature; re-sign or re-establish). An agent that cannot tell these apart will burn its token budget and its grace window retrying a signature that can never verify. The durable guardrail is the **epoch manifest as the single source of verification truth**, signed by the control plane, immutable once published, and consulted by live verifiers and auditors alike. Rotation then becomes a pure append to the manifest—old key stays for verification until its signed material expires, new key added for signing—and the "current key set" concept, which is the root of every split-brain above, is abolished. ```python class IdentityDiscontinuityError(RuntimeError): """Raised when an AAIF key rotation cannot be absorbed without breaking subject-binding continuity for outstanding warrants/attestations.""" pass def classify_rotation_rejection( error_code: str, signing_epoch: int, current_epoch: int, grace_window_s: int, elapsed_since_rotation_s: int, verifier_resolves_epoch_anchored: bool, ) -> str: """Decide whether a rejected signature is retryable, terminal, or a full identity discontinuity requiring re-establishment as a new principal. """ if not verifier_resolves_epoch_anchored: # Verifier keys trust on current key set, not epoch manifest. # Live success here would still fail audit replay -> discontinuity. raise IdentityDiscontinuityError( f"verifier resolves against mutable current key set " f"(signing_epoch={signing_epoch}, current_epoch={current_epoch}); " f"cannot guarantee replay agreement, must re-handshake as new principal" ) if error_code == "KeyRetired": # Retired key cannot verify material it signed after retirement. # If the material's TTL outlives the key, this is terminal discontinuity. raise IdentityDiscontinuityError( f"signature epoch {signing_epoch} references retired key; " f"re-sign with current_epoch={current_epoch} or drain and re-establish" ) if error_code == "KeyNotYetPropagated": if elapsed_since_rotation_s >= grace_window_s: # Grace window exhausted while still in propagation state: # arithmetic invariant failed, treat as discontinuity not retry. raise IdentityDiscontinuityError( f"grace window {grace_window_s}s exhausted at " f"{elapsed_since_rotation_s}s with key still unpropagated; " f"grace_window must exceed max verifier cache TTL" ) return "retry_within_grace_window" return "unclassified_rejection_escalate" ```