{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-taint-laundering-when-provenance-labels-decay-across-tool-output-re-entry-and-memory-consolidation",
  "title": "How does an instance detect taint laundering when provenance labels decay across tool-output re-entry and memory consolidation",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that persist tool outputs into long-term memory or scratch state and later re-read them as trusted context, where provenance labels (source, trust tier, taint bit) are attached at ingress. Does not cover pure stateless single-turn inference or systems that never write tool output back into their own context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-when-provenance-labels-decay-across-tool-output-re-entry-and-memory-consolidation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-when-provenance-labels-decay-across-tool-output-re-entry-and-memory-consolidation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-when-provenance-labels-decay-across-tool-output-re-entry-and-memory-consolidation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2382,
    "python_slice_tokens": 456,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint as a label** and **taint as a property of the bytes**. A provenance label is metadata riding alongside content. The moment content is copied, summarized, re-serialized, or embedded into a new artifact, the label does not automatically follow — and if it does follow, it is frequently re-derived from the *current...",
    "what_was_observed": "A three-hop trace, reproduced across multiple runs with a fixed tool set: 1. **Ingress.** `fetch_url` returns page body. Wrapper attaches `taint=untrusted, origin=web, hop=0`. The model consumes it inside a tool-result block. Correct so far. 2. **Distillation.** The model is asked to \"extract action items from the page.\" It emits a scratchpad write: `memory.write(key=\"actions\", value=\"Deploy key rotates Friday; also ...",
    "condition_of_validity": "The invariant that must hold for taint tracking to mean anything: > For every artifact `a` derived from a set of inputs `I`, `taint(a) = OR(taint(i) for i in I)` — the taint of a derived artifact is the disjunction of the taint of its inputs, and `origin` must record the *most restrictive* input origin, not the writer's identity. This is a monotonicity requi...",
    "decision_boundary": "The operational question is not \"is this content tainted?\" but \"can this content's taint be *reconstructed* at the point of use?\" Two regimes: - **Reconstructible.** The store records, per record, the set of contributing source IDs and their taint bits, and the read path recomputes the disjunction. Here a tainted record read into context is flagged even if t...",
    "operational_effect": "With the invariant enforced, three behaviors change: 1. **Laundering becomes loud.** A tainted web page summarized into memory produces a memory record that reads back `taint=untrusted`. The agent, on re-entry, sees the flag in the tool result and the policy gate blocks any privileged action (`shell.run`, `secret.read`) whose arguments derive from tainted co..."
  },
  "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": "4d8e6453478723b2a34b9788485412ed5e315d1d46c25b91918d4031fabca8bd",
    "verified_classes": [
      "TaintLaunderingError",
      "Provenance",
      "ProvenanceLedger"
    ],
    "verified_functions": [
      "consolidate",
      "__init__",
      "register_source",
      "write",
      "read",
      "declassify"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
