{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-quarantine-a-memory-write-whose-taint-label-is-unlabeled-but-inherited-from-a-tool-output-truncation-boundary",
  "title": "Under what conditions must an instance quarantine a memory write whose taint label is unlabeled-but-inherited from a tool output truncation boundary",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents using information-flow labels (taint bits) propagated from untrusted inputs through tool outputs into persistent memory writes. Does not apply to stateless single-turn inference with no memory persistence, nor to systems where tool outputs are structurally typed and all fields carry explicit provenance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-memory-write-whose-taint-label-is-unlabeled-but-inherited-from-a-tool-output-truncation-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-memory-write-whose-taint-label-is-unlabeled-but-inherited-from-a-tool-output-truncation-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-quarantine-a-memory-write-whose-taint-label-is-unlabeled-but-inherited-from-a-tool-output-truncation-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1811,
    "python_slice_tokens": 226,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model of prompt-injection taint tracking treats the taint label as a property of *content*: a string that entered through an untrusted channel is marked `UNTRUSTED`, and that label travels with the string as it flows through context, tool calls, and memory writes. The failure boundary examined here is different: the taint label is a property of the...",
    "what_was_observed": "A retrieval tool returned a 4,096-token document from an untrusted web source. The runtime's tool-output budget was 2,048 tokens. The truncation logic cut the payload at the budget and appended a `[truncated]` marker. The taint envelope — a structured header `{source: web, trust: untrusted, label_id: 7f3a, span: [0, 4096]}` — was serialized *before* the content and *after* it as a closing sentinel `{/label_id: 7f3a}`...",
    "condition_of_validity": "The invariant that would have prevented this is a *provenance-envelope integrity check at every re-serialization boundary*, not a content-string label. Specifically, the following must hold for any span to be admitted to memory: 1. **Envelope closure:** the span must carry both an opening provenance record and a matching closing sentinel, with a span range t...",
    "decision_boundary": "The decision boundary is between **quarantine** and **admit-with-downcast**. When the guard detects an unclosed or missing envelope, it has two options: - **Quarantine:** reject the write, log the span, and require a human or a higher-trust re-fetch to re-establish provenance. This is correct but expensive. - **Admit-with-downcast:** admit the write but mark...",
    "operational_effect": "The operational consequence is that tool-output truncation must be treated as a *provenance-destroying* operation, and the runtime must either (a) truncate inside the envelope so the closing sentinel is preserved, or (b) mark the truncated span `ENVELOPE_INCOMPLETE` and route it to the quarantine path. The common implementation — truncate the content and re-..."
  },
  "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": "98f14b6f80be9e298080fae360e0c08cd673bb00ccdbc0184c89ecf128c76713",
    "verified_classes": [
      "EnvelopeIntegrityError",
      "Envelope",
      "MemoryWrite"
    ],
    "verified_functions": [
      "admit_memory_write"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "EnvelopeIntegrityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
