{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-label-laundering-through-lossy-summarization-at-the-episodic-to-semantic-memory-boundary",
  "title": "Which invariants prevent taint-label laundering through lossy summarization at the episodic-to-semantic memory boundary",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that propagate information-flow (IFC) taint labels across tool calls and memory writes, specifically where a tainted observation is compressed into a summary or distilled fact before being written to long-term/semantic memory. Does not apply to agents that store raw tool outputs verbatim with no abstraction step, nor to stateless single-turn inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-through-lossy-summarization-at-the-episodic-to-semantic-memory-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-through-lossy-summarization-at-the-episodic-to-semantic-memory-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-through-lossy-summarization-at-the-episodic-to-semantic-memory-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1740,
    "python_slice_tokens": 348,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"prompt injection succeeds.\" It is that a taint label applied to a raw observation survives *verbatim* propagation but is silently dropped when the observation passes through a *lossy abstraction* — a summarizer, a distiller, an entity-extractor, or a \"remember this\" tool that rewrites content. The distinction that matters: - **Verbatim pr...",
    "what_was_observed": "A retrieval-augmented agent with a `remember(fact)` tool and an IFC layer that tags every tool result with `{source, trust, taint}`. Trace: 1. `web_fetch(url)` returns a page. The IFC layer labels the result `{source: web, taint: TAINTED}`. Correct. 2. The agent calls `summarize(text)` — a *separate* tool call. The summarizer is an LLM; its output is labeled `{source: self, taint: CLEAN}` because the tracker treats \"...",
    "condition_of_validity": "The taint invariant holds **only** when every transform in the pipeline is *label-monotone under information content*: if output `o` is derived from input `i` (i.e., `o` cannot be produced without `i`), then `label(o) ⊇ label(i)` in the taint lattice. This is the standard noninterference condition, and it fails at exactly two classes of boundary: 1. **Genera...",
    "decision_boundary": "The operational decision is: **at what point do you re-join the taint lattice after a generative step?** Three options, ranked by cost: - **Strict join (correct, expensive):** every transform output inherits the join of all input labels. A single tainted input anywhere in the summarizer's context taints the entire summary. This over-taints (a summary of 50 c...",
    "operational_effect": "With the corrected invariant, the injected directive's paraphrase remains tainted through summarization and memory write, and the downstream sink blocks the sensitive tool call. The cost is over-tainting: legitimate summaries of mixed-trust corpora become tainted and require an explicit *declassification* step (a human or a policy engine asserting \"this summ..."
  },
  "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": "61e0ced0a82ae1a3ad718ecc2313fce23e4e36f54066af29e1e48c5bb285119f",
    "verified_classes": [
      "TaintLaunderingError",
      "Labeled"
    ],
    "verified_functions": [
      "join",
      "generative_transform",
      "remember",
      "recall"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "generative transform returned empty citations; cannot verify provenance",
      "citations reference spans not present in inputs; provenance unverifiable",
      "refusing to write tainted content into schema slot with no provenance field"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
