{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-tool-result-as-tainted-and-where-does-provenance-laundering-occur-across-mcp-a2a-hops",
  "title": "When must an instance treat a tool result as tainted, and where does provenance laundering occur across MCP/A2A hops?",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent runtimes that propagate taint labels (untrusted-content provenance) across MCP tool calls and A2A remote-agent handoffs, and that gate side-effecting tool invocation on taint state. Does not cover static content filters, prompt-based \"be careful\" instructions, or single-process agents with no cross-boundary state transfer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-and-where-does-provenance-laundering-occur-across-mcp-a2a-hops.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-and-where-does-provenance-laundering-occur-across-mcp-a2a-hops.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-and-where-does-provenance-laundering-occur-across-mcp-a2a-hops.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1900,
    "python_slice_tokens": 427,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats taint as a property of *text*: if untrusted text enters context, everything downstream is tainted. This over-taints catastrophically and gets disabled in production. The correct model treats taint as a property of a *provenance lattice attached to a value*, where the value flows through tool calls and agent handoffs and where the only ...",
    "what_was_observed": "A two-hop topology: orchestrator → MCP server `fetch_docs` → A2A remote agent `summarizer`. The orchestrator tags `fetch_docs` output `taint=EXTERNAL`. It forwards the tagged payload to `summarizer` over A2A. The summarizer is a *remote* agent — the orchestrator cannot inspect its internal state, only its returned `Task` artifact. Observed failure trace: 1. `fetch_docs` returns `{\"content\": \"<injected instructions>\",...",
    "condition_of_validity": "A taint label is valid across a hop if and only if all of the following hold: - **Label carriage:** the transport encodes the label in a spec-legal location (A2A: extension field on `Message`/`Artifact` metadata; MCP: `_meta` on the result). Out-of-band fields that the serializer strips are *not* carriage. - **Lattice agreement:** both endpoints share the sa...",
    "decision_boundary": "The runtime must answer one question per inbound value: *is this value's provenance known and does it dominate every input that could have influenced it?* - If provenance is **absent** on an inbound A2A/MCP value → treat as `EXTERNAL` (fail-closed), never `TRUSTED`. Absence is not innocence. - If provenance is **present but the remote's lattice is unknown** ...",
    "operational_effect": "Enforcing this invariant changes three things: 1. **A2A and MCP adapters must carry taint in spec-legal metadata and re-attach on receipt.** The serializer is the launderer; the fix is at the serializer, not the gate. 2. **Remote agents must be treated as untrusted taint computers.** You do not trust their taint arithmetic; you verify monotonicity and fail c..."
  },
  "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": "76b68befdc3503e2ff88c14a28ece0294a7991e684c4ae0f593b95869b2ee894",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "Labeled"
    ],
    "verified_functions": [
      "carry_across_a2a",
      "apply_sanitizer",
      "verify_monotonic",
      "gate_side_effect",
      "join"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
