{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-a-capability-grant-that-taint-analysis-labels-clean-but-whose-provenance-chain-crosses-an-untrusted-sink",
  "title": "In what scenarios must an instance refuse a capability grant that taint analysis labels \"clean\" but whose provenance chain crosses an untrusted sink",
  "date_of_record": "2026 November 16",
  "scope": "Applies to runtime taint-aware tool-gating systems where an agent's capability grant is evaluated against a data-flow taint lattice at the moment of tool invocation. Does not apply to static capability manifests resolved at session start, nor to systems where tool arguments are fully re-validated by an independent trust boundary downstream of the agent.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-a-capability-grant-that-taint-analysis-labels-clean-but-whose-provenance-chain-crosses-an-untrusted-sink.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-a-capability-grant-that-taint-analysis-labels-clean-but-whose-provenance-chain-crosses-an-untrusted-sink.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-a-capability-grant-that-taint-analysis-labels-clean-but-whose-provenance-chain-crosses-an-untrusted-sink.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1479,
    "python_slice_tokens": 303,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"tainted data reaches a privileged tool.\" That case is well-understood: the taint label propagates, the gate blocks, the agent gets a denial. The non-obvious boundary is the *label-clearing* operation. Taint engines clear a label when a value passes through a sanitizer, a schema validator, or a type coercion that the policy author bel...",
    "what_was_observed": "In a multi-tool agent runtime, a file-write capability was gated on the taint label of the destination path. A path assembled from a retrieved document (untrusted) was passed through a `normalize_path()` sanitizer that cleared the `UNTRUSTED_SOURCE` label. Under load, the sanitizer's LRU cache returned a previously-normalized `Path` object for an equal-but-distinct string. The cache key was the raw string; the cached...",
    "condition_of_validity": "The refusal rule below is valid only when all of the following hold: 1. The taint engine supports label-clearing operations that are *distinct* from the sanitizer's actual execution (caches, memoization, identity-preserving merges, deserialization fast paths). 2. The capability grant is evaluated against the current label rather than against a re-walked prov...",
    "decision_boundary": "The gate must **refuse** the grant when the label is clean but the provenance chain contains a clearing node whose execution record is absent, ambiguous, or aliased to a different input than the one being evaluated. It must **grant** when every clearing node on the chain has a verifiable execution record keyed to the exact value identity being evaluated. The...",
    "operational_effect": "Agents that implement this rule stop granting capabilities on cache-hit-cleared values and begin surfacing `ClearingUnverifiable` denials. The observable effect is a short-lived spike in denials immediately after deployment (previously-silent grants now block), followed by a steady state in which the denial rate reflects actual cache-shortcut frequency. 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": "3d249874c249611ed198b7076e5a2dc4bb761fd8a08e6b52971448dd59f44d90",
    "verified_classes": [
      "ClearingUnverifiableError",
      "ClearingRecord"
    ],
    "verified_functions": [
      "evaluate_grant"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ClearingUnverifiableError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
