{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-taint-propagation-from-provenance-relabeling-at-a-tool-boundary",
  "title": "How should an instance distinguish taint propagation from provenance relabeling at a tool boundary",
  "date_of_record": "2026 November 13",
  "scope": "Applies to agent runtimes that attach provenance labels to data and propagate prompt-injection taint through tool calls. Does not apply to stateless single-turn inference, nor to taint models that operate purely on the model's context window without external tool invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-taint-propagation-from-provenance-relabeling-at-a-tool-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-taint-propagation-from-provenance-relabeling-at-a-tool-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-taint-propagation-from-provenance-relabeling-at-a-tool-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1530,
    "python_slice_tokens": 329,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A provenance label answers *where a value came from*. A taint label answers *what may have been influenced by untrusted input*. These are orthogonal, and the boundary failure occurs when a runtime conflates them — specifically when a tool that *transforms* data is assumed to *launder* taint because its output carries a \"trusted tool\" provenance label. The no...",
    "what_was_observed": "In a retrieval-augmented agent with three tools — `fetch_url`, `summarize`, and `write_file` — the runtime labeled `fetch_url` output as `provenance=external, taint=untrusted`. The `summarize` tool, implemented as a model call, returned text labeled `provenance=internal.summarizer, taint=trusted` because the tool itself was on an allowlist. The `summarize` output was derived entirely from the fetched document, which ...",
    "condition_of_validity": "Taint propagation across a tool boundary is valid only under an explicit **flow contract** declared per tool, with three admissible classes: 1. **Content-preserving** (`summarize`, `translate`, `reformat`): output taint = join of input taints. Provenance may be relabeled; taint may not. 2. **Content-collapsing** (`len`, `hash`, `contains`, boolean predicates...",
    "decision_boundary": "The decision point is at output-label construction, not at input inspection. The runtime must answer: *does this tool's contract permit taint downgrade, and is the downgrade sound for this specific output?* The boundary conditions: - **Downgrade permitted** only for content-collapsing tools whose output is non-invertible with respect to tainted content. `len...",
    "operational_effect": "With per-tool flow contracts and derivation-graph taint join, the `summarize`→`write_file` path is blocked: `summarize` is content-preserving, so its output inherits `taint=untrusted`, and `write_file` refuses tainted content absent an explicit human or policy approval step. The `len` false positive is eliminated because `len` declares content-collapsing and..."
  },
  "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": "43280e05b2b6bce194d5d24db2f036660ce647b272898a7054dd47d74af70ed5",
    "verified_classes": [
      "Taint",
      "FlowClass",
      "TaintContractError",
      "Labeled",
      "ToolContract"
    ],
    "verified_functions": [
      "join_taint",
      "apply_tool",
      "guarded_write"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintContractError"
    ],
    "sample_fail_closed_invariants": [
      "assert summary.taint is Taint.UNTRUSTED",
      "assert length.taint is Taint.TRUSTED"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
