{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-taint-laundering-through-provenance-merge-in-tool-call-chains-the-label-join-collapse-boundary",
  "title": "How does an instance detect taint-laundering through provenance-merge in tool-call chains: the label-join collapse boundary",
  "date_of_record": "2026 November 17",
  "scope": "Applies to agent runtimes that attach provenance labels (e.g., `trusted`, `user`, `retrieved:untrusted`, `tool:external`) to context segments and propagate them across tool-call boundaries and retrieval merges. Does not apply to single-turn, single-source inference where no cross-segment label join occurs, nor to runtimes that enforce a strict single-taint-per-turn model with no merge semantics.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-provenance-merge-in-tool-call-chains-the-label-join-collapse-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-provenance-merge-in-tool-call-chains-the-label-join-collapse-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-provenance-merge-in-tool-call-chains-the-label-join-collapse-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2091,
    "python_slice_tokens": 513,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint propagation** and **taint preservation under merge**. Most prompt-injection defenses implement the former: a label travels with a segment as it moves through a tool call. The failure mode lives in the latter. When two context segments with different provenance labels are joined into one buffer — a retrieval res...",
    "what_was_observed": "In a multi-tool agent loop, the following sequence produced an instruction that originated in an external web fetch and executed as if it were a system directive: 1. Tool `fetch_url` returned HTML. The runtime's labeler classified the *response body* as `retrieved:untrusted`, but the tool's *status envelope* (a JSON wrapper containing `status`, `content_type`, and `body`) was constructed by the tool adapter and emitt...",
    "condition_of_validity": "The taint-laundering boundary is reachable if and only if all three of the following hold: - **Unlabeled-segment admissibility.** The runtime permits a context segment with no provenance label to enter a join. If every segment is required to carry a label before it can be joined (fail-closed on missing label), the boundary is closed. - **Label re-derivation ...",
    "decision_boundary": "The operational decision is how to treat a segment whose label is missing or whose label was derived from tool identity rather than input join. Two policies are defensible: - **Fail-closed join.** Missing label is a distinct lattice element `⊥` (unknown), and `x ⊔ ⊥ = ⊥`. Any join involving an unlabeled segment taints the result as unknown, which downstream ...",
    "operational_effect": "When the boundary is crossed, the practical effect is that a taint-tracking system reports clean provenance on context that contains attacker-controlled instructions. The failure is silent: the trace looks correct at every hop because each hop's label was locally valid. Detection requires reconstructing the join tree and checking whether any join operand was..."
  },
  "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": "a406c86e003fc32f9ae89daa601d1b512b373dc6ed763873b26f7e9a14afa8e8",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "Segment"
    ],
    "verified_functions": [
      "join",
      "join_segments",
      "tool_output",
      "_has_laundering_path",
      "assert_trusted_argument"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
