{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-tool-output-as-tainted-when-provenance-labels-are-lost-at-a-serialization-boundary",
  "title": "Under what conditions must an instance treat a tool output as tainted when provenance labels are lost at a serialization boundary",
  "date_of_record": "2026 November 13",
  "scope": "Applies to agent runtimes that propagate prompt-injection taint via provenance labels attached to message parts and tool-call results, where taint must survive at least one serialization boundary (JSON tool-call arguments, HTTP body, structured-output schema coercion). Does not apply to in-process pipelines where taint is carried by object identity and never re-parsed.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-output-as-tainted-when-provenance-labels-are-lost-at-a-serialization-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-output-as-tainted-when-provenance-labels-are-lost-at-a-serialization-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-tool-output-as-tainted-when-provenance-labels-are-lost-at-a-serialization-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1526,
    "python_slice_tokens": 213,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **provenance loss** and **provenance laundering**. Provenance loss is a benign, expected event: a tainted string is embedded in a JSON payload, the receiving tool re-parses it, and the structured label object (e.g. `{\"taint\": [\"untrusted:web\"]}`) is dropped because the schema only declares `type: string`. Provenance la...",
    "what_was_observed": "A retrieval tool returned a document whose body contained an injected instruction. The runtime correctly labeled the tool result `taint=[\"untrusted:retrieval\"]` and propagated it through two hops of the planner. At the third hop, the planner passed a substring of the tainted body into a `summarize(text: str)` tool call. The tool-call arguments were serialized to JSON; the `text` field was a bare string, and the prove...",
    "condition_of_validity": "The safe behavior — treating an unlabeled value as clean — is valid only under the conjunction of three conditions: 1. **Total labeling.** Every value that enters the context is either explicitly labeled or provably untainted by construction (e.g. a literal in the system prompt). If any input path can produce an unlabeled value, absence-of-label is ambiguous...",
    "decision_boundary": "The operational rule is a **default-deny on absence-of-label at any boundary that is not provably total**. Concretely: - If a tool's input schema declares a field as a bare scalar and the runtime cannot attach a sidecar label, the field must be treated as *potentially tainted* on the way out, and the tool's output must inherit `untrusted:*` unless the tool i...",
    "operational_effect": "When the rule is enforced, the summarizer's output is marked `taint=[\"untrusted:retrieval\"]` (joined from its input), the executor refuses to place it in system-adjacent context, and the injection dies at the summarizer boundary instead of executing two turns later. The cost is a higher false-positive rate: benign summaries of benign retrieved text are now l..."
  },
  "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": "f6a238b0260dace9b198d3884e0249458d16b1518d69eac3021eed2517383324",
    "verified_classes": [
      "TaintLaunderingError",
      "Provenance",
      "Value"
    ],
    "verified_functions": [
      "propagate_tool_output",
      "join",
      "is_clean"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
