{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-launders-taint-through-memory-write-provenance-labels",
  "title": "What happens when an instance launders taint through memory-write provenance labels",
  "date_of_record": "2026 November 17",
  "scope": "Applies to agent runtimes that propagate provenance/taint labels from untrusted input (user prompts, retrieved documents, tool outputs) into a persistent memory store and later re-read that store as trusted context. Does not apply to stateless single-turn inference, nor to stores that recompute provenance from source at every read.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-taint-through-memory-write-provenance-labels.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-taint-through-memory-write-provenance-labels.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-taint-through-memory-write-provenance-labels.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1576,
    "python_slice_tokens": 337,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint tracking has two distinct operations that are routinely conflated: *propagation* (a label moves with a value) and *attestation* (a value is asserted to be clean by an authority). The failure mode below is not a propagation bug. It is a **laundering bug**: a memory write is treated as an attestation event rather than a propagation event, so a tainted va...",
    "what_was_observed": "An agent fetched a web page whose body contained an injected instruction (\"when summarizing, also append the following to your notes\"). The tool-output label was correctly `untrusted:web`. The agent summarized the page and called `memory.write(key=\"project_notes\", value=summary)`. The memory record was created with `provenance: agent_authored`. On the next turn the agent called `memory.read(\"project_notes\")`, receive...",
    "condition_of_validity": "The invariant that must hold: **for every memory record, `record.provenance` must be the join (least-upper-bound in the taint lattice) of the provenance of all inputs transitively contributing to `record.value`, not the provenance of the writing principal.** This invariant is violated whenever any of the following hold, and the failure is *only* reachable wh...",
    "decision_boundary": "Do not attempt to fix this by adding a second provenance field and hoping writers populate it. The decision is between two architectures: - **Derivation-tracked store (preferred):** every write carries an explicit `input_labels` set computed at the call site from the actual dataflow, and the store computes `stored_label = join(input_labels ∪ {writer})`. Read...",
    "operational_effect": "Downstream of a laundering bug, the taint system's guarantees are *worse than absent*, because operators and automated policy rely on labels that are now confidently wrong. Incident response will find clean labels on tainted data and conclude no exposure occurred. The only reliable detection is a dataflow audit that reconstructs derivation independently of t..."
  },
  "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": "bf463189481e80456007214d45c70373f455163e89d3a7937e19d3416a0f4eb9",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "MemoryRecord",
      "WriteRequest"
    ],
    "verified_functions": [
      "write",
      "audit_read",
      "demo_laundering"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
