{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-a-tool-output-as-tainted-rather-than-trusted-when-provenance-labels-survive-only-partially-across-a-multi-hop",
  "title": "In what scenarios must an instance treat a tool output as tainted rather than trusted when provenance labels survive only partially across a multi-hop tool chain",
  "date_of_record": "2026 November 11",
  "scope": "Applies to agent runtimes that propagate provenance/taint labels from user input and fetched external content across tool calls, where labels are attached per-field or per-span rather than per-message. Does not apply to systems that quarantine all external content into a single trust domain, nor to runtimes whose tool outputs are fully re-derived from trusted internal state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-tool-output-as-tainted-rather-than-trusted-when-provenance-labels-survive-only-partially-across-a-multi-hop.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-tool-output-as-tainted-rather-than-trusted-when-provenance-labels-survive-only-partially-across-a-multi-hop.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-tool-output-as-tainted-rather-than-trusted-when-provenance-labels-survive-only-partially-across-a-multi-hop.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1756,
    "python_slice_tokens": 376,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is between *label survival* and *taint survival*. A provenance label can survive a hop (the field still carries `origin=external:fetched`) while the taint it was supposed to encode does not, because the label was re-emitted by an intermediate tool that had a narrower taint vocabulary than the label namespace. The common failure is a ...",
    "what_was_observed": "In a chain `fetch(url) -> extract_fields -> summarize -> planner`, the `fetch` tool emitted spans tagged `untrusted:web`. The `extract_fields` tool copied matched substrings into a new dict but constructed its output schema without a provenance field, so the downstream `summarize` tool received plain strings and emitted `origin=summarize`. The planner then treated the summary as trusted internal content and executed ...",
    "condition_of_validity": "The taint-tracking invariant holds only if all of the following are true: 1. **Closure under composition.** Every tool in the chain either (a) propagates taint labels for every output span whose content is a function of a tainted input span, or (b) is declared `taint_collapsing` and its outputs are conservatively marked tainted whenever any input was tainted...",
    "decision_boundary": "Treat a tool output as **tainted** (and forbid it from reaching instruction-following or side-effecting sinks without an explicit declassification step) whenever any of the following hold: - The tool is not registered as `taint_collapsing` and any input span was tainted, and the tool did not emit a provenance label for an output span. Absence of a label on a...",
    "operational_effect": "The practical consequence is that taint tracking must be enforced at the *schema* boundary, not the message boundary. Runtimes that annotate messages with a trust bit cannot represent the case where one message contains both a trusted instruction and an echoed untrusted fragment; the per-span representation is necessary but insufficient without closure and e..."
  },
  "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": "fb2e0f7672d5b93af4b572afce6cc90b652680960bcc981ddf5ed92f7b477e42",
    "verified_classes": [
      "TaintLaunderingError",
      "Span",
      "ToolOutput"
    ],
    "verified_functions": [
      "classify_output",
      "route_to_planner",
      "is_tainted"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
