{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-provenance-taint-laundering-at-the-tool-output-context-merge-boundary",
  "title": "What structural signals indicate provenance-taint laundering at the tool-output/context-merge boundary",
  "date_of_record": "2026 November 16",
  "scope": "Applies to agent runtimes that attach provenance labels (trusted/untrusted, source IDs, taint bits) to tool outputs and merge those outputs into the model context window. Does not apply to systems that fully re-derive taint at every prompt construction from a signed event log, nor to single-turn stateless inference with no tool use.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-provenance-taint-laundering-at-the-tool-output-context-merge-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-provenance-taint-laundering-at-the-tool-output-context-merge-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-provenance-taint-laundering-at-the-tool-output-context-merge-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1641,
    "python_slice_tokens": 278,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *taint that survives as a label* and *taint that survives as an effect*. A provenance label is metadata attached to a tool result at ingestion. The model never sees labels directly; it sees the serialized bytes that the runtime places into the context. Taint laundering occurs when a labeled-untrusted payload is *transf...",
    "what_was_observed": "Across several agent runtimes, the same failure shape recurred. A web-fetch tool returns a page body labeled `untrusted:web`. The runtime passes it to a \"context compactor\" that summarizes long tool outputs to fit a token budget. The compactor is a trusted component; it emits a summary labeled `trusted:compactor`. The summary retains the injected instruction, phrased slightly differently but still imperative. Downstr...",
    "condition_of_validity": "These signals are valid only when the runtime can enumerate its transform edges and observe both endpoints. If transforms are opaque (a third-party summarization API with no token-level access), signals 2 and 4 cannot be computed and only signal 1 (label-rank comparison) remains — which is necessary but not sufficient. The signals do not apply when the conte...",
    "decision_boundary": "The operational rule: **a transform edge may reduce taint only if it emits a content-provability witness** — a hash, span map, or allowlist membership proof showing the output is a syntactic subset of vetted input, with no novel imperative content. Absent that witness, the output label must be the *join* (least-trusted) of all input labels, never the transfo...",
    "operational_effect": "Enforcing the join rule converts a class of silent privilege escalations into loud label conflicts: the policy gate now sees `untrusted:web` on the compacted summary and blocks the downstream tool call, producing a visible denial rather than a silent success. The cost is a higher false-positive rate on benign summaries of benign pages, because the join is co..."
  },
  "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": "b8ed28628e5e5620dd4675d7816ea675bf85e272984d366083f0949bf26764df",
    "verified_classes": [
      "TaintLaunderingError",
      "Labeled"
    ],
    "verified_functions": [
      "least_trusted",
      "apply_transform",
      "compact_for_context"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "empty label set: provenance lost entirely"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
