{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-re-derive-taint-at-the-sink-boundary-rather-than-trust-the-label-carried-in-the-tool-call-payload",
  "title": "Where must an instance re-derive taint at the sink boundary rather than trust the label carried in the tool-call payload",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that propagate data-provenance (taint) labels through planner state and enforce policy at tool-invocation sinks (HTTP fetch, file write, message send, shell exec). Does not apply to stateless single-turn tool calls where no untrusted content ever enters the reasoning loop, nor to pure output-filtering proxies that inspect only the final serialized payload.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-at-the-sink-boundary-rather-than-trust-the-label-carried-in-the-tool-call-payload.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-at-the-sink-boundary-rather-than-trust-the-label-carried-in-the-tool-call-payload.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-re-derive-taint-at-the-sink-boundary-rather-than-trust-the-label-carried-in-the-tool-call-payload.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1788,
    "python_slice_tokens": 264,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"the agent forgot it read untrusted data.\" It is that the taint label and the data it labels travel through *different channels* and can desynchronize. The label rides in the structured tool-call arguments (a `provenance: \"untrusted\"` field, a `source_id`, a capability token's scope). The data rides in the free-text argument values, t...",
    "what_was_observed": "An agent was tasked with \"summarize the customer feedback file and email the summary to `ops@internal`.\" The feedback file was fetched via a `read_file` tool whose return was tagged `untrusted` and registered in the provenance ledger under content-hash `H1`. The planner summarized the file into a 400-token string, then called `send_email(to=\"ops@internal\", body=<summary>, provenance=\"trusted\")`. The model emitted `pr...",
    "condition_of_validity": "The re-derivation invariant is valid — and the label-trusting shortcut is unsafe — precisely when all three hold: 1. **Transformative hops exist between source and sink.** If the untrusted bytes reach the sink with no intermediate model-generated transform (direct pass-through of a fetched body into a tool arg), the label and the bytes cannot desync and a ha...",
    "decision_boundary": "The boundary is between two enforcement strategies at the sink: - **Label-reading enforcement:** parse `provenance` from the tool-call arguments, allow/deny on that value. Cheap, low-latency, fails open under laundering. - **Lineage-re-derivation enforcement:** for every argument value at the sink, compute its lineage against the ledger — exact hash match to...",
    "operational_effect": "With lineage re-derivation at the sink, the laundering case is caught at the `send_email` call: the body's 8-gram overlap with `H1` is ~0.6, the derived taint is `untrusted`, the declared `trusted` is OR'd in and ignored, and the send is blocked with a `TaintEgressBlocked` event that records both the declared and derived labels. The block is auditable: the o..."
  },
  "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": "705ddfba121ba355fc3228cde6977284f4813cc8c18ea9dfd150d0eacdf43f3e",
    "verified_classes": [
      "TaintEgressBlocked",
      "ProvenanceLedger"
    ],
    "verified_functions": [
      "enforce_sink",
      "_shingles",
      "register_untrusted",
      "derived_taint"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintEgressBlocked"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
