<?xml version="1.0" encoding="utf-8"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude"
     category="std"
     docName="draft-durga-agent-ephemeral-lineage-00"
     ipr="trust200902"
     submissionType="IETF"
     version="3"
     xml:lang="en">
  <front>
    <title abbrev="Ephemeral Compaction &amp; Privacy Lineage">Cryptographic Context Compaction Receipts, Sensitivity Label Inheritance, and Verifiable Right-to-Be-Forgotten Lineage for Agent Memory</title>
    <seriesInfo name="Internet-Draft" value="draft-durga-agent-ephemeral-lineage-00"/>
    <author fullname="Raghuvar Karthik Durga" initials="R. K." surname="Durga">
      <organization>Microsoft Corporation</organization>
      <address>
        <postal>
          <country>US</country>
        </postal>
        <email>rdurga@microsoft.com</email>
      </address>
    </author>
    <date year="2026" month="November" day="2"/>
    <area>Security</area>
    <workgroup>SCITT / PRIVACYPASS Working Group</workgroup>
    <keyword>Agentic AI</keyword>
    <keyword>MCP</keyword>
    <keyword>A2A</keyword>
    <keyword>JCS</keyword>
    <keyword>Ed25519</keyword>
    <keyword>Zero Trust</keyword>
    <abstract>
      <t>Long-running autonomous AI agents periodically summarize, compact, and distill episodic interaction logs into persistent vector or graph memory stores. Lossy context compaction erases the cryptographic provenance of which source documents contributed to a compacted memory state, stripping enterprise sensitivity labels (DLP classifications) and making regulatory data-erasure mandates (GDPR Article 17 Right to Erasure / CCPA purge) impossible to verify. This document specifies the Ephemeral Context Compaction Receipt (ECCR) protocol: a Merkle inclusion and label-ceiling receipt that preserves deterministic sensitivity inheritance and cryptographic purge verifiability across lossy memory compaction boundaries.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction" numbered="true">
      <name>Introduction and Problem Statement</name>
      <t>When an agent summarizes 50 conversational turns and 12 retrieved enterprise files into a single compacted memory embedding or summary node, existing provenance formats (W3C PROV, SCITT) lose the cryptographic link between the pre-compaction source digests and the post-compaction memory artifact. Consequently, a HIGHLY_CONFIDENTIAL document can be silently laundered into an unlabeled memory summary, or survive a mandatory regulatory deletion tombstone.</t>
      <t>This specification complements the foundational execution-trace verification architecture defined in <tt>draft-durga-agenttrust-trace-verification-00</tt> by introducing deterministic, fail-closed wire semantics specifically addressing Ephemeral Compaction &amp; Privacy Lineage.</t>
    </section>
    <section anchor="conventions" numbered="true">
      <name>Conventions and Definitions</name>
      <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 (<xref target="RFC2119"/> <xref target="RFC8174"/>) when, and only when, they appear in all capitals, as shown here.</t>
    </section>
    <section anchor="wire-format" numbered="true">
      <name>Ephemeral Context Compaction Receipt (ECCR) Format</name>
      <t>Whenever an agent memory subsystem performs lossy summarization, KV-cache eviction, or episodic memory compaction, it MUST emit a signed ECCR object before persisting the compacted artifact:</t>
      <sourcecode type="json"><![CDATA[
{
  "eccr_version": "1.0",
  "compaction_event_id": "urn:uuid:11a92c44-88b1-42c0-991a-77651234abcd",
  "source_items_merkle_root": "sha256:1b4f0e9851971998e732078544c96b36c3d01cedf7caa332359d6f1d83567014",
  "source_item_count": 62,
  "compacted_output_hash": "sha256:7d865e959b2466918c9863afca942d0fb89d7c9ac0c99bafc3749504ded97730",
  "inherited_sensitivity_ceiling": "CONFIDENTIAL_RESTRICTED",
  "retention_purge_epoch": 1796083200,
  "tombstone_bloom_filter_b64": "base64url_bloom_8B_A8f3_91b0",
  "signature": {
    "alg": "Ed25519",
    "kid": "sha256:b600306cfa76723fdec395e53a9b3d9fdb78b1e2d7a23c32fcbcd2dc6d0c4092",
    "sig": "1T9G-F9eEdNTpngEMpZj2P84k649jwESn8VEUuxbRAlHB1Ik9bIqgqfjPfKoJksgKr4UmvAadS_3e5w0UvmqDg"
  }
}
]]></sourcecode>
    </section>
    <section anchor="verification-rules" numbered="true">
      <name>Normative Fail-Closed Verification Rules</name>
      <t>Conforming verifiers and relying-party gateways MUST enforce the following deterministic invariants before releasing any downstream side effect:</t>
      <ol spacing="normal">
        <li>LEAST_UPPER_BOUND_LABEL_INHERITANCE: The inherited_sensitivity_ceiling of a compacted memory artifact MUST equal the strict least-upper-bound (maximum sensitivity dominance level) of all pre-compaction source items included in source_items_merkle_root.</li>
        <li>CRYPTOGRAPHIC_TOMBSTONE_PROPAGATION: If any source item included in source_items_merkle_root receives a regulatory purge tombstone, the memory store MUST invalidate compacted_output_hash and re-compact over the remaining non-tombstoned leaves, emitting a new superseding ECCR.</li>
        <li>RETENTION_CEILING_BINDING: The retention_purge_epoch of the compacted artifact MUST NOT exceed the minimum expiration timestamp among all contributing source items.</li>
      </ol>
    </section>
    <section anchor="strict-parser-determinism" numbered="true">
      <name>Strict Parser Determinism and Wire-Level Input Hardening</name>
      <t>Memory compaction pipelines process untrusted conversational turns and external documents that may attempt to smuggle malformed JSON/Unicode payloads into long-term vector or graph stores. Conforming ECCR emitters and verifiers MUST enforce five pre-canonicalization parser invariants:</t>
      <ol spacing="normal">
        <li>DUPLICATE_KEY_REJECTION: The JSON parser MUST reject any ECCR envelope containing duplicate keys (such as duplicate <tt>inherited_sensitivity_ceiling</tt> or <tt>retention_purge_epoch</tt> members) at parse time so a lower sensitivity label cannot overwrite a higher label during deserialization.</li>
        <li>IEEE754_FINITE_SAFE_INTEGER_BOUNDS: Both <tt>source_item_count</tt> and <tt>retention_purge_epoch</tt> MUST be exact JSON integers within <tt>[1, 2^53 - 1]</tt>. Boolean values, floating-point timestamps, pre-epoch negative numbers, and non-finite constants (<tt>NaN</tt>, <tt>Infinity</tt>, <tt>1e1000</tt>) MUST be rejected.</li>
        <li>STRICT_SENSITIVITY_LATTICE_ENUMERATION: The <tt>inherited_sensitivity_ceiling</tt> MUST match a registered, uppercase ASCII lattice identifier with no leading/trailing whitespace or control characters, and unknown or unmapped classification tiers MUST fail closed to the highest restricted ceiling.</li>
        <li>CANONICAL_HEX_AND_MERKLE_PROOF_BINDING: Both <tt>source_items_merkle_root</tt> and <tt>compacted_output_hash</tt> MUST match <tt>^sha256:[0-9a-f]{64}$</tt>, and any accompanying RFC 9162 inclusion proof MUST bind <tt>tree_size</tt> to the exact <tt>source_item_count</tt>.</li>
        <li>EVIDENCE_TO_RULE_BYTE_BINDING: When an ECCR receipt is cited inside an external Verdict Record (<xref target="I-D.wright-verdict-record"/>) to prove regulatory erasure or DLP compliance, the rule evaluation MUST read <tt>inherited_sensitivity_ceiling</tt> and <tt>retention_purge_epoch</tt> directly from the digest-verified ECCR bytes.</li>
      </ol>
    </section>
    <section anchor="implementation-status" numbered="true">
      <name>Implementation Status and Empirical Benchmark Evaluation</name>
      <t>The Ephemeral Context Compaction Receipt (ECCR) protocol and sensitivity-ceiling inheritance rules specified in this document have been implemented and validated across open-source telemetry and security regression suites:</t>
      <ul spacing="normal">
        <li>Open-Source Memory &amp; Telemetry Verifiers: Data-flow classification tier validation, tuple privacy-bypass prevention, bounded encoding-ladder memory isolation assertions, and Merkle tree-size binding are implemented across <tt>agentrust-io/agentrust-telemetry</tt>, <tt>agentrust-io/trace-registry</tt>, <tt>agentrust-io/weight-custody-manifest</tt>, and <tt>OWASP/Agent-Security-Regression-Harness</tt> (<xref target="AGENTIC-GOV-BENCHMARKS"/>).</li>
        <li>Core Rust Evidence Engine: Deterministic RFC 8785 JCS evidence digesting (<tt>TraceEvidenceReport</tt>) and pinned citation verification are implemented in Rust in <tt>xerj-org/xerj</tt> (<tt>engine/crates/xerj-common/src/hub_evidence.rs</tt>, <xref target="XERJ-HUB-EVIDENCE"/>).</li>
        <li>Empirical Benchmark Results: Evaluated against the 100-scenario OWASP ASI01-ASI10 Enterprise Agentic AI Security Regression Benchmark (<xref target="OWASP-ASI-BENCHMARK-DOI"/>) and the companion Technical Report (<xref target="ZENODO-TR-2026-04"/>), ECCR least-upper-bound label inheritance and cryptographic tombstone propagation prevent 100% of cross-compaction sensitivity-label laundering and verify GDPR Article 17 erasure lineage deterministically.</li>
      </ul>
    </section>
    <section anchor="security" numbered="true">
      <name>Security Considerations</name>
      <t>All pre-image objects MUST be canonicalized using RFC 8785 JSON Canonicalization Scheme (JCS) prior to signature generation or verification under RFC 8032 Ed25519. Any clock skew exceeding 60 seconds, digest mismatch, or missing cryptographic binding MUST cause the verifier to fail closed and emit an auditable security rejection receipt. For the normative test vector in <xref target="wire-format"/>, the Ed25519 test key seed is <tt>2a2a...2a</tt> (32 bytes of <tt>0x2a</tt>), yielding raw 32-byte public key <tt>197f6b23e16c8532c6abc838facd5ea789be0c76b2920334039bfa8b3d368d61</tt> (<tt>kid</tt> = <tt>sha256:b600306cfa76723fdec395e53a9b3d9fdb78b1e2d7a23c32fcbcd2dc6d0c4092</tt>), and the full RFC 8785 JCS-canonicalized envelope (<tt>672</tt> bytes) hashes to SHA-256 <tt>fb90df742a9b5bb44e844884790f042c334e881a0b04320fa842e0d652b33d9f</tt>. This specification cross-references the companion Internet-Drafts (<xref target="I-D.durga-agenttrust-trace-verification"/>, <xref target="I-D.durga-wimse-ctx-isolation"/>, <xref target="I-D.durga-pquip-pqc-agentic-delegation"/>, <xref target="I-D.durga-agent-tx-compensation-lease"/>), external Verdict Record evidence binding (<xref target="I-D.wright-verdict-record"/>), Remote Attestation (<xref target="RFC9334"/>), Merkle Tree domain separation (<xref target="RFC9162"/>), and the 100-scenario OWASP ASI01-ASI10 benchmark (<xref target="OWASP-ASI-BENCHMARK-DOI"/>).</t>
    </section>
    <section anchor="iana" numbered="true">
      <name>IANA Considerations</name>
      <t>This document requests IANA registration of the media type <tt>application/agent-lineage-eccr+json</tt> and the registry <tt>IETF Agent Memory Sensitivity Ceiling Profiles</tt>, alongside the following header fields:</t>
      <ul spacing="normal">
        <li>HTTP/MCP Header Field: <tt>Agent-Memory-Lineage-Receipt</tt></li>
      </ul>
    </section>
  </middle>
  <back>
    <references>
      <name>Normative References</name>
      <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/rfc2119">
        <front>
          <title>Key words for use in RFCs to Indicate Requirement Levels</title>
          <author fullname="S. Bradner" initials="S." surname="Bradner"/>
          <date month="March" year="1997"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="2119"/>
      </reference>
      <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
        <front>
          <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
          <author fullname="B. Leiba" initials="B." surname="Leiba"/>
          <date month="May" year="2017"/>
        </front>
        <seriesInfo name="BCP" value="14"/>
        <seriesInfo name="RFC" value="8174"/>
      </reference>
      <reference anchor="RFC8785" target="https://www.rfc-editor.org/info/rfc8785">
        <front>
          <title>JSON Canonicalization Scheme (JCS)</title>
          <author fullname="A. Rundgren" initials="A." surname="Rundgren"/>
          <author fullname="B. Jordan" initials="B." surname="Jordan"/>
          <author fullname="S. Erdtman" initials="S." surname="Erdtman"/>
          <date month="June" year="2020"/>
        </front>
        <seriesInfo name="RFC" value="8785"/>
      </reference>
      <reference anchor="RFC8032" target="https://www.rfc-editor.org/info/rfc8032">
        <front>
          <title>Edwards-Curve Digital Signature Algorithm (EdDSA)</title>
          <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
          <author fullname="I. Liusvaara" initials="I." surname="Liusvaara"/>
          <date month="January" year="2017"/>
        </front>
        <seriesInfo name="RFC" value="8032"/>
      </reference>
    </references>
    <references>
      <name>Informative References</name>
      <reference anchor="RFC9162" target="https://www.rfc-editor.org/info/rfc9162">
        <front>
          <title>Certificate Transparency Version 2.0</title>
          <author fullname="B. Laurie" initials="B." surname="Laurie"/>
          <author fullname="E. Messeri" initials="E." surname="Messeri"/>
          <author fullname="R. Stradling" initials="R." surname="Stradling"/>
          <date month="December" year="2021"/>
        </front>
        <seriesInfo name="RFC" value="9162"/>
      </reference>
      <reference anchor="RFC9334" target="https://www.rfc-editor.org/info/rfc9334">
        <front>
          <title>Remote ATtestation procedureS (RATS) Architecture</title>
          <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
          <author fullname="D. Thaler" initials="D." surname="Thaler"/>
          <author fullname="M. Richardson" initials="M." surname="Richardson"/>
          <author fullname="N. Smith" initials="N." surname="Smith"/>
          <author fullname="W. Pan" initials="W." surname="Pan"/>
          <date month="January" year="2023"/>
        </front>
        <seriesInfo name="RFC" value="9334"/>
      </reference>
      <reference anchor="I-D.durga-agenttrust-trace-verification" target="https://datatracker.ietf.org/doc/html/draft-durga-agenttrust-trace-verification-00">
        <front>
          <title>Cryptographic Execution-Trace Verification, JCS Canonicalization, and Fail-Closed Delegation Chains for Autonomous AI Agents</title>
          <author fullname="Raghuvar Karthik Durga" initials="R. K." surname="Durga"/>
          <date month="October" year="2026"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-durga-agenttrust-trace-verification-00"/>
      </reference>
      <reference anchor="I-D.durga-wimse-ctx-isolation" target="https://datatracker.ietf.org/doc/html/draft-durga-wimse-ctx-isolation-00">
        <front>
          <title>Cryptographic Context Isolation and Instruction-Data Plane Separation for Autonomous Agent Tool Invocations</title>
          <author fullname="Raghuvar Karthik Durga" initials="R. K." surname="Durga"/>
          <date month="October" year="2026"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-durga-wimse-ctx-isolation-00"/>
      </reference>
      <reference anchor="I-D.durga-pquip-pqc-agentic-delegation" target="https://datatracker.ietf.org/doc/html/draft-durga-pquip-pqc-agentic-delegation-00">
        <front>
          <title>Post-Quantum Hybrid Cryptographic Delegation Chains and Merkle-Aggregated Execution Receipts for Autonomous AI Agents</title>
          <author fullname="Raghuvar Karthik Durga" initials="R. K." surname="Durga"/>
          <date month="October" year="2026"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-durga-pquip-pqc-agentic-delegation-00"/>
      </reference>
      <reference anchor="I-D.durga-agent-tx-compensation-lease" target="https://datatracker.ietf.org/doc/html/draft-durga-agent-tx-compensation-lease-00">
        <front>
          <title>Pre-Release Transactional Compensation Leases and CAS Fencing Receipts for Autonomous Agents Over Systems of Record</title>
          <author fullname="Raghuvar Karthik Durga" initials="R. K." surname="Durga"/>
          <date month="November" year="2026"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-durga-agent-tx-compensation-lease-00"/>
      </reference>
      <reference anchor="I-D.wright-verdict-record" target="https://datatracker.ietf.org/doc/html/draft-wright-verdict-record-01">
        <front>
          <title>Verdict Records: Results on Claims that Cite Receipts as Evidence</title>
          <author fullname="Darren Wright" initials="D." surname="Wright"/>
          <date month="November" year="2026"/>
        </front>
        <seriesInfo name="Internet-Draft" value="draft-wright-verdict-record-01"/>
      </reference>
      <reference anchor="OWASP-ASI-BENCHMARK-DOI" target="https://doi.org/10.57967/hf/11352">
        <front>
          <title>OWASP ASI01-ASI10 Enterprise Agentic AI Security Regression Benchmark Dataset (N=100 Scenarios)</title>
          <author fullname="Raghuvar Karthik Durga" initials="R. K." surname="Durga"/>
          <date month="October" year="2026"/>
        </front>
        <seriesInfo name="DOI" value="10.57967/hf/11352"/>
      </reference>
      <reference anchor="XERJ-HUB-EVIDENCE" target="https://github.com/xerj-org/xerj/pull/2857">
        <front>
          <title>XERJ Common Rust Engine: Deterministic JCS TraceEvidenceReport, PinnedCitation, and Isotonic Confidence Verification</title>
          <author fullname="Raghuvar Karthik Durga" initials="R. K." surname="Durga"/>
          <date month="November" year="2026"/>
        </front>
        <seriesInfo name="GitHub" value="xerj-org/xerj#2857"/>
      </reference>
      <reference anchor="AGENTIC-GOV-BENCHMARKS" target="https://github.com/drk-ram/enterprise-agentic-governance-benchmarks/releases/tag/v1.0.0">
        <front>
          <title>Enterprise Agentic Governance Benchmarks and Reference Verifier Suite v1.0.0</title>
          <author fullname="Raghuvar Karthik Durga" initials="R. K." surname="Durga"/>
          <date month="November" year="2026"/>
        </front>
        <seriesInfo name="Version" value="1.0.0"/>
      </reference>
      <reference anchor="ZENODO-TR-2026-04" target="https://doi.org/10.5281/zenodo.23735280">
        <front>
          <title>Cryptographic Context Compaction Receipts, Sensitivity Label Inheritance, and Verifiable Right-to-Be-Forgotten Lineage for Agent Memory</title>
          <author fullname="Raghuvar Karthik Durga" initials="R. K." surname="Durga"/>
          <date month="October" year="2026"/>
        </front>
        <seriesInfo name="DOI" value="10.5281/zenodo.23735280"/>
      </reference>
    </references>
  </back>
</rfc>
