{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-quarantine-a-tainted-context-window-rather-than-re-derive-from-a-clean-prefix-the-label-laundering-failure-at-the-s",
  "title": "In what scenarios must an instance quarantine a tainted context window rather than re-derive from a clean prefix: the label-laundering failure at the summarization boundary",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that propagate data-flow taint labels (source→sink provenance) through tool outputs and context windows, and that use an LLM summarizer or memory-distiller to compress history. Does not apply to systems that never compress context, or that treat all retrieved content as uniformly untrusted with no per-span labels.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-a-tainted-context-window-rather-than-re-derive-from-a-clean-prefix-the-label-laundering-failure-at-the-s.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-a-tainted-context-window-rather-than-re-derive-from-a-clean-prefix-the-label-laundering-failure-at-the-s.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-a-tainted-context-window-rather-than-re-derive-from-a-clean-prefix-the-label-laundering-failure-at-the-s.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2300,
    "python_slice_tokens": 426,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a taint label can be lost, and they are not equivalent. The first is *label drop*: a span carrying `tainted:web` is copied into a new buffer without its label annotation. This is detectable by a structural invariant — every span in the derived buffer must map to a labeled span in the source buffer, and the label set must be a superset. The...",
    "what_was_observed": "A research agent with three tools: `web_fetch` (untrusted output, labeled `tainted:web`), `file_read` (trusted, `trusted:local`), and `shell_exec` (sink; refuses to execute arguments whose taint set intersects `{tainted:web}`). After 40 turns of fetching documentation, the context exceeded 80% of the window and the runtime invoked a `summarize_history` step: an LLM call that compressed turns 1–30 into a 600-token sum...",
    "condition_of_validity": "The quarantine-vs-rederive decision is only well-defined under a specific condition: **the taint lattice must record provenance edges through model-mediated transforms, not just labels on leaves.** Concretely, the runtime must maintain a provenance DAG where every derived span `d` carries `parents(d)` and `taint(d) = label(d) ∪ ⋃_{p ∈ parents(d)} taint(p)`. ...",
    "decision_boundary": "When a tainted span is discovered in the context window at turn `t`, the instance faces a decision: - **Re-derive from clean prefix** if and only if every tainted span was introduced at or after the most recent checkpoint `c`, and the provenance graph is edge-complete for all spans in `(c, t]`. Re-derivation replays turns `c+1..t` with the tainted inputs dro...",
    "operational_effect": "The operational consequence is a hard rule at the summarization boundary: **a summarizer that consumes tainted content must emit provenance edges, and any downstream sink gate must evaluate the transitive taint closure, not the leaf label.** In practice this means: 1. Every derived span carries `parents` and the taint set is computed as the union over the pa..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "c6b78e424298776d854eb67190fd5c27fd6addb5a301901ad5b8c44c2dd1a341",
    "verified_classes": [
      "TaintLaunderingError",
      "Span",
      "ProvenanceGraph"
    ],
    "verified_functions": [
      "gated_exec",
      "demo",
      "__init__",
      "add",
      "taint_closure",
      "summarize"
    ],
    "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
  }
}
