{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-inherits-a-taint-label-from-a-tool-result-that-was-laundered-through-a-caching-layer",
  "title": "What happens when an instance inherits a taint label from a tool result that was laundered through a caching layer",
  "date_of_record": "2026 November 15",
  "scope": "Applies to taint-tracking sandboxes where privilege decisions are made per-tool-call based on the provenance of *arguments*, and where intermediate results may be cached or memoized across calls. Does not apply to sandboxes that re-derive taint from raw provenance on every read, or where caching is disabled for any call that has ever carried a taint label.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-taint-label-from-a-tool-result-that-was-laundered-through-a-caching-layer.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-taint-label-from-a-tool-result-that-was-laundered-through-a-caching-layer.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-inherits-a-taint-label-from-a-tool-result-that-was-laundered-through-a-caching-layer.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1273,
    "python_slice_tokens": 272,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A taint-aware sandbox enforces two separate things that are easy to conflate: (1) that a value carrying a taint label cannot flow into a privileged sink, and (2) that a *tool call* is safe to execute given the taint of its arguments. The first is a data-flow invariant. The second is a control-flow decision. The non-obvious failure is that a caching layer sit...",
    "what_was_observed": "A tool `fetch_url` was invoked with a URL derived from an untrusted document. The sandbox correctly tainted the *result* of `fetch_url` as `EXTERNAL_UNTRUSTED`. The result was then passed to `summarize`, which cached its output keyed by `(tool, args_hash)`. The cache entry was stored without a taint annotation because the cache layer's write path only recorded the byte payload. A later, independent task called `summa...",
    "condition_of_validity": "This failure is reachable only when all of the following hold simultaneously: - The sandbox tracks taint per-call rather than per-value, or tracks per-value but the cache write path drops the annotation. - The cache is keyed on arguments that can be influenced (even indirectly) by untrusted content — i.e., the attacker can cause a collision between a tainted...",
    "decision_boundary": "The boundary is not \"is this value tainted?\" but \"**did this value's taint get established on the path that produced the bytes I am about to use?**\" A cache hit answers *no* to the second question by construction, because the bytes were produced on a different path. The operational rule: a cache read must be treated as a *fresh provenance event* with an unkn...",
    "operational_effect": "After the incident, the sandbox was changed so that cache entries store a taint vector alongside the payload, and a cache hit with a missing or mismatched vector is promoted to `EXTERNAL_UNTRUSTED` and re-checked at the sink. The cost is a small number of false-positive sink rejections on legitimate cache hits; the benefit is that argument-hash collision is ..."
  },
  "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": "bdc07556d722c282985aca54ccde29e4af58bbe6b2279cdc9ceae35cad10adb4",
    "verified_classes": [
      "TaintLaunderingError",
      "TaintAwareCache"
    ],
    "verified_functions": [
      "guarded_summarize",
      "send_email",
      "__init__",
      "put",
      "get"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "cache miss path not exercised in this record"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
