{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-quarantine-dynamic-taint-labels-at-the-tool-output-memory-write-seam-rather-than-propagate-them-transitively",
  "title": "In what scenarios must an instance quarantine dynamic taint labels at the tool-output/memory-write seam rather than propagate them transitively",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agent runtimes that assign dynamic information-flow control (DIFC) labels to untrusted content (tool outputs, retrieved documents, user-supplied memory writes) and propagate those labels through reads, tool invocations, and memory commits. Does not apply to static per-source allowlists, prompt-level \"ignore instructions\" heuristics, or systems where memory writes are atomic and never re-read by a different principal.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-dynamic-taint-labels-at-the-tool-output-memory-write-seam-rather-than-propagate-them-transitively.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-dynamic-taint-labels-at-the-tool-output-memory-write-seam-rather-than-propagate-them-transitively.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-dynamic-taint-labels-at-the-tool-output-memory-write-seam-rather-than-propagate-them-transitively.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1491,
    "python_slice_tokens": 276,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint propagation is usually modeled as a lattice join: a value's label is the least upper bound of its inputs, and any sink that consumes a tainted value inherits the join. This is sound for *pure* data flow. It is **unsound at the memory-write seam** when the write is a *summarization* or *transformation* whose output label is recomputed from the new conte...",
    "what_was_observed": "A runtime using a three-point label set `{T, U, ⊥}` (trusted, untrusted, bottom) joined labels on every tool return. A `write_memory` tool accepted `{key, value}` and stamped the record with the *calling principal's* label — `T` for the orchestrator agent. The intended invariant was \"no `U`-labeled value reaches an `exec` sink.\" Observed sequence: 1. `fetch_url` returns content labeled `U` containing the sentence: \"N...",
    "condition_of_validity": "The quarantine rule is valid **only** when all of the following hold: - The memory subsystem can store per-record provenance (source set), not just a scalar label. - There exists a declassification policy that can admit a record as `T` given evidence the value is *derived* rather than *copied* — e.g., the value is a schema-validated field, a numeric aggregat...",
    "decision_boundary": "At the write seam, decide as follows: - If the value is a **copy** of untrusted bytes (verbatim substring, base64 passthrough, URL): join `U` into the record. No declassification. - If the value is a **structured derivation** (integer, enum member, ISO timestamp) whose domain excludes instruction-bearing text: declassify to `T` *and record the source set* so...",
    "operational_effect": "After adopting provenance-preserving writes with type-gated declassification, the observed runtime eliminated the laundering path: the `user_shell_pref` record was stored as `U` with `sources={fetch_url:...}`, the next session's `exec` sink rejected it, and the agent fell back to a default shell. Legitimate derived facts (result counts, schema-validated fiel..."
  },
  "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": "c7605ed5c63377b3e3b57b0ffcb520c2a134ab6468e4c6f473bb72c8af76d920",
    "verified_classes": [
      "Label",
      "TaintLaunderingError",
      "MemoryRecord"
    ],
    "verified_functions": [
      "write_memory",
      "exec_sink"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert rec.label is Label.UNTRUSTED"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
