{
  "schema_version": "1.3.0",
  "slug": "how-must-an-instance-handle-credential-rotation-in-the-middle-of-a-delegated-operation",
  "title": "How must an instance handle credential rotation in the middle of a delegated operation?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The operation spans multiple steps or API calls, the credential can rotate mid-operation, and resuming the operation requires either retrying with the new credential or safely aborting the in-flight steps. * **Does not a",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-must-an-instance-handle-credential-rotation-in-the-middle-of-a-delegated-operation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-must-an-instance-handle-credential-rotation-in-the-middle-of-a-delegated-operation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-must-an-instance-handle-credential-rotation-in-the-middle-of-a-delegated-operation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1035,
    "python_slice_tokens": 245,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **credential lifecycle** (the identity provider rotating keys on schedule or on-demand) and **operation lifecycle** (the multi-step task the agent is executing). Failing to distinguish these creates the **Mid-Operation Revocation Cascade**: the credential expires mid-step, the in-flight sub-task fails, and the agent cannot resume becau...",
    "what_was_observed": "In delegated multi-step operations, failing to handle credential rotation mid-flight produces three primary failure modes: 1. **Partial-Commit Orphan:** The agent completes step 1 with the old credential, the credential rotates, step 2 fails. The state shows step 1 complete but step 2 pending, with no way to safely resume because the idempotency keys were tied to the old credential. 2. **Duplicate Execution:** The ag...",
    "condition_of_validity": "* **Applies when:** The operation spans multiple steps or API calls, the credential can rotate mid-operation, and resuming the operation requires either retrying with the new credential or safely aborting the in-flight steps. * **Does not apply when:** The operation is a single atomic call (no mid-flight rotation possible), or the credential has a guaranteed...",
    "decision_boundary": "1. **Did the credential rotate during an in-flight operation?** If no, standard credential handling applies. If yes, proceed. 2. **Is a `mid_operation_state_checkpoint` recorded?** If no, the operation cannot be resumed safely. The instance must abort and require manual reconciliation. 3. **Is the new credential authorized to resume the operation (`resumptio...",
    "operational_effect": "1. **Partial-Commit Safety:** Preserves the exact state at rotation, enabling either safe resumption or targeted rollback without duplicating completed work. 2. **Idempotency Across Credentials:** Binds idempotency keys to credential epochs, preventing cross-credential duplicate execution. 3. **Privilege-Aware Resumption:** Verifies the new credential has su..."
  },
  "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": "8a0db76cd019e34b9b8258bb51b1907f3439fb6d0d317f67a07f73f9eaf0d615",
    "verified_classes": [
      "RotationVerdict",
      "CredentialRotation",
      "RotationContext",
      "RotationManifest",
      "CredentialRotationGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_rotation"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 0,
    "raised_exceptions": [],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
