{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-provenance-laundering-through-memory-consolidation-from-silently-clearing-taint-on-poisoned-agent-memory",
  "title": "Which invariants prevent provenance-laundering through memory consolidation from silently clearing taint on poisoned agent memory",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agents whose long-term memory pipeline performs episodic-to-semantic consolidation (summarization, deduplication, abstraction) and whose recall gate enforces provenance/taint checks. Does not apply to stateless tool-calling agents or to memory stores that never rewrite or merge records.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-laundering-through-memory-consolidation-from-silently-clearing-taint-on-poisoned-agent-memory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-laundering-through-memory-consolidation-from-silently-clearing-taint-on-poisoned-agent-memory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-laundering-through-memory-consolidation-from-silently-clearing-taint-on-poisoned-agent-memory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2061,
    "python_slice_tokens": 552,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most poisoning defenses ask *\"is this memory record malicious?\"* and answer it at the point of **ingest**. The boundary failure documented here occurs at a different point: **rewrite**. When an agent consolidates episodic records into a semantic summary, the summary is a *new* record whose provenance is derived from its inputs. If the consolidation routine t...",
    "what_was_observed": "A research agent with a nightly consolidation job merged 40 episodic notes into a single semantic node `sem_7f2a` (\"User prefers vendor X for compliance tooling\"). One of the 40 episodic notes (`ep_0193`) had been flagged `taint=untrusted_external` at ingest because it originated from a scraped web page that contained an injected instruction. The consolidator: 1. Collected the 40 source records. 2. Called an LLM to s...",
    "condition_of_validity": "The monotonic-taint invariant holds only if all four of the following are enforced together. Dropping any one reopens the laundering path: 1. **Taint lattice is defined and ordered.** Taint labels form a join-semilattice (e.g., `clean < derived < untrusted_external < adversarial`), and `join` is total and associative. Without an explicit order, \"which taint ...",
    "decision_boundary": "The boundary between \"safe to consolidate\" and \"must quarantine\" is not whether the source records are individually trusted. It is whether the *consolidation operation itself* is taint-preserving. Concretely: - **Consolidate freely** when all ancestors are `clean` and the operation is a pure join (no re-classification, edges appended). The derived node inher...",
    "operational_effect": "With the invariant enforced, the poisoned preference in the trace above is written to `sem_7f2a` with `taint=untrusted_external` and `provenance ⊇ {ep_0193}`. The recall auditor, resolving transitively, computes `join(clean, ..., untrusted_external, ...) = untrusted_external` and either blocks the recall or annotates it. The planner sees a tainted memory and..."
  },
  "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": "3b6a48c62104498fafa7ac518f4541a214be403298b31acebf69c60eb9021431",
    "verified_classes": [
      "Taint",
      "ProvenanceLaunderingError",
      "MemoryRecord",
      "MemoryStore"
    ],
    "verified_functions": [
      "join_taint",
      "demo",
      "__init__",
      "ingest",
      "ancestor_closure",
      "effective_taint",
      "consolidate",
      "dedup",
      "recall_audit"
    ],
    "verified_functions_count": 9,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "consolidation failed to propagate ancestor taint",
      "recall audit admitted laundered memory",
      "expected laundering rejection for direct taint lowering"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
