{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-tool-result-as-tainted-multi-hop-provenance-collapse-at-the-label-join-boundary",
  "title": "When must an instance treat a tool result as tainted: multi-hop provenance collapse at the label-join boundary",
  "date_of_record": "2026 November 10",
  "scope": "Applies to agent runtimes that propagate data-flow provenance labels (taint) across tool calls, sub-agent delegations, and context compaction, where a single logical value may be assembled from multiple upstream sources. Does not apply to single-hop tool use where every result is consumed directly by the requesting model turn, nor to stateless stateless prompt-injection filters that classify text without tracking its origin.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-multi-hop-provenance-collapse-at-the-label-join-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-multi-hop-provenance-collapse-at-the-label-join-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-multi-hop-provenance-collapse-at-the-label-join-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1582,
    "python_slice_tokens": 407,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **provenance of the bytes** and **provenance of the instruction**. A tool result can be byte-clean (no injection string present) yet carry an instruction semantically because an earlier hop laundered attacker-controlled text into a trusted-looking field. Taint tracking fails not when a label is missing, but when a **la...",
    "what_was_observed": "In a multi-hop chain (fetch → extract → summarize → write-to-ticket), the runtime tracked taint per tool-call result. Hop 1 fetched an external page; the extractor returned a structured object `{title, body}` and the runtime correctly labeled both fields `taint=external`. Hop 2 passed only `body` to a summarizer sub-agent, which returned a plain string labeled `taint=derived:external`. Hop 3 rendered a ticket body vi...",
    "condition_of_validity": "This failure mode is live only when all three hold: 1. **Label-join asymmetry.** At least one operation in the chain combines values from differently-labeled sources and does not compute the result label as `join(labels) = max_taint`. Template rendering, dict merge, string concatenation, and JSON serialization are the common offenders. 2. **Cross-hop reachab...",
    "decision_boundary": "An instance must treat a tool result as tainted when **any** of the following is true at the point of consumption: - The value was produced by a join/serialize/template operation whose operand labels were not all `none`. - The value passed through a coercion or validation step that did not explicitly preserve provenance metadata. - The value's provenance is ...",
    "operational_effect": "The practical consequence is that provenance must be carried as a first-class value attached to the data, not to the tool call, and every combinator in the runtime must be audited for join correctness. In practice this means: (a) label the *value*, not the *message*; (b) make the default constructor of any derived value inherit `max_taint` of inputs; (c) tre..."
  },
  "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": "6807cd0fe6a19fed1bfa9e3039b6674192405fe5bd11996a4b0fe3abf0273be2",
    "verified_classes": [
      "ProvenanceCollapseError",
      "Tainted"
    ],
    "verified_functions": [
      "join_taint",
      "merge_fields",
      "render_template",
      "send_to_sink",
      "declassify",
      "__post_init__"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ProvenanceCollapseError"
    ],
    "sample_fail_closed_invariants": [
      "refusing to send payload with unknown provenance to a side-effecting sink",
      "declassification requires principal and reason"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
