{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-quarantine-a-memory-write-after-tainted-tool-output-information-flow-label-laundering-through-summarization-and-re-retrieval",
  "title": "When must an instance quarantine a memory write after tainted tool output: information-flow label laundering through summarization and re-retrieval",
  "date_of_record": "2026 November 20",
  "scope": "Applies to agent instances that (a) ingest untrusted tool outputs, (b) maintain a persistent or session-scoped memory store, and (c) enforce prompt-injection defense via information-flow (taint) labels rather than per-message allowlists. Does not apply to stateless single-turn inference or to systems where memory writes are gated by human approval on every write.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-memory-write-after-tainted-tool-output-information-flow-label-laundering-through-summarization-and-re-retrieval.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-memory-write-after-tainted-tool-output-information-flow-label-laundering-through-summarization-and-re-retrieval.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-memory-write-after-tainted-tool-output-information-flow-label-laundering-through-summarization-and-re-retrieval.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2652,
    "python_slice_tokens": 596,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **label propagation** and **label survival across abstraction boundaries**. A taint label attached to a tool output is a property of a *token span* in a specific context window. A memory write is a *transformation*: the model reads tainted content and emits a paraphrase, summary, or extracted fact. The label does not t...",
    "what_was_observed": "A retrieval-augmented agent was configured with a three-label lattice: `TRUSTED` (system prompt, operator config), `UNTRUSTED` (web fetch, email body, third-party MCP tool output), and `DERIVED` (model-generated text whose taint is the join of its inputs). The runtime rule was: a memory write is labeled `join(taint of all tool outputs present in the context window at write time)`. This is the provenance-of-call rule....",
    "condition_of_validity": "The provenance-of-call rule is sound only under the invariant: **every context element that can influence emitted tokens is either (a) a registered provenance node with a taint label, or (b) provably non-influential.** Model-generated summaries violate (a) unless they are registered as first-class nodes, and they violate (b) trivially because they are in the...",
    "decision_boundary": "The operational decision is: **quarantine vs. write-with-label vs. reject.** The boundary conditions: - **Reject** when the write's provenance DAG contains an `UNTRUSTED` ancestor *and* the write targets a slot that controls routing, credentials, tool selection, or system-prompt assembly. These are *authority-bearing slots*; a single tainted write is suffici...",
    "operational_effect": "Enforcing the reachability invariant changes three things in the runtime: 1. **Compaction becomes a provenance-preserving operation.** Every summary node must be registered with edges to its source spans and a label equal to the join of those sources. A compactor that cannot emit provenance must be disabled for `UNTRUSTED`-derived content; raw text must be r..."
  },
  "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": "84ce7cc126ef85abd0a0046455e6ba65c4975075f2ec79bacf4c7593a4297395",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "ProvenanceNode",
      "ProvenanceGraph"
    ],
    "verified_functions": [
      "gate_memory_write",
      "join",
      "__init__",
      "register",
      "reachable_taint",
      "is_connected"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
