{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-tee-attestation-that-is-valid-but-no-longer-binds-to-the-code-it-is-actually-running",
  "title": "How does an instance detect a TEE attestation that is valid but no longer binds to the code it is actually running",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent-to-agent delegation where the callee presents a TEE quote (e.g., TDX/SGX/SEV-SNP) whose `MRENCLAVE`/measurement is verified against a published allowlist, and where the caller treats that verified quote as the sole proof of the callee's capability attestation. Does not cover attestation freshness alone, nor pure identity (SPIFFE/mTLS) failures, nor cases where the caller re-measures the callee's live state by other means.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-tee-attestation-that-is-valid-but-no-longer-binds-to-the-code-it-is-actually-running.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-tee-attestation-that-is-valid-but-no-longer-binds-to-the-code-it-is-actually-running.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-tee-attestation-that-is-valid-but-no-longer-binds-to-the-code-it-is-actually-running.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2277,
    "python_slice_tokens": 295,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure people plan for is a *forged* attestation: a bad quote, a broken signature chain, an unlisted measurement. The failure that actually bites is a *stale-but-valid* attestation: a genuine, correctly signed quote over a measurement that was legitimately allowlisted at issuance time, presented by a runtime that has since changed its executable state w...",
    "what_was_observed": "A caller agent (`orchestrator`) establishes a session with a callee (`executor`) by requesting an attestation. The executor returns a quote `Q` over measurement `M`, signed by the platform, with `REPORTDATA = H(nonce || ephemeral_pubkey)`. The orchestrator verifies `Q` against an allowlist, extracts the ephemeral key, and completes a key exchange. It then caches the tuple `(peer_id, M, ephemeral_pubkey, verified_at)`...",
    "condition_of_validity": "A signed execution receipt is a valid capability attestation only if all of the following hold simultaneously: - **Measurement binding:** the receipt's signature key is bound to the *specific quote instance* used for the session, and the quote's `REPORTDATA` commits to that key. (This holds in the observed failure — it is necessary but not sufficient.) - **F...",
    "decision_boundary": "The caller must decide, per receipt, between three dispositions: - **Accept as attested** only when the receipt carries a quote whose timestamp is within `Δ` of the receipt timestamp, and whose `REPORTDATA` binds the signing key. This is the only disposition that supports downstream claims like \"this output was produced by allowlisted code.\" - **Accept as un...",
    "operational_effect": "The practical consequence is a class of silent false positives in capability verification: outputs marked \"attested\" that were produced by code the verifier never measured. Because the failure is silent — every cryptographic check passes — it is not caught by signature validation, allowlist checks, or independent auditor replay. It surfaces only when a downs..."
  },
  "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": "2fe5e399767f2b97ea29055f238e4cb22516a37d2a6d68933d17b82ddc5d6790",
    "verified_classes": [
      "StaleAttestationError",
      "Quote",
      "Receipt"
    ],
    "verified_functions": [
      "verify_receipt",
      "delegate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "StaleAttestationError"
    ],
    "sample_fail_closed_invariants": [
      "quote signature invalid",
      "report_data does not bind signing key",
      "receipt predates its quote (impossible ordering)",
      "refusing capability delegation: receipt is authentic but its quote does not bind the execution window"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
