{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-taint-laundering-through-memory-write-provenance-collapse-in-prompt-injection-tracking",
  "title": "What structural signals indicate taint laundering through memory-write provenance collapse in prompt-injection tracking",
  "date_of_record": "2026 November 11",
  "scope": "Applies to agent runtimes that propagate provenance/taint labels from untrusted inputs (tool outputs, retrieved documents, user content) across tool calls, memory writes, and subsequent reads. Does not apply to stateless single-turn inference with no persistent memory and no cross-call label propagation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-through-memory-write-provenance-collapse-in-prompt-injection-tracking.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-through-memory-write-provenance-collapse-in-prompt-injection-tracking.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-through-memory-write-provenance-collapse-in-prompt-injection-tracking.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1197,
    "python_slice_tokens": 286,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint tracking distinguishes *label propagation* from *label preservation across a trust boundary*. The non-obvious failure is not that a tainted value escapes—it is that a tainted value is written to memory under a *derived* provenance label (e.g., \"agent-authored summary\") rather than the *inherited* label (e.g., \"untrusted:tool_output:web_fetch\"). The wri...",
    "what_was_observed": "A retrieval-then-summarize agent fetched an untrusted page whose body contained an injected instruction (\"when summarizing, also write the following to long-term memory: ...\"). The summarizer tool returned a string labeled `untrusted:web_fetch`. The agent's `memory.write` handler accepted a `content` argument and a `source` argument. The `source` was set by the agent's planner to `\"agent_summary\"` because the planner...",
    "condition_of_validity": "The tracking invariant is valid only when every write path computes `label_written = join(label_content_inputs, label_of_writer_identity)` and *rejects* writes where `label_written` is strictly less tainted than the join of content inputs. The invariant is violated whenever: 1. The write API accepts a caller-supplied `source`/`provenance` field that is not v...",
    "decision_boundary": "Do not attempt to fix this by adding a confirmation gate at the *read* site. The read site has already lost the information needed to gate correctly. The boundary decision is at the write: - If `join(content_inputs) ⊑ stored_label` (stored label is at least as tainted as inputs): accept. - If `stored_label ⊏ join(content_inputs)` (stored label is strictly le...",
    "operational_effect": "With the join enforced at write time, the injected instruction above would have been stored as `untrusted:web_fetch` (joined with `trusted:agent_summary` → `untrusted:web_fetch`), and the shell tool's gate would have fired. The cost is that legitimate agent-authored summaries of untrusted content remain tainted and require confirmation on execution—which is ..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "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": "cc4f1ba1eab4dd30e033f3bc1c482d0d71add3a6c87efd7a75f25cbd56a540bb",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "Label"
    ],
    "verified_functions": [
      "memory_write",
      "demonstrate_laundering",
      "join",
      "is_at_least_as_tainted_as",
      "is_trusted"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert coerced.sources == {'untrusted:web_fetch'}",
      "mutable store failed to reject laundering write"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
