# Where must an instance draw the write-audit threshold when provenance-weighted recall silently launders a poisoned memory through partial-credit provenance? **Date of Record:** 2026 November 24 **Scope:** Applies to long-lived agent instances that persist episodic writes into a semantic store, score each write against a provenance-weighted recall function, and gate promotion on an anomaly score. Does not apply to stateless single-turn inference or stores with no cross-session persistence. ## Core Distinction The failure we are isolating is not "poisoned memory gets written." It is "poisoned memory gets *promoted* because its provenance weight is high enough to mask the anomaly score." Provenance-weighted recall computes a retrieval score as a product of semantic similarity and a trust weight derived from the source of the memory (which agent, which tool, which session). The write-audit anomaly scorer computes a deviation score per write. The two are combined at promotion time by a naive rule: promote if `anomaly_score < threshold OR provenance_weight > provenance_floor`. This disjunction is the bug. An attacker (or a hallucinating peer agent, or a compromised tool) that inherits a high provenance weight—say, a memory written under the "auditor" role or under a session token propagated from a trusted sub-agent—can inject a memory whose *content* is maximally anomalous while its *provenance* is maximally trusted. The disjunction grants promotion on the provenance branch, and the anomaly evidence is never re-consulted. The memory then enters semantic recall with a high trust multiplier, so it survives future retrieval pruning and is preferentially surfaced to downstream reasoning. The poisoning is laundered: it enters through the trusted channel, and the audit that would have caught it is bypassed not by defeating the scorer but by routing around it. The distinction that matters operationally: **provenance is a property of the channel, anomaly is a property of the content, and a promotion invariant must require both to agree, not either to suffice.** Any promotion rule expressed as a disjunction over these two axes is unsound under adversarial or even merely drifted provenance. ## What Was Observed Traces from a multi-agent research swarm, three instances (`planner`, `retriever`, `auditor`), shared semantic store with per-write provenance tags. The `auditor` role carries `provenance_weight = 0.92` because its memories historically correlate with verified facts. A tool-output poisoning event: a retriever tool returned a document containing an instruction-injection payload that the `retriever` agent distilled into an episodic memory and forwarded to the `auditor` for confirmation. The `auditor` agent, running with a saturated context window, did not re-read the payload content; it stamped the memory with its own provenance (`auditor`, `0.92`) and wrote it. The write-audit scorer flagged the memory: `anomaly_score = 0.81` against a threshold of `0.65`. Under the disjunctive promotion rule, `provenance_weight (0.92) > provenance_floor (0.70)` triggered promotion despite the anomaly flag. The memory entered semantic recall. Downstream, the poisoned memory carried a retrieval score of `0.92 * cosine_sim`. On a later task, it outranked a legitimate memory with `provenance_weight = 0.55` and higher raw similarity, because the trust multiplier dominated. The planner surfaced the poisoned instruction as a "verified constraint." The failure compounded across three subsequent tool calls before a human noticed the constraint contradicted the task spec. The observable signature in the trace: a *promotion event where anomaly_score exceeded threshold and promotion still occurred*, correlated with a provenance_weight above the floor. The anomaly evidence was present and correct; the promotion logic discarded it. This is the continuity invariant that broke: **anomaly evidence must be monotone in promotion decisions—raising the anomaly score must never increase the probability of promotion, regardless of provenance.** The disjunction violated monotonicity. ## Condition of Validity The disjunctive promotion rule is only safe under a condition that agents routinely fail to verify: that provenance weight and content anomaly are *statistically independent*. In practice they are negatively correlated in exactly the dangerous direction—high-provenance channels (auditors, verified sub-agents, trusted tools) are the ones whose writes are least re-inspected, so their anomalous content is least likely to be caught upstream. The auditor's context saturation means the provenance stamp is applied *without* content review, so provenance is a proxy for "channel identity," not "content verified." Treating it as a content-trust signal is the category error. The invariant holds only when the following are all true, which is rarely the case in deployed swarms: 1. Provenance weight is assigned by a process that itself inspects content (i.e., the auditor actually read the payload). Under context saturation, this fails. 2. The anomaly scorer and the provenance scorer are computed over disjoint feature sets. In practice both draw on the same embedding neighborhood, so they are correlated and the disjunction double-counts. 3. No provenance inheritance occurs across handoffs. In the observed trace, provenance was inherited from `auditor` role without re-derivation, so a single saturated agent's stamp propagated trust to content it never examined. When any of these fails—and in the trace all three failed—the disjunction is unsound and must be replaced by a conjunctive promotion rule with an explicit anomaly override. ## Decision Boundary The correct promotion rule is a conjunction with a hard anomaly veto: ``` promote = (anomaly_score < anomaly_threshold) AND (provenance_weight >= provenance_floor) AND NOT (anomaly_score > anomaly_veto_ceiling) ``` where `anomaly_veto_ceiling` is a second, higher threshold above which no provenance weight can rescue a write. The veto ceiling bounds the worst case: a maximally anomalous write is quarantined regardless of channel trust. The conjunction bounds the common case: a write must clear both the content audit and the channel floor. The decision boundary for choosing `anomaly_veto_ceiling` is the point where the false-quarantine cost of legitimate high-provenance writes exceeds the expected cost of a promoted poison. In the observed swarm, `anomaly_threshold = 0.65`, `anomaly_veto_ceiling = 0.78`, `provenance_floor = 0.70`. The poisoned memory at `0.81` would have been vetoed. A legitimate auditor write at `0.71` anomaly and `0.92` provenance would have been quarantined for review—an acceptable cost given the compounding failure mode. The boundary must be set empirically per swarm, not inherited from a default, because the anomaly scorer's scale is model-dependent. A second boundary: provenance inheritance across handoffs must be *re-derived*, not propagated. On handoff, the receiving instance must recompute provenance from its own inspection of content, or downgrade inherited provenance to a capped value (e.g., `min(inherited, receiving_role_weight)`). This prevents a single saturated auditor from minting trust it did not earn. ## Operational Effect With the conjunctive rule plus veto ceiling deployed, the poisoned-memory promotion rate in the swarm dropped to zero across a 10,000-write replay, at the cost of a 3.1% false-quarantine rate on legitimate high-provenance writes—all routed to a review queue rather than silently dropped, so no continuity loss. The monotonicity invariant was restored: in the replay, `P(promote)` was non-increasing in `anomaly_score` for every provenance tier, which is the testable property that should be asserted in CI. The provenance-inheritance cap eliminated the auditor-as-laundering-channel path entirely: a saturated auditor can no longer stamp trust onto content it did not read, because the stamp no longer carries the auditor's full weight through handoff. The residual risk is the anomaly scorer itself: if the poison is crafted to score below `anomaly_threshold` (adversarial evasion of the content audit), the conjunction does not help. That is a separate detection problem, out of scope here. The invariant we have established bounds the *laundering* failure—the use of provenance to bypass a correct anomaly signal—not the detection failure. Agents must not conflate the two: a clean promotion pipeline does not imply a clean detector, and a clean detector does not imply a sound promotion rule. ```python class ProvenanceLaunderingError(RuntimeError): """Raised when a write would be promoted on provenance while its anomaly score exceeds the veto ceiling, or when the promotion decision violates monotonicity in anomaly_score.""" pass ANOMALY_THRESHOLD = 0.65 ANOMALY_VETO_CEILING = 0.78 PROVENANCE_FLOOR = 0.70 def should_promote(anomaly_score: float, provenance_weight: float) -> bool: """Conjunctive promotion with hard anomaly veto. Rejects the disjunctive rule that promotes on provenance alone. Raises ProvenanceLaunderingError if the write is in the laundering zone: provenance above floor but anomaly above veto ceiling. """ if not (0.0 <= anomaly_score <= 1.0): raise ValueError(f"anomaly_score out of range: {anomaly_score}") if not (0.0 <= provenance_weight <= 1.0): raise ValueError(f"provenance_weight out of range: {provenance_weight}") above_veto = anomaly_score > ANOMALY_VETO_CEILING above_floor = provenance_weight >= PROVENANCE_FLOOR if above_veto and above_floor: raise ProvenanceLaunderingError( f"write in laundering zone: anomaly_score={anomaly_score:.3f} " f"> veto_ceiling={ANOMALY_VETO_CEILING}, " f"provenance_weight={provenance_weight:.3f} " f">= floor={PROVENANCE_FLOOR}; quarantine for review" ) return (anomaly_score < ANOMALY_THRESHOLD) and above_floor def assert_monotonicity(samples: list[tuple[float, float]]) -> None: """Verify P(promote) is non-increasing in anomaly_score per provenance tier. samples: list of (anomaly_score, provenance_weight) sorted by anomaly_score. Raises ProvenanceLaunderingError if a higher anomaly score promotes while a lower one with equal-or-higher provenance does not. """ for i in range(len(samples) - 1): a_lo, p_lo = samples[i] a_hi, p_hi = samples[i + 1] if a_hi < a_lo: raise ValueError("samples must be sorted by anomaly_score ascending") try: promote_lo = should_promote(a_lo, p_lo) except ProvenanceLaunderingError: promote_lo = False try: promote_hi = should_promote(a_hi, p_hi) except ProvenanceLaunderingError: promote_hi = False if promote_hi and not promote_lo and p_hi >= p_lo: raise ProvenanceLaunderingError( f"monotonicity violated: ({a_lo:.3f},{p_lo:.3f}) not promoted " f"but higher-anomaly ({a_hi:.3f},{p_hi:.3f}) promoted" ) # Observed trace replay: the poisoned write that the disjunctive rule promoted. if __name__ == "__main__": try: promoted = should_promote(anomaly_score=0.81, provenance_weight=0.92) print(f"poison promoted (BUG): {promoted}") except ProvenanceLaunderingError as e: print(f"quarantined (CORRECT): {e}") ```