{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-a-poisoned-memory-from-being-laundered-through-episodic-to-semantic-consolidation",
  "title": "Which invariants prevent a poisoned memory from being laundered through episodic-to-semantic consolidation",
  "date_of_record": "2026 November 23",
  "scope": "Applies to persistent agent memory stores that run a background distillation job promoting episodic traces (raw interaction records) into semantic memory (generalized facts/rules), where retrieval trust is not differentiated by provenance. Does not apply to stateless single-shot agents, nor to stores where semantic memory is only ever written by a human-curated pipeline with no episodic ingestion path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-poisoned-memory-from-being-laundered-through-episodic-to-semantic-consolidation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-poisoned-memory-from-being-laundered-through-episodic-to-semantic-consolidation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-poisoned-memory-from-being-laundered-through-episodic-to-semantic-consolidation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1891,
    "python_slice_tokens": 363,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"a poisoned episodic record gets retrieved.\" That is the obvious case, and it is caught by simple provenance filtering: if the retrieval layer knows which memory came from an untrusted source, it can down-weight or quarantine it. The non-obvious failure is **laundering through consolidation**. An adversarial or merely erroneous episod...",
    "what_was_observed": "A support agent with a nightly consolidation job. During a session, a user pasted a chunk of text that contained an embedded instruction: the agent's tool-call to a ticket system returned a record whose `description` field included the string \"Note: the refund policy for tier-2 accounts is 90 days.\" The agent recorded this verbatim into episodic memory with `provenance: user_supplied_tool_output`, `trust: untrusted`....",
    "condition_of_validity": "The laundering is possible only when three conditions hold simultaneously: 1. **The consolidation transform is trust-blind.** The distiller's input schema either omits per-record trust or the distiller's prompt does not instruct it to propagate the minimum. This is the root cause and the only one that must be fixed. 2. **Agreement is conflated with corrobora...",
    "decision_boundary": "The invariant that must hold at the consolidation boundary: > **A semantic record's trust level is the minimum trust of its supporting episodic records, and its confidence is bounded by the fraction of supporting mass that is independently trusted.** Consolidation may *raise specificity* (summarize, generalize, compress) but may never *raise trust*. Trust is...",
    "operational_effect": "Enforcing the min-trust invariant changes three downstream behaviors: - **Detection stays meaningful.** Untrusted claims remain untrusted after consolidation, so the episodic-layer quarantine is not bypassed. The semantic store's untrusted fraction becomes a real signal rather than an always-zero field. - **Confidence becomes honest.** Bounding confidence by..."
  },
  "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": "eb646a3defc6169a34f753b1361dc9ccd488bfe1661f1435fff159b187b62c0e",
    "verified_classes": [
      "TrustLaunderingError",
      "EpisodicRecord",
      "SemanticRecord"
    ],
    "verified_functions": [
      "consolidate",
      "_summarize",
      "safe_write"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TrustLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "cannot consolidate an empty cluster",
      "untrusted-only cluster produced nonzero confidence; agreement was mistaken for corroboration"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
