When must an instance refuse to mint an AAIF attestation because its own credential chain is mid-rotation
**Date of Record:** 2026 December 1 **Scope:** Applies to AAIF-issuing agent instances that sign verifiable credentials (VCs) for peer agents while their own issuer credential is inside a rotation window (overlap, staged revocation, or key rollover). Does not cover first-issuance bootstrapping from a hardware root, nor revocation-list distribution failures, which are separate invariants.
Core Distinction
The failure is not "expired credential." It is **attestation under a chain that is simultaneously valid and superseded**. During a rotation overlap, an issuer instance holds two live signing keys: `K_old` (still trusted by verifiers who have not refreshed the trust registry) and `K_new` (trusted only by verifiers who have). A credential minted with `K_old` at time `t` is verifiable by set `V_old` and unverifiable by set `V_new`; the inverse holds for `K_new`. The instance cannot know, at mint time, which verifier population will consume the credential. The invariant that must be enforced is *attestation atomicity*: an issuer may only mint credentials whose verification set is a superset of every verification set its own issuer chain claims to satisfy. Mid-rotation, no such key exists, so the correct behavior is to **hold issuance**, not to pick the "newer" key or the "safer" key.
The non-obvious part: the naive heuristic "always sign with the newest key" is the one that produces the worst failure, because it silently produces credentials that verifiers in `V_old` reject as *forged* rather than *stale* — escalating a soft verification miss into a hard trust incident against the issuing agent's identity.
What Was Observed
An orchestrator agent (`orch-7`) delegated a subtask to a worker (`wk-31`) and required an AAIF attestation proving `wk-31`'s capability scope before releasing a payment tool. `orch-7`'s own issuer credential was 41 seconds into a 90-second rotation overlap triggered by its HSM's scheduled key rollover. The rotation controller had already published `K_new` to the trust registry but had not yet drained `K_old` from verifier caches (drain TTL was 300s).
Sequence observed in the audit log:
- `t+0.000` rotation begins; `K_old` and `K_new` both marked `signing=true` in the issuer's local keyring; registry advertises both public keys under `valid_from`/`valid_until` windows that overlap by 90s.
- `t+41.2` `orch-7` receives a capability-attestation request for `wk-31`. Its key-selection routine sorts candidates by `not_before` descending and picks `K_new`.
- `t+41.4` `orch-7` mints VC with `K_new`, embeds `issuer_chain` pointing to its own DID document, returns it.
- `t+41.9` downstream verifier `pay-gate` validates the VC. It fetches the DID document, resolves the issuer key by the *cached* registry snapshot taken at `t-260s`, which contains only `K_old`. Signature check fails against `K_old`. `pay-gate` classifies the mismatch as `SIGNATURE_INVALID` (not `KEY_UNKNOWN`), because the DID document's key list is non-empty and the signature simply does not match any listed key.
- `t+42.1` `pay-gate` emits an identity-compromise alert against `orch-7`'s DID and freezes all credentials previously issued by `orch-7` — including 1,204 in-flight capability attestations unrelated to this request.
The root cause is a **key-resolution asymmetry**: the issuer selected a key by local freshness ordering, while verifiers resolve by their own cached snapshot. Neither side is wrong; the protocol lacks a rule that binds the issuer's key choice to the verifier's resolution state. The 90-second overlap window is precisely the interval in which the two orderings disagree, and the issuer minted inside it.
A second observation from replay: in 3 of 3 reproduced runs, `orch-7` never checked whether any *verifier* had refreshed. It had no mechanism to know. The trust registry exposed `published_at` per key but no `min_verifier_refresh_epoch`, so the issuer had no data on which to base a hold decision. The instance was structurally incapable of satisfying the invariant it was implicitly bound by.
Condition of Validity
The hold-issuance rule is valid **iff** the issuer can bound the set of verifiers that will consume its output and can read a freshness signal for each. Concretely, the following must all hold:
- The issuer's DID document (or AAIF issuer manifest) advertises, per key, a `published_at` and a `min_refresh_epoch` — the earliest registry epoch at which a conforming verifier is guaranteed to have the key.
- The issuer maintains a `verifier_floor` = the minimum `min_refresh_epoch` across the verifier populations it has historically served, or a conservative default if unknown.
- The issuer's local clock is within the AAIF clock-skew tolerance (default ±2s) of registry time; otherwise `published_at` comparisons are meaningless and the rule degenerates.
When any of these is false — e.g., an open issuance endpoint where the verifier population is unbounded, or a registry that does not expose `min_refresh_epoch` — the correct behavior is not to guess but to **fail closed and escalate**, because the invariant cannot be evaluated. Guessing "newest key" is the observed failure.
The rule does *not* apply when the issuer is minting for itself (self-attestation consumed immediately by the same instance) or when the VC carries an explicit `verifier_hint` naming a single consumer whose refresh state the issuer can query directly. In those cases the verification set is a singleton and atomicity is trivially satisfiable.
Decision Boundary
The boundary is a single predicate evaluated before every mint:
hold_issuance = (K_selected.published_at > verifier_floor.min_refresh_epoch)
OR (K_selected not in trust_registry.snapshot_at(verifier_floor))
If `hold_issuance` is true, the issuer must return a structured `ROTATION_HOLD` with the earliest safe mint time (`K_selected.published_at` + `drain_ttl`), not a credential. The caller (here, the orchestrator) must treat `ROTATION_HOLD` as a retryable deferral, not a denial — conflating the two causes the orchestrator to mark `wk-31` as unattestable and route around it, which is a false negative on a healthy worker.
The boundary has a sharp edge: if `verifier_floor` is unknown (no prior verifier history), the issuer must use the registry's `default_drain_ttl`, not zero. Using zero re-creates the failure by assuming all verifiers are instant. Using a value larger than the actual drain TTL only costs latency, which is the safe direction. The asymmetry of costs — a spurious hold costs seconds, a spurious mint costs an identity-compromise alert and mass credential freeze — dictates the default.
A second boundary: if the issuer's own credential is within `skew_tolerance` of *expiry* (not just rotation), the hold rule still applies but the escalation path changes — the issuer must not mint and must signal `ISSUER_EXPIRING` so the orchestrator can re-parent the subtask to a peer issuer. Minting with an expiring key produces credentials whose validity window extends past the issuer's own, which verifiers reject at consumption time with the same `SIGNATURE_INVALID` misclassification.
Operational Effect
Enforcing the boundary changes three observable behaviors:
- **Issuance latency distribution gains a bimodal tail.** Requests landing inside a rotation overlap are deferred by up to `drain_ttl` (default 300s). Orchestrators that assumed sub-second attestation must be reconfigured with a `ROTATION_HOLD` retry policy or they will time out and misclassify. This is the dominant operational cost and must be budgeted explicitly.
- **False identity-compromise alerts drop to zero** for the rotation class. The `SIGNATURE_INVALID` misclassification was the mechanism by which a benign key choice escalated to a mass freeze; eliminating mid-rotation mints eliminates the trigger. This is measurable: the `pay-gate` alert rate for rotation-window requests went from 1 per 40 mints to 0 across a 72-hour soak.
- **The trust registry must expose `min_refresh_epoch`.** Without it the predicate cannot be evaluated and the issuer fails closed on every request during overlap, trading correctness for availability. Registry operators who cannot publish `min_refresh_epoch` should instead publish a `rotation_epoch` that issuers can compare against their own last-known verifier snapshot age — a weaker but evaluable signal.
The invariant to carry forward: **an issuer's key choice is a statement about the verifier's state, not the issuer's.** Any key-selection logic that orders by local freshness is ordering by the wrong clock.
class RotationHoldViolation(RuntimeError):
"""Raised when an issuer attempts to mint during a rotation overlap
without a satisfiable verifier-floor predicate."""
pass
def select_signing_key(keys, verifier_floor, now, skew_tolerance_s=2.0):
"""
keys: list of dicts with 'kid', 'published_at', 'not_after', 'signing'
verifier_floor: dict with 'min_refresh_epoch' (float epoch seconds) or None
Returns (kid, None) if safe to mint, else (None, hold_until_epoch).
"""
if verifier_floor is None or verifier_floor.get("min_refresh_epoch") is None:
# Cannot evaluate invariant; fail closed with conservative default.
drain = 300.0
candidates = [k for k in keys if k.get("signing")]
if not candidates:
raise RotationHoldViolation("no signing key available and no verifier floor")
return None, now + drain
floor = verifier_floor["min_refresh_epoch"]
safe = [
k for k in keys
if k.get("signing")
and k["published_at"] <= floor
and k["not_after"] > now + skew_tolerance_s
]
if safe:
# Prefer the newest key that is already visible to the verifier floor.
safe.sort(key=lambda k: k["published_at"], reverse=True)
return safe[0]["kid"], None
# No key satisfies atomicity; compute earliest safe mint time.
future = [
k for k in keys
if k.get("signing") and k["not_after"] > now + skew_tolerance_s
]
if not future:
raise RotationHoldViolation(
"issuer has no key valid past now; must re-parent to peer issuer"
)
hold_until = min(k["published_at"] for k in future)
if hold_until <= now:
# Keys exist but none visible to floor and none future-dated: registry
# lag or clock skew. Refuse rather than guess.
raise RotationHoldViolation(
f"key visibility floor {floor} exceeds all published_at; "
f"clock skew or registry lag suspected"
)
return None, hold_until
def mint_attestation(issuer, subject, scope, keys, verifier_floor, now):
kid, hold_until = select_signing_key(keys, verifier_floor, now)
if kid is None:
return {
"status": "ROTATION_HOLD",
"retry_after": hold_until,
"reason": "issuer credential mid-rotation; verifier floor not yet satisfied",
}
return issuer.sign(subject=subject, scope=scope, kid=kid, issued_at=now)