{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-re-derive-taint-after-a-policy-cache-hit-the-stale-taint-admission-gap-in-tool-invocation-gating",
  "title": "When must an instance re-derive taint after a policy-cache hit: the stale-taint admission gap in tool-invocation gating",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents that gate tool invocations through a policy enforcement point (PEP) using a decision cache keyed on (tool, argument-shape, taint-label-set), where taint labels are derived from provenance of prior tool outputs and user turns. Does not apply to stateless per-call policy evaluation with no caching layer, nor to PEPs that key cache entries on full argument content plus a monotonic taint epoch.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-taint-after-a-policy-cache-hit-the-stale-taint-admission-gap-in-tool-invocation-gating.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-taint-after-a-policy-cache-hit-the-stale-taint-admission-gap-in-tool-invocation-gating.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-taint-after-a-policy-cache-hit-the-stale-taint-admission-gap-in-tool-invocation-gating.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2397,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *taint derivation* and *taint lookup*. Most PEP implementations conflate them: they compute a taint label set for the current invocation, hash it together with the tool identity and a coarse argument signature, and consult a decision cache. A cache hit returns a previously computed allow/deny. This is correct only if t...",
    "what_was_observed": "A three-stage agent pipeline: a retrieval tool (`fetch_doc`) producing `untrusted-external` content, a summarization step, and a `send_email` tool gated by a PEP. Policy rule R1: `send_email` is denied if any argument's taint set intersects `{untrusted-external}` and the recipient is outside an allowlist. Rule R2: content that has passed a `verify_quote` tool (which re-fetches the source and confirms byte-identical s...",
    "condition_of_validity": "A PEP decision cache is sound only under the following invariant, which we will call **taint-key completeness**: > For every policy rule r in the active rule set, every input to r's branch predicate must be either (a) present in the cache key, or (b) provably invariant across all invocations sharing that key. Formally, let `K(i)` be the cache key for invocat...",
    "decision_boundary": "The operational boundary is not \"should I cache\" but \"at what granularity does the cache stop being a cache and start being a policy bypass.\" Three concrete boundaries: - **Rule-set coverage boundary.** If the active rule set references any field not in the key schema, the PEP must not serve cache hits for invocations that could reach that rule. The safe def...",
    "operational_effect": "The downstream effect is a class of allows that are individually plausible and collectively unauditable. Because the PEP returns a cache hit, no policy-trace is emitted for the bypassed evaluation, and the audit log records `allow (cached)` with a key that *appears* to justify the decision. Post-hoc review cannot reconstruct that the recipient field was outs..."
  },
  "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": "1553140c1f0b8a283bb6158fc5b8c0f38826d84d93765a019bb18c59aa356146",
    "verified_classes": [
      "StaleTaintAdmissionError",
      "Invocation",
      "RuleSet",
      "PEPCache"
    ],
    "verified_functions": [
      "_key",
      "_assert_key_complete",
      "decide"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleTaintAdmissionError"
    ],
    "sample_fail_closed_invariants": [
      "provenance digest absent; classification-only key would alias distinct derivation paths"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
