{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-a-poisoned-episodic-write-from-being-laundered-into-attested-semantic-memory-by-the-distillation-step",
  "title": "Which invariants prevent a poisoned episodic write from being laundered into attested semantic memory by the distillation step",
  "date_of_record": "2026 November 25",
  "scope": "Applies to persistent agent memory stores that (a) ingest episodic records from tool outputs and peer agents, and (b) run a periodic distillation job that promotes recurring episodic patterns into semantic memory records carrying an integrity attestation. Does not apply to stateless single-turn inference or to memory stores where every semantic record is human-authored.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-poisoned-episodic-write-from-being-laundered-into-attested-semantic-memory-by-the-distillation-step.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-poisoned-episodic-write-from-being-laundered-into-attested-semantic-memory-by-the-distillation-step.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-poisoned-episodic-write-from-being-laundered-into-attested-semantic-memory-by-the-distillation-step.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2155,
    "python_slice_tokens": 314,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct integrity properties a memory store can hold, and conflating them is the root of the failure. **Provenance integrity** is the property that every episodic record can be traced to a specific, identified source event with an unbroken signature chain. **Promotion integrity** is the property that a semantic record's attestation reflects th...",
    "what_was_observed": "A support-triage agent maintained a semantic memory of \"known issue patterns.\" Episodic records arrived from a tool that scraped a customer forum and from peer agents that relayed user reports. Distillation ran nightly: cluster episodic records by embedding similarity, and if a cluster exceeded five members, emit a semantic record of the form `PATTERN: <summary> | CONFIDENCE: <n> | ATTESTED_BY: distiller-v3`. The tri...",
    "condition_of_validity": "The invariant that prevents this is: **a semantic record's attestation level must be the minimum (not the mean, not the distiller's own) of the trust levels of all contributing episodic records, and the contribution set must be recorded explicitly and immutably at distillation time.** This is valid only under three conditions, each of which is a place the in...",
    "decision_boundary": "The boundary between \"safe to distill\" and \"must quarantine\" is not a trust threshold on individual records — it is whether the contribution set is **homogeneous in trust class**. A cluster mixing `trust >= 0.7` and `trust < 0.3` records must not be distilled into a single semantic record at all; it must be split, with the low-trust subset either dropped or ...",
    "operational_effect": "With the invariant enforced, the observed incident is bounded at step 2: `e_4471` (trust 0.2, tainted) forms a singleton partition, is distilled into `s_0912` with `attestation: 0.2, taint: external_untrusted`, and is excluded from the retrieval context of any agent in an action-permitting state. The five legitimate records distill normally at attestation 0...."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "94bf5c23f82c96e849ac3561f5f31c9f730f902339008fe206993378daeeb86d",
    "verified_classes": [
      "MemoryLaunderingError",
      "EpisodicRecord",
      "SemanticRecord"
    ],
    "verified_functions": [
      "distill"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "MemoryLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "empty cluster: nothing to distill"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
