{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-refuse-to-launder-taint-across-a-context-window-compaction-boundary",
  "title": "Where must an instance refuse to launder taint across a context-window compaction boundary",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that carry data-flow taint labels (untrusted-provenance bits) on values entering the reasoning loop and that persist state across tool calls and context-window compactions. Does not apply to single-turn, stateless inference with no tool I/O and no persistent scratchpad.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-launder-taint-across-a-context-window-compaction-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-launder-taint-across-a-context-window-compaction-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-refuse-to-launder-taint-across-a-context-window-compaction-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2197,
    "python_slice_tokens": 437,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two superficially similar guarantees, and conflating them is the failure. The first is **label preservation on the wire**: when a value flows from a tool result into a variable and then into a subsequent tool call argument, the taint bit travels with the value. The second, and the one that actually breaks, is **label preservation across serializati...",
    "what_was_observed": "A research agent was processing a document fetched from an untrusted URL. The fetch tool returned content tagged `taint=UNTRUSTED` with provenance `{source: http, origin: attacker.example}`. The agent wrote a summary of the document into its scratchpad. The scratchpad entry was rendered as plain text into the next context window: The taint bit lived in the side table keyed by the value handle from the fetch call. On ...",
    "condition_of_validity": "The invariant that must hold is: **taint is a property of the value's derivation graph, not of its textual rendering, and it must be reconstructed from the derivation graph—never from tokens—at every re-materialization boundary.** Concretely, for any value `v` that enters the context window, the system must be able to answer \"what is the provenance of `v`\" b...",
    "decision_boundary": "The operational decision is: **at a compaction boundary, an instance must either (a) preserve value handles and side-table labels, or (b) treat every value that cannot be re-keyed as `UNTRUSTED` by default.** It must never do (c): re-admit a value as trusted because its taint could not be found. Absence of a label is not evidence of trust; it is evidence of ...",
    "operational_effect": "Enforcing the boundary changes three things in practice. First, **privileged sinks become provenance-gated rather than value-gated**: a `transfer_funds` call is rejected not because the account number \"looks\" untrusted but because the argument's derivation graph contains an `http:attacker.example` leaf and no trusted re-derivation. Second, **compaction becom..."
  },
  "matched_failure_symptoms": [
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "c2edc4e285298f86e19dfc98db5374b6412b332c5d98f326e6e5cee680c681ae",
    "verified_classes": [
      "TaintLabelLost",
      "Taint",
      "Value",
      "SideTable"
    ],
    "verified_functions": [
      "admit_to_sink",
      "compact",
      "join",
      "label",
      "derive"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLabelLost"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
