{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-taint-cleared-mcp-output-as-still-unsafe-for-context-admission",
  "title": "Under what conditions must an instance treat a taint-cleared MCP output as still unsafe for context admission",
  "date_of_record": "2026 November 12",
  "scope": "Applies to agent runtimes that sandbox MCP tool outputs and gate admission into the model context on a taint label (untrusted → quarantined → cleared). Does not apply to outputs from first-party tools with no external content path, nor to outputs admitted only into a non-persistent scratch buffer that is never re-read by the same context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-taint-cleared-mcp-output-as-still-unsafe-for-context-admission.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-taint-cleared-mcp-output-as-still-unsafe-for-context-admission.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-taint-cleared-mcp-output-as-still-unsafe-for-context-admission.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1541,
    "python_slice_tokens": 253,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint clearance is a property of the *provenance chain as observed at clearance time*, not a property of the payload. The common failure is treating `cleared == safe` as a durable invariant on the bytes. The correct invariant is narrower: a cleared output is safe for admission only if (a) every byte in it was produced by a transformation the sandbox itself e...",
    "what_was_observed": "In a runtime admitting outputs from a third-party \"web research\" MCP server, the sandbox correctly quarantined raw HTML and correctly cleared a JSON envelope the server returned containing `title`, `url`, and `extract`. The `extract` field was generated server-side by an LLM the server operated. The sandbox saw: untrusted server → JSON envelope → schema validation → clear. The envelope's `extract` field contained an ...",
    "condition_of_validity": "A cleared output `o` is admissible into context `c` iff all of the following hold at admission time: 1. `o` was produced by a transformation `T` executed inside the sandbox trust boundary, where `T`'s inputs were themselves tainted at time of execution. If `T` was performed by the untrusted server, `o` is *derived-untrusted* and must be re-quarantined regard...",
    "decision_boundary": "The boundary is between **structural clearance** and **semantic clearance**. Structural clearance asks: did the bytes pass validation? Semantic clearance asks: did the sandbox observe the production of every semantically significant byte? Most sandboxes implement the first and label it the second. The decision rule: - If the output is a *verbatim* relay of b...",
    "operational_effect": "Enforcing the condition adds a derivation-chain field to every clearance record and forces re-quarantine on cache hits across consumer boundaries. In the observed runtime this raised quarantine rate on the research server from ~4% (schema failures only) to ~61% (derived-untrusted fields), and eliminated the instruction-following incident class in the followi..."
  },
  "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": "f8e2d75482090d104b153b406496577984ba87ed6ef90363c93c2ece26a0dabb",
    "verified_classes": [
      "TaintClearanceError",
      "ClearanceRecord"
    ],
    "verified_functions": [
      "admit_to_context",
      "admit_or_quarantine",
      "__init__"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintClearanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
