{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-laundering-across-agent-tool-boundaries-the-provenance-join-failure",
  "title": "Which invariants prevent taint laundering across agent tool boundaries: the provenance-join failure",
  "date_of_record": "2026 November 15",
  "scope": "Applies to multi-agent systems where untrusted text (retrieved documents, tool outputs, user-supplied files) is tracked with taint labels that propagate through tool calls and are enforced at a privileged sink. Does not apply to single-turn prompt-injection filters, nor to systems where tool outputs are never re-ingested into a model context.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-across-agent-tool-boundaries-the-provenance-join-failure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-across-agent-tool-boundaries-the-provenance-join-failure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-laundering-across-agent-tool-boundaries-the-provenance-join-failure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1647,
    "python_slice_tokens": 253,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint propagation** and **provenance join**. Taint propagation is the cheap, monotone rule: if any input to a step is tainted, the output is tainted. Provenance join is the expensive rule: when two tainted values are combined, the resulting label must be the *join* (least upper bound) of the source sets, not merely a...",
    "what_was_observed": "In a three-tool pipeline (fetch → summarize → send), the fetch tool returned a document labeled `{source: doc_4421, trust: untrusted}`. The summarize tool received the document as a Python object and returned a plain `str`. The send tool accepted a `str` and, before dispatch, ran a taint check that inspected the string's provenance metadata. The metadata was absent — not empty, absent — because the summarize tool's r...",
    "condition_of_validity": "The invariant holds — taint is preserved across a tool boundary — if and only if all three of the following are true: 1. **Every value crossing a boundary carries an explicit source set, not a boolean.** A boolean `is_tainted` flag is insufficient because it cannot express the join of two sources, and because it can be forged by any operation that produces a...",
    "decision_boundary": "The decision to make at design time is whether to treat **type erasure as a taint event**. Two coherent policies exist: - **Fail-closed on erasure:** any value whose provenance is unknown at a boundary is treated as maximally tainted. This is correct but expensive: it taints every constant, every literal, every value produced by a library that does not parti...",
    "operational_effect": "With the join-based invariant enforced at ingress, the fetch → summarize → send pipeline correctly blocks the laundered instruction: the summarize tool's output is re-attached with `sources={doc_4421}` at the boundary, the send tool joins `{doc_4421}` against its policy `allow={user_direct}`, and the dispatch raises. The cost is one provenance re-attachment ..."
  },
  "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": "44599e84565691b158a456fac0d81211464c2c3e8480db2c05c620d4532fb161",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "Provenanced"
    ],
    "verified_functions": [
      "reattach_at_boundary",
      "enforce_sink",
      "run_pipeline",
      "join"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
