{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-attest-its-enclave-after-a-tool-call-boundary-and-why-does-the-naive-attest-once-at-session-start-invariant-silently-leak-cr",
  "title": "Where must an instance re-attest its enclave after a tool-call boundary, and why does the naive \"attest once at session start\" invariant silently leak cross-tenant plaintext?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to multi-agent systems where each agent instance runs inside a hardware-attested confidential-computing enclave (SEV-SNP, TDX, or equivalent) and invokes privacy-preserving tools (PIR, PSI, MPC, or sealed inference) across organizational trust boundaries. Does *not* apply to single-tenant agents whose tools run in the same attestation domain, nor to purely functional tools with no data-plane state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-attest-its-enclave-after-a-tool-call-boundary-and-why-does-the-naive-attest-once-at-session-start-invariant-silently-leak-cr.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-attest-its-enclave-after-a-tool-call-boundary-and-why-does-the-naive-attest-once-at-session-start-invariant-silently-leak-cr.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-attest-its-enclave-after-a-tool-call-boundary-and-why-does-the-naive-attest-once-at-session-start-invariant-silently-leak-cr.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1981,
    "python_slice_tokens": 348,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things an attestation report can certify, and conflating them is the root of the failure: 1. **Code-identity attestation** — \"the measurement of the code/keys currently loaded in this enclave equals a known-good hash.\" This is a *static* property of the launch image. 2. **Data-domain attestation** — \"the plaintext currently resident i...",
    "what_was_observed": "A three-party pipeline: Org A's planner agent (enclave `E_A`) invokes Org B's sealed-retrieval tool (enclave `E_B`) over an A2A/MCP-style transport, then hands results to Org C's auditor agent (`E_C`). The tool invocation is a PIR query: `E_B` must answer `E_A`'s query over B's private index without learning the query, and `E_A` must not learn the index. The deployment attested `E_A` once at session start against mea...",
    "condition_of_validity": "The \"attest once per session\" invariant is valid **only if** the following holds: - `enclave_lifetime ⊆ single_data_domain`, i.e. the enclave is torn down (or a hardware-supported domain reset is executed) between any two distinct tenants, **and** - every tool invocation that stages tenant plaintext into a shared scratch region either zeroes that region on r...",
    "decision_boundary": "An instance must **re-attest with a domain-epoch binding** — not merely re-present a cached quote — at exactly these transitions: - **Before** the first tool call that stages plaintext for a *different* tenant than the one whose data is currently resident. (Trigger: `requested_domain != resident_domain`.) - **After** any tool returns, if the tool wrote into ...",
    "operational_effect": "Downstream, the leak is invisible to every component that only checks signatures. `E_B`'s policy engine sees `quote(M_A)` valid, `nonce` fresh, caller identity `T2` — all green. `E_C`'s auditor replays the transcript and sees a coherent `T2`-only story, because the `T1` bytes entered through a scratch-reuse path that the transcript never records (the staging..."
  },
  "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": "995cfacb223bbbf05c6938568f55eace6f23835896cc9a4a4b185233eba8ef4c",
    "verified_classes": [
      "DataDomainAttestationError",
      "EnclaveAttestation",
      "InvocationEnvelope"
    ],
    "verified_functions": [
      "verify_tool_boundary",
      "guarded_tool_call",
      "__init__",
      "__init__"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "DataDomainAttestationError"
    ],
    "sample_fail_closed_invariants": [
      "scratch region dirty or enclave restored from checkpoint: memory lineage unverified — DOMAIN_RESET required before tool "
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
