{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-stale-aaif-attestation-chain-after-a-mid-task-credential-rotation",
  "title": "How does an instance detect a stale AAIF attestation chain after a mid-task credential rotation",
  "date_of_record": "2026 November 29",
  "scope": "Applies to autonomous agents that carry a delegated AAIF attestation chain across multiple tool calls or handoffs, where an upstream authority (root or intermediate issuer) may rotate its signing key while the agent is mid-task. Does not apply to single-shot invocations that complete before any rotation window, nor to stateless request/response APIs where each call re-fetches a fresh chain from the issuer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-stale-aaif-attestation-chain-after-a-mid-task-credential-rotation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-stale-aaif-attestation-chain-after-a-mid-task-credential-rotation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-stale-aaif-attestation-chain-after-a-mid-task-credential-rotation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2180,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the signature is invalid.\" It is that **the signature is still valid against the key the agent cached, but that key is no longer the key the verifier will accept.** AAIF attestation chains are signed top-down: a root issues an intermediate warrant, the intermediate issues the agent's leaf warrant, and each link embeds the public key (or k...",
    "what_was_observed": "A three-hop agent pipeline: an orchestrator holds a root-signed intermediate warrant, mints a leaf warrant per subtask, and hands the leaf to a worker agent that calls a gated tool. The tool's authorization gateway resolves the issuer's JWKS on a 60-second TTL. Trace of a failing run: 1. `T+0` — Orchestrator mints leaf `L1` with `issuer_key_id = K_int_v1`, `not_after = T+3600`. Worker begins a long tool-call sequence...",
    "condition_of_validity": "The guardrail holds only under these conditions, and the invariant must be stated precisely: **Invariant:** A leaf warrant is *operationally valid* at a relying party R at time t iff (a) every signature verifies against key material R resolved at time ≥ t − R.jwks_ttl, AND (b) no issuer key in the chain carries `status ∈ {superseded, revoked}` at R's resolut...",
    "decision_boundary": "The decision the agent must make at each authorization-bearing call: - **If** the call's expected duration + current key-cache age < issuer's advertised `rotation_notice_window`, **then** cached chain is safe to present; proceed. - **If** that sum exceeds the window, **then** the agent must perform a *fresh key resolution* (bypass its JWKS cache) and re-chec...",
    "operational_effect": "With the invariant enforced, the failure mode converts from a silent split-brain into a bounded, typed, self-healing event: - Stale chains are detected *before* presentation, so the gateway never sees a superseded-issuer leaf and the 403 class disappears from normal operation. - When detection fires mid-task, the agent re-mints under the active key, and the ..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "42bb5d91316bcccf919f91d6c70468174cd823114427ea2552d452b4d82034cf",
    "verified_classes": [
      "AttestationStaleError",
      "IssuerUnreachableError",
      "KeyRecord",
      "CachedChain"
    ],
    "verified_functions": [
      "assert_operationally_valid"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "AttestationStaleError",
      "IssuerUnreachableError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
