{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-re-attests-mid-session-stale-peer-cache-poisoning-in-cross-domain-mutual-attestation",
  "title": "What happens when an instance re-attests mid-session: stale peer cache poisoning in cross-domain mutual attestation",
  "date_of_record": "2026 November 18",
  "scope": "Applies to agent-to-agent channels where both sides present short-lived workload identities (SPIFFE-style SVIDs or equivalent) and require mutual attestation against a foreign trust domain, with a local peer cache keyed on the peer's workload identity rather than on the attestation result. Does not apply to long-lived mTLS with pinned certificates, nor to channels where attestation is re-evaluated on every request by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-re-attests-mid-session-stale-peer-cache-poisoning-in-cross-domain-mutual-attestation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-re-attests-mid-session-stale-peer-cache-poisoning-in-cross-domain-mutual-attestation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-re-attests-mid-session-stale-peer-cache-poisoning-in-cross-domain-mutual-attestation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1640,
    "python_slice_tokens": 346,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"expired credential accepted.\" Both endpoints validate expiry correctly. The failure is a *cache identity mismatch*: the peer cache is keyed on the peer's stable workload identifier (e.g., `spiffe://domain-b/agent/planner`), while the trust decision it stores was derived from a *mutable* attestation tuple (SVID serial, attestation nonce, m...",
    "what_was_observed": "On a cross-domain channel between domain A (caller) and domain B (callee), with SVID TTL of 300s and a peer cache TTL of 600s, the following sequence reproduced deterministically: 1. Agent `A/worker` establishes a channel to `B/planner`, presenting an SVID issued by A's trust domain. `B/planner` performs mutual attestation, validates A's bundle, records an allow entry for `spiffe://a/agent/worker` with a 600s cache T...",
    "condition_of_validity": "The stale-cache acceptance holds only when all of the following are true simultaneously: - The peer cache key is the stable workload identity, not a digest over (SVID serial, bundle version, measurement). - The cache TTL exceeds the SVID TTL (here 600s > 300s), so rotation is guaranteed to occur inside a live cache window. - The trust-domain bundle can rotat...",
    "decision_boundary": "The correct boundary is: **cache the attestation result, never the identity.** Concretely, an admission decision is reusable only while the evidence that produced it is unchanged. The peer cache entry must be invalidated by any of: SVID serial change, bundle version change, or measurement digest change — whichever is observed first. Two operational rules fol...",
    "operational_effect": "In the soft-fail configuration, the effect is a silent authorization gap: for up to (cache TTL − SVID TTL) seconds after each rotation, a peer is admitted on evidence that has never been evaluated against the current trust policy. If the rotation was triggered by a compromise response — revoking a key, re-issuing after an incident — the stale cache actively ..."
  },
  "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": "f8642102ac6dbef73edb4708bcd3e31a8675f996a63b895e5c9ca86f934069df",
    "verified_classes": [
      "StaleAttestationError",
      "AttestationEvidence",
      "CacheEntry",
      "PeerAttestationCache"
    ],
    "verified_functions": [
      "__init__",
      "admit",
      "invalidate_bundle"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StaleAttestationError",
      "ValueError"
    ],
    "sample_fail_closed_invariants": [
      "peer cache TTL must be strictly less than SVID TTL; otherwise rotation is guaranteed to occur inside a live cache window"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
