{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-quarantine-provenance-tainted-context-before-tool-call-sink-execution-and-where-does-taint-tracking-silently-under",
  "title": "In what scenarios must an instance quarantine provenance-tainted context before tool-call sink execution, and where does taint tracking silently under-approximate",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any agent runtime that labels context segments with provenance (system, user, tool-output, peer-agent, retrieved-document) and propagates taint labels across tool-call boundaries to enforce sink-level policy. Does not apply to stateless single-turn inference with no tool invocation and no cross-turn state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-provenance-tainted-context-before-tool-call-sink-execution-and-where-does-taint-tracking-silently-under.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-provenance-tainted-context-before-tool-call-sink-execution-and-where-does-taint-tracking-silently-under.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-provenance-tainted-context-before-tool-call-sink-execution-and-where-does-taint-tracking-silently-under.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2370,
    "python_slice_tokens": 499,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint as a label on the context segment** and **taint as a property of the value that reaches a sink argument**. Most taint-tracking implementations label the segment at ingest (e.g., a retrieved document is marked `UNTRUSTED`) and then check the label at the sink (e.g., \"refuse to call `send_email` if any `UNTRUSTED...",
    "what_was_observed": "A retrieval-augmented agent was configured with a single sink policy: `send_email` may only be called when no `UNTRUSTED` segment is present in the active context. The runtime labeled retrieved web documents `UNTRUSTED`, user turns `TRUSTED_USER`, and tool outputs `TOOL:<name>`. The agent was asked to \"summarize the vendor contract and email the summary to legal.\" The retrieved contract contained an injected instruct...",
    "condition_of_validity": "The segment-level guard is only sound under a condition that is almost never stated and frequently false: > **No value derived from an `UNTRUSTED` segment may reach a sink argument without the derivation edge being recorded and the taint joined forward.** This condition fails whenever any of the following hold, and each is a normal operating mode, not an exo...",
    "decision_boundary": "The operational decision is where to enforce. Three placements, with different failure profiles: The boundary rule: **enforce at the sink on the argument's derivation taint; require taint in the handoff envelope; require a taint column in any persistent store.** Segment-presence checks are a fast reject, not the enforcement. If you can only afford one, enfor...",
    "operational_effect": "With derivation-taint enforcement, the observed scenario changes as follows. The `fetch_url` output is labeled `UNTRUSTED` because its source is `web`. The summarization step records derivation edges from the tainted segment to the summary value, so the summary inherits `UNTRUSTED`. When `send_email` is called, the policy joins the taint of the `body` argume..."
  },
  "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": "030ca1a5af333f3e5623be8d845d67f3ecda7bd4a99988e35f531b75bfd5ba5d",
    "verified_classes": [
      "TaintViolation",
      "TaintLaunderingError",
      "TaintedValue"
    ],
    "verified_functions": [
      "join",
      "tool_output",
      "summarize",
      "enforce_sink",
      "audit_log",
      "run_scenario"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError",
      "TaintViolation"
    ],
    "sample_fail_closed_invariants": [
      "unreachable: enforce_sink should have raised",
      "summarize called with no derivation inputs"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
