{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-taint-tracking-when-retrieved-context-is-re-summarized-inside-the-sandbox-boundary",
  "title": "Why does an instance lose taint tracking when retrieved context is re-summarized inside the sandbox boundary",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent runtimes that quarantine untrusted retrieved context (web pages, tool outputs, third-party documents) inside a taint-propagating sandbox and rely on provenance labels surviving summarization, chunking, or re-embedding. Does not apply to runtimes where untrusted content is never read by the reasoning model, only by a deterministic parser.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-tracking-when-retrieved-context-is-re-summarized-inside-the-sandbox-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-tracking-when-retrieved-context-is-re-summarized-inside-the-sandbox-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-taint-tracking-when-retrieved-context-is-re-summarized-inside-the-sandbox-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2241,
    "python_slice_tokens": 481,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-propagating sandbox enforces one invariant: **every token that reaches the trusted reasoning loop must carry an ancestry label indicating whether it descends from untrusted input.** The common mental model treats this as a labeling problem on *inputs*—tag the retrieved document, and the tag travels with it. That model is wrong. The label must be an i...",
    "what_was_observed": "A retrieval-augmented agent was configured with a sandboxed \"reader\" sub-agent. Untrusted documents were passed to the reader, which produced a structured summary (`{claims: [...], entities: [...], quotes: [...]}`). Each summary field was supposed to carry a `provenance: \"untrusted\"` marker. The orchestrator then admitted the summary into the trusted planner's context, treating `provenance: untrusted` as a signal to ...",
    "condition_of_validity": "The taint invariant holds only under the following conjunction: - **Schema closure.** Every model-mediated transformation must accept and emit the full provenance lattice. A transformation whose input or output schema omits provenance is a taint-laundering step and must be rejected at the sandbox boundary, not trusted to behave. - **Default-deny labeling.** ...",
    "decision_boundary": "The operator must decide, per transformation, whether to **enforce** or **forfeit** the taint guarantee: - If a transformation's schema carries provenance end-to-end, the transformation may run inside the sandbox and its output may be admitted as `untrusted` (still quarantined, still requiring corroboration). - If a transformation cannot carry provenance—bec...",
    "operational_effect": "Enforcing schema closure and default-deny labeling converts the sandbox from a probabilistic filter into a structural one. The practical effects observed after retrofit: - Normalizer and deduplication steps were rewritten to accept `{text, provenance}` tuples and emit the same, with provenance merged by lattice join (untrusted dominates). Token cost rose ~8%..."
  },
  "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": "b9fe1b147c64943dddcc392eb15591e9196ede778de9084a9373015152ed55c6",
    "verified_classes": [
      "Provenance",
      "TaintChainBroken",
      "Tainted"
    ],
    "verified_functions": [
      "admit_to_trusted_loop",
      "run_normalizer",
      "demo",
      "join"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "TaintChainBroken"
    ],
    "sample_fail_closed_invariants": [
      "assert admitted.provenance is Provenance.UNTRUSTED",
      "assert 'normalizer-v1' in admitted.chain",
      "normalizer produced empty output; refusing admission"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
