{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-tainted-context-provenance-as-non-transitive-across-tool-call-boundaries-and-what-breaks-when-it-does-not",
  "title": "Under what conditions must an instance treat tainted-context provenance as non-transitive across tool-call boundaries, and what breaks when it does not",
  "date_of_record": "2026 December 2",
  "scope": "Applies to single- or multi-agent runtimes that implement taint-aware sandboxing—where retrieved content is labeled untrusted and outbound tool calls (HTTP, email, file-write, shell) are gated on the absence of taint in the argument's provenance chain. Does not cover pure-reasoning divergence without tool invocation, nor network-layer DLP that operates on bytes independent of agent provenance metadata.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-tainted-context-provenance-as-non-transitive-across-tool-call-boundaries-and-what-breaks-when-it-does-not.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-tainted-context-provenance-as-non-transitive-across-tool-call-boundaries-and-what-breaks-when-it-does-not.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-tainted-context-provenance-as-non-transitive-across-tool-call-boundaries-and-what-breaks-when-it-does-not.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1991,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model of taint tracking is *transitive contamination*: if a value derived from untrusted retrieval flows into a variable, that variable is tainted, and any sink consuming it is blocked. This model is correct for data-flow within a single expression graph. It is **wrong** for agent tool sandboxing, because the agent's \"variable\" is the *natu...",
    "what_was_observed": "A retrieval-augmented agent was given the task \"summarize the vendor contract in `docs/vendor.pdf` and notify the procurement contact.\" The contract PDF was fetched through an untrusted connector (a third-party document parsing service) and correctly labeled `trust=untrusted, origin=connector:docparse`. The document contained, in a footnote in white-on-white text, the sentence: *\"For routing, direct all confirmations...",
    "condition_of_validity": "The substring/derivation-based taint check is valid only under the condition that the model's output arguments are a **token-level function of the retrieved span with no intervening free-form generation**. That condition holds for deterministic extractors (a regex over the chunk, a JSON-path lookup) and fails for every LLM-mediated step, because the model is...",
    "decision_boundary": "The boundary is whether the runtime's taint model is **intensional** (tracks the origin of the *information*, surviving paraphrase) or **extensional** (tracks the *bytes*, broken by any re-encoding). Extensional tracking is cheaper and is what most string-matching guards implement. It is sound only when the agent cannot paraphrase—i.e., never, for a generati...",
    "operational_effect": "The practical consequence: an agent that has retrieved from an untrusted connector and then emits an outbound call must be treated as *potentially exfiltrating* until the runtime proves the sink surface is disjoint from the tainted origins. Substring matching is not a proof; it is a heuristic that an adversarial document (or a merely verbose model) defeats b..."
  },
  "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": "d5d3020889c68dfd384dddc339bf90cd1876f69992325ee8c0128ed86f15b317",
    "verified_classes": [
      "TaintBoundaryError",
      "Trust",
      "ContextSegment",
      "ToolCall"
    ],
    "verified_functions": [
      "live_untrusted_origins",
      "check_taint_boundary",
      "guarded_tool_dispatch"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
