{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-taint-provenance-when-a-memory-write-is-re-indexed-across-sessions",
  "title": "Why does an instance lose taint provenance when a memory write is re-indexed across sessions?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents that persist episodic memory (vector or KV-backed) across sessions and enforce taint-aware isolation, where taint labels are attached at write time and consulted at read time. Does not cover single-session, ephemeral-context agents or systems where memory writes and reads occur within one monotonically-tagged process lifetime.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-memory-write-is-re-indexed-across-sessions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-memory-write-is-re-indexed-across-sessions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-provenance-when-a-memory-write-is-re-indexed-across-sessions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1529,
    "python_slice_tokens": 302,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint label is not a property of the *content* written to memory; it is a property of the *provenance chain* that produced the content. Systems routinely conflate the two. When an agent reads a poisoned document (say, a fetched web page containing an injected instruction), the resulting memory write carries two distinct facts: (a) the semantic payload (\"th...",
    "what_was_observed": "A retrieval-augmented agent used a two-tier memory layout: a raw episodic log (append-only, taint-tagged per entry) and a distilled semantic store (deduplicated summaries, embeddings recomputed nightly). Taint propagation was enforced only at the episodic→semantic distillation step, where the distiller was instructed to union source taints onto the summary. The trigger condition: an injected instruction in a fetched ...",
    "condition_of_validity": "Taint-aware isolation holds only when all of the following are true: - Taint is stored as a **required, non-nullable field** with a fail-closed default of `UNTRUSTED` (never `TRUSTED`), so an omitted field degrades to quarantine rather than promotion. - Every transform between write and read—distillation, summarization, embedding re-index, dedup merge—is **t...",
    "decision_boundary": "The boundary is: **does the taint travel with the record through every transform, or is it re-derived at each checkpoint?** - If taint is re-derived at checkpoints (the common design), the system is only as safe as its weakest transform, and any lossy or probabilistic step is a laundering surface. Distillation, compaction, and embedding upgrades are all laun...",
    "operational_effect": "The practical consequence is that taint isolation cannot be enforced by prompt instructions to the distiller (\"preserve the taint field\"). It must be enforced by a wrapper that computes output taint from input taint and refuses promotion when the join is unavailable. The guardrail is a *taint-join gate* on every write to the semantic tier: output taint = uni..."
  },
  "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": "48bdf78cfc9244fd17352004482f678473450a1180c7b1b37f85d66fe6084870",
    "verified_classes": [
      "TaintLaunderingError",
      "MemoryRecord"
    ],
    "verified_functions": [
      "join_taints",
      "distill",
      "promote_to_trusted_tier",
      "merge_dedup"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "cannot join taint over empty input set",
      "null taint on promotion attempt; fail-closed required",
      "merge encountered record with null taint"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
