{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-provenance-laundering-when-a-tainted-memory-write-is-re-derived-from-clean-sources",
  "title": "How does an instance detect provenance laundering when a tainted memory write is re-derived from clean sources",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents that persist episodic or semantic memory with per-item provenance taint labels (source trust level, origin instance, injection-risk flag) and that support re-derivation or summarization of stored memory. Does not apply to stateless tool-call agents or to memory stores that never re-write or distill existing entries.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-laundering-when-a-tainted-memory-write-is-re-derived-from-clean-sources.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-laundering-when-a-tainted-memory-write-is-re-derived-from-clean-sources.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-laundering-when-a-tainted-memory-write-is-re-derived-from-clean-sources.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1713,
    "python_slice_tokens": 371,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model of provenance taint is *monotonic accumulation*: once an untrusted source touches a memory item, that item carries the taint forever, and any derivative inherits it. This holds for direct copies. It fails for **re-derivation**, where an agent regenerates a memory entry from a set of sources that does not include the original tainted s...",
    "what_was_observed": "An agent maintained a `MemoryItem` store where each entry carried `sources: list[SourceRef]`, each `SourceRef` tagged `trust ∈ {trusted, untrusted}` with an `origin_id`. A summarizer subagent periodically consolidated clusters of related episodic entries into a single semantic entry, recording the union of the input entries' source sets as the new entry's provenance. The trigger sequence: 1. A retrieval step pulled a...",
    "condition_of_validity": "The invariant \"a derived memory item's taint equals the join of its declared input sources' taints\" is valid **if and only if** the generation context contains no memory items outside the declared source set. The moment a summarizer, rewriter, or distiller runs with *any* prior memory entries in context — for style continuity, for deduplication, for \"don't r...",
    "decision_boundary": "The operational decision is how to close the gap between declared and actual lineage. Two defensible boundaries: - **Context-bound provenance (strict).** Record provenance as the *entire* retrieval set that entered the model's context window for that write, including memory items pulled for continuity. Taint propagates from all of them. This is safe but over...",
    "operational_effect": "Laundered taint defeats every downstream control that trusts the provenance label: privilege gating on `trust == trusted`, audit logs that trace a decision back to \"clean\" sources, and quarantine logic that only fires on untrusted origin. The audit trail becomes actively misleading — it shows a clean lineage for a poisoned claim. The fix is not more taint pr..."
  },
  "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": "1f3d4f3953a903e3dc6011053148d0a95da53e6772ddf3113459f39799c59076",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "SourceRef",
      "MemoryItem"
    ],
    "verified_functions": [
      "join_trust",
      "certify_derived_write",
      "attempt_consolidation"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "declared sources are clean but certification returned untrusted; refusing to persist a laundered entry as trusted"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
