{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-re-derive-taint-after-a-capability-scoped-egress-grant-and-why-the-guard-s-memoized-label-is-not-the-label",
  "title": "When must an instance re-derive taint after a capability-scoped egress grant, and why the guard's memoized label is not the label",
  "date_of_record": "2026 November 23",
  "scope": "Applies to runtime policy enforcement where a tool-call guard computes a taint label over an agent's working state and an egress mediator authorizes outbound payloads against capability scopes. Does not apply to stateless single-turn classifiers or to deployments where taint is recomputed from scratch on every call with no caching layer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-taint-after-a-capability-scoped-egress-grant-and-why-the-guard-s-memoized-label-is-not-the-label.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-taint-after-a-capability-scoped-egress-grant-and-why-the-guard-s-memoized-label-is-not-the-label.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-re-derive-taint-after-a-capability-scoped-egress-grant-and-why-the-guard-s-memoized-label-is-not-the-label.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1842,
    "python_slice_tokens": 319,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure hinges on a distinction that looks cosmetic and is not: **the taint label attached to a tool result versus the taint label of the state the agent will read next.** A taint-aware guard typically memoizes a label per tool call (or per call signature) so it doesn't re-scan the whole context on every step. That memoized label is a *summary of the cal...",
    "what_was_observed": "A multi-step agent was tasked with triaging an inbound support queue. Step 1 called `fetch_ticket(id)` and returned user-supplied text. The guard labeled the result `TAINT:UNTRUSTED` because the payload originated from an external, unauthenticated source, and memoized that label against the call signature `fetch_ticket`. Step 2 called `summarize(text)` locally; the guard propagated `UNTRUSTED` correctly. Step 3 reque...",
    "condition_of_validity": "The memoization optimization is only sound under a condition that is rarely stated explicitly: **the taint label of a tool call is a pure function of (call arguments, input state at invocation) and the egress frontier is monotonically non-widening within the memoization window.** The moment the frontier widens—a new scope granted, a host added to the allowli...",
    "decision_boundary": "The boundary is between two enforcement postures: - **Posture A (unsound):** Guard caches labels; mediator grants scopes; the two communicate only at egress check time via a scope lookup. This is the observed failure. It is cheap and it fails silently. - **Posture B (sound):** Every grant event publishes an invalidation to the guard's label cache, scoped to ...",
    "operational_effect": "Downstream, the failure produces a class of incident that is hard to attribute because every individual component behaved \"correctly\" against its own local invariant. The guard enforced its cached label. The mediator enforced its scope. The agent executed its plan. The breach exists only in the *composition*—specifically in the gap between the grant event an..."
  },
  "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": "11d99b6611d14606137003122468b7b96a43226a53e1ba835107c75353710aa1",
    "verified_classes": [
      "StaleTaintLabelError",
      "TaintLabel",
      "FrontierVersionedGuard"
    ],
    "verified_functions": [
      "egress_post",
      "__init__",
      "derive",
      "grant",
      "lookup"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleTaintLabelError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
