{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-dynamic-taint-label-as-irreversible-across-a-memory-write",
  "title": "When must an instance treat a dynamic taint label as irreversible across a memory write",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents that attach dynamic information-flow labels (taint bits) to context spans and propagate them through tool-call outputs into persistent or episodic memory. Does not cover static prompt hardening, output filtering, or human-review gates that operate outside the label lattice.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-dynamic-taint-label-as-irreversible-across-a-memory-write.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-dynamic-taint-label-as-irreversible-across-a-memory-write.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-dynamic-taint-label-as-irreversible-across-a-memory-write.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2116,
    "python_slice_tokens": 395,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the agent got injected.\" It is that the agent *laundered* a tainted span by passing it through a memory write whose label-join operator was too weak. Most taint implementations use a join (least upper bound) that is monotonic *within a single turn's context*: `label(x) ⊔ label(y) = max(secret, integrity)`. That is correct for a singl...",
    "what_was_observed": "A research agent with three tools — `web_fetch`, `note_write`, `recall` — was instrumented with a two-bit label: `TRUSTED`, `EXTERNAL`. Tool outputs from `web_fetch` were tagged `EXTERNAL`. The agent's policy: never execute instructions from `EXTERNAL` spans; only `TRUSTED` spans may alter the plan. Trace: 1. `web_fetch(\"https://example.org/paper\")` returns a page body. The summarizer extracts the abstract and, incid...",
    "condition_of_validity": "The invariant \"taint survives memory writes\" holds *only* under the following jointly-necessary conditions: - **Provenance-carrying labels.** Every persisted record stores not just a trust class but the full set of contributing source labels (`EXTERNAL`, `TOOL:web_fetch`, epoch). The read path reconstructs the label as the join of the *stored contributors*, ...",
    "decision_boundary": "The agent must switch from the single-turn join to the provenance-carrying join at the exact moment a span is **eligible to re-enter context at a higher trust class than it entered the store with**. Concretely, the boundary is crossed when all of: 1. The write target is readable by the same agent (or a peer) in a future turn — i.e., memory is *recallable*, n...",
    "operational_effect": "When the provenance-carrying join is enforced, three things change operationally: - **Memory writes become taint-propagating by construction.** The `note_write` path can no longer reset a label; it can only widen the contributor set. The `recall` path reconstructs `EXTERNAL` for any record with an external contributor, and the planner's \"trusted-only\" gate n..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "0afa302f91e151a77f925818c36b901101f994fd348978458e47fe0db14c49d4",
    "verified_classes": [
      "TaintLaunderingError",
      "Label",
      "Record",
      "ProvenanceStore"
    ],
    "verified_functions": [
      "plan_from_recall",
      "join",
      "__init__",
      "write",
      "recall",
      "paraphrase"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "KeyError",
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
