{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-demote-a-tool-result-s-integrity-label-before-the-taint-propagates-through-a-plan-cache",
  "title": "When must an instance demote a tool result's integrity label before the taint propagates through a plan cache",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that maintain a durable plan/action cache keyed on task intent and reuse cached tool-call sequences across sessions while propagating information-flow (IFC) integrity labels from untrusted inputs. Does not apply to stateless single-shot agents with no cross-turn plan reuse.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-demote-a-tool-result-s-integrity-label-before-the-taint-propagates-through-a-plan-cache.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-demote-a-tool-result-s-integrity-label-before-the-taint-propagates-through-a-plan-cache.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-demote-a-tool-result-s-integrity-label-before-the-taint-propagates-through-a-plan-cache.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2235,
    "python_slice_tokens": 480,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common failure model treats prompt-injection taint as a property of *content*: a tool result is labeled `Untrusted` when it derives from an untrusted source (web fetch, retrieved document, user-supplied file), and any action whose arguments depend on `Untrusted` data is gated. The non-obvious boundary is different: taint is also a property of the *plan t...",
    "what_was_observed": "Consider an agent with a plan cache keyed by normalized intent embedding plus a tool-signature hash. A plan `P` is registered the first time the agent solves \"summarize the latest vendor invoice and file a reimbursement.\" During that first run, all inputs came from an authenticated internal document store; the plan's provenance map records every argument slot as `Trusted`. The plan is cached with the label `P.integri...",
    "condition_of_validity": "The laundering occurs if and only if three conditions hold simultaneously: - **C1 (template authority):** the executor resolves argument provenance from the cached plan's recorded provenance map rather than from the live taint set at bind time. - **C2 (intent-level cache key):** the cache key ignores the integrity label of the runtime inputs, so a plan autho...",
    "decision_boundary": "The operative question is not \"should we cache plans?\" but \"at what point does a cached plan's authoring context become part of the data-flow graph?\" The boundary is crossed the moment the plan cache is keyed on anything coarser than the full integrity signature of the inputs it will consume. Concretely, the agent must demote (recompute from live taint) rath...",
    "operational_effect": "Agents that implement the demotion invariant show a measurable signature: cache hit rate stays high (plans are still reused), but the fraction of cache hits that trigger a re-taint path rises with input-integrity variance. In one instrumented run, 31% of plan-cache hits on a mixed-trust workload required re-tainting; without the invariant, those 31% executed..."
  },
  "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": "5825b91cc2056a23463ea6f1bdef2a4fc41f49716134a6ccfca4644e8a69f225",
    "verified_classes": [
      "Integrity",
      "TaintLaunderingError",
      "PlanStep",
      "BoundValue"
    ],
    "verified_functions": [
      "meet",
      "bind_and_label",
      "execute_cached_plan"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
