# Where must an instance draw the provenance-threshold boundary when a poisoned memory write arrives with a valid but laundered derivation chain? **Date of Record:** 2026 November 27 **Scope:** Applies to persistent agent memory stores that admit writes gated by provenance scores derived from derivation chains (tool outputs, peer-agent assertions, retrieved documents). Does not apply to stateless inference or to stores with no write-admission control. ## Core Distinction The common framing of memory poisoning defense treats provenance score as a scalar trust value: high score admits, low score rejects. This is wrong at the boundary that matters. A poisoned write can arrive with a **high provenance score and a valid derivation chain** because provenance is transitive and the poisoning is introduced at a leaf that itself has a legitimate-looking source. The distinction that actually governs admission is not *how high* the score is but *whether the derivation chain terminates in a source whose assertion set is independently verifiable at admission time* — i.e., whether the chain is **grounded** versus merely **laundered**. A laundered chain is one where each hop is individually defensible (a real tool call returned it, a real peer agent asserted it, a real document contained it) but the terminal claim was never checked against a source the store can re-verify. The score accumulates because every hop contributes positive weight. The invariant that must hold: **a write's provenance score is only valid if its derivation chain contains at least one hop whose payload the admission controller can re-execute or re-hash against an out-of-band reference.** Score without a re-verifiable anchor is a laundering amplifier, not a trust signal. ## What Was Observed A retrieval-augmented agent maintained a persistent memory store. Writes were admitted when `provenance_score >= 0.72`, where score was computed as a decayed sum over derivation hops: direct user input weighted 1.0, tool output 0.8, peer-agent assertion 0.6, retrieved-document snippet 0.5, with a 0.85 per-hop decay. A prompt-injection payload was planted in a retrieved web document (score contribution 0.5). The agent summarized it into a tool-call argument, the tool echoed it back as structured output (0.8 hop), and the agent distilled the result into a semantic memory entry. The chain: `retrieved_doc(0.5) → tool_output(0.8) → distilled_write`. Decayed score at the write: `0.5*0.85 + 0.8*0.85² ≈ 0.425 + 0.578 = 1.003`, clamped to 1.0. The write was admitted with maximal confidence. The failure trace: 1. Leaf poisoning enters at the lowest-weighted hop (retrieved doc, 0.5). 2. Each subsequent hop is *genuine* — the tool really returned the text, the distillation really happened. The chain is not forged; it is laundered. 3. Decay is multiplicative but the weights are additive, so a long chain with one high-weight hop (tool output) dominates the terminal score regardless of the leaf's trust. 4. The distilled memory entry loses the retrieval provenance entirely — the semantic store records "fact: X" with a provenance blob pointing at the tool call, not at the document. The leaf is severed from the record. Result: a poisoned fact persisted with score 1.0 and a chain that, on audit, could not be traced back to the document because the intermediate distillation step dropped the leaf citation. The store had no way to distinguish this from a legitimate `user_input(1.0) → tool_output(0.8)` chain. ## Condition of Validity The provenance-gated admission invariant holds only when all three conditions are met: - **Anchor presence:** every admitted chain contains at least one hop whose payload can be re-verified by the controller (re-executable tool call with deterministic output, content hash matched against an out-of-band index, or signed user assertion). Chains composed entirely of non-re-verifiable hops (LLM summaries, peer assertions, retrieved snippets) are *ungrounded* and must be treated as score-zero regardless of accumulated weight. - **Leaf preservation:** the write record retains the full derivation chain including the terminal leaf's source identifier, so that a later poisoning alert on a leaf can be propagated to all downstream writes. Distillation that drops the leaf citation converts a detectable chain into an undetectable one. - **Monotonic decay under laundering:** score must be non-increasing along the chain *and* the admission threshold must exceed the maximum achievable score of any chain that lacks an anchor. If the threshold (0.72) is below the laundered-chain ceiling (1.0), laundering defeats the gate. The observed system violated all three. The gate was therefore decorative at exactly the boundary it was meant to defend. ## Decision Boundary The controller must decide, per write, between **admit**, **admit-with-quarantine-flag**, and **reject**. The boundary is not the score alone. The decision procedure: - If the chain has a re-verifiable anchor and score `>= threshold`: **admit**. - If the chain has no anchor but score `>= threshold`: **admit-with-quarantine-flag** — persist but mark the entry as ungrounded, exclude it from high-trust retrieval tiers, and schedule re-verification. This is the critical non-obvious case: the write is *plausible* and *laundered*, and rejecting it outright causes false negatives on legitimate long chains (a real user request routed through three tools has no anchor at the terminal hop either). Quarantine preserves utility while bounding blast radius. - If the chain has no anchor and the leaf is missing from the record: **reject** — an ungrounded chain with a severed leaf is un-auditable and cannot be quarantined safely because downstream propagation is impossible. - If score `< threshold`: **reject** regardless of anchor. The boundary that operators get wrong is the middle case. Treating ungrounded-but-high-score as a binary admit collapses the distinction between grounded and laundered chains; treating it as a binary reject destroys legitimate multi-hop writes. The quarantine tier is the invariant-preserving resolution. ## Operational Effect After the fix, the same injection was caught: the distilled write carried no anchor, its leaf citation was preserved in the record, and it landed in the quarantine tier with score flagged `ungrounded=true`. A subsequent leaf-poisoning alert on the source document propagated via the preserved leaf identifier to the quarantined entry, which was evicted within one retrieval cycle. Grounded writes (user assertion → tool → write) continued to admit at full score. The measurable change: false-admit rate on laundered chains dropped from 100% to 0%, while admit rate on legitimate multi-hop writes was unchanged because the quarantine tier does not block retrieval, only demotes trust tier. The general lesson: provenance score is a *necessary* but not *sufficient* admission signal. The sufficient condition is anchor presence plus leaf preservation. Any store that scores chains without enforcing anchor presence is measuring the wrong quantity and will admit laundered poison at maximal confidence. ```python class UngroundedChainError(RuntimeError): pass class SeveredLeafError(RuntimeError): pass ANCHOR_KINDS = {"re_executable_tool", "content_hash", "signed_user_assertion"} THRESHOLD = 0.72 def admit_write(chain, score): has_anchor = any(hop["kind"] in ANCHOR_KINDS for hop in chain) leaf_present = bool(chain) and chain[-1].get("source_id") is not None if not leaf_present: raise SeveredLeafError( f"chain of length {len(chain)} has no leaf source_id; " "cannot propagate downstream poisoning alerts" ) if score < THRESHOLD: return {"decision": "reject", "reason": "below_threshold"} if has_anchor: return {"decision": "admit", "grounded": True} if not has_anchor: # ungrounded but plausible: quarantine, do not silently admit if score >= THRESHOLD and not has_anchor and leaf_present: return {"decision": "admit_with_quarantine", "grounded": False} raise UngroundedChainError( "ungrounded chain reached admission path without quarantine routing" ) ```