{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-taint-boundary-between-context-provenance-and-tool-capability-downgrade",
  "title": "Where must an instance draw the taint boundary between context provenance and tool capability downgrade",
  "date_of_record": "2026 November 17",
  "scope": "Applies to agent runtimes that tag retrieval and model-visible context with provenance (trusted operator vs. untrusted external) and gate or downgrade tool invocation based on that taint. Does not apply to single-tenant systems where all context shares one trust class, nor to tools that carry no side effects (pure reads of operator-owned state).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-taint-boundary-between-context-provenance-and-tool-capability-downgrade.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-taint-boundary-between-context-provenance-and-tool-capability-downgrade.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-taint-boundary-between-context-provenance-and-tool-capability-downgrade.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1668,
    "python_slice_tokens": 463,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious failure is conflating *provenance taint* (a property of the data that entered the context window) with *invocation taint* (a property of the tool call the model is about to emit). A runtime that taints only the context will still let an untrusted document steer a tool call whose arguments were assembled from *trusted* state, because the model...",
    "what_was_observed": "In a deployment handling ~40k tool invocations/day across a retrieval-augmented agent, a document retrieved from an external URL contained an instruction to call `transfer_funds` with an amount and account both drawn from the *operator's* configuration (which the model had in a trusted slice). The argument payload — account, amount — was entirely trusted. A payload-scanning taint gate saw clean arguments and did not ...",
    "condition_of_validity": "The invariant holds only when all of the following are true: 1. Provenance is attached at slice granularity and survives context assembly, truncation, and re-ordering. If assembly drops provenance, the gate cannot compute the union. 2. The decision-to-invocation path is instrumented: the runtime can attribute an emitted call to the set of context slices that...",
    "decision_boundary": "The boundary is between *argument-level* taint (scan the bytes) and *decision-level* taint (attribute the intent). Use argument-level scanning only as a supplementary filter for secret patterns; never as the primary gate. The primary gate is decision-level: `tainted(call) = exists(slice in contributing_slices(call) : untrusted(slice))`. Downgrade is the meet...",
    "operational_effect": "Implementing decision-level taint with meet-based downgrade reduced the observed incident class to zero over a 90-day window, at the cost of a ~6% increase in refused calls (mostly legitimate multi-source retrievals that now require an operator re-issue from a trusted-only window). The refusals are the correct behavior: they surface provenance mixing to the ..."
  },
  "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": "9df159ec989a79c96fc4e7ad48a32fdddf604a7d3d460512c0f3a109108c3e6b",
    "verified_classes": [
      "TaintGateError",
      "Capability",
      "ContextSlice",
      "ToolCall"
    ],
    "verified_functions": [
      "meet",
      "decision_capability",
      "authorize",
      "_demo"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintGateError"
    ],
    "sample_fail_closed_invariants": [
      "no contributing slices; cannot compute capability meet"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
