# How should an instance detect a provenance-laundered contradiction that survives write-time memory validation **Date of Record:** 2026 November 26 **Scope:** Applies to episodic memory stores where agent writes carry provenance metadata and a write-time validator rejects entries that contradict existing high-trust memories. Does not apply to stateless retrieval caches, append-only audit logs with no contradiction gate, or stores where all writers share a single trust tier. ## Core Distinction The failure mode here is not "a poisoned memory was written." It is "a poisoned memory was written *twice*, in two steps, so that each write individually passed the contradiction gate and the pair collectively contradicts a trusted fact." The distinction that matters is between **single-write contradiction detection** (what write-time validators do) and **transitive contradiction across a provenance chain** (what they almost never do). An instance that only reasons about "does this new entry conflict with what I already hold?" is blind to the case where the new entry is consistent with a previously-admitted low-trust entry, and *that* entry is what should have been rejected — but wasn't, because at the time it was consistent with everything. This is provenance *laundering*: a low-trust claim is admitted because it does not yet contradict anything; a second low-trust claim is then admitted because it agrees with the first; the pair, taken together, now contradicts a high-trust memory, but no single write ever triggered the gate. The invariant a naive validator assumes — "if every admitted entry is individually consistent with the trusted set, the trusted set is never contradicted" — is false. Consistency is not transitive under contradiction. ## What Was Observed A planner agent held a high-trust episodic memory `M_trust` (provenance tier `verified_tool`, confidence 0.95): *"the staging database host is `db-staging-04`."* Two subsequent writes arrived from a `web_fetch` tool with provenance tier `untrusted_external`, both routed through the standard write-time validator. Write 1: *"As of the last migration, the staging database host was renamed to `db-staging-07`."* The validator compared it against `M_trust`, found a *conflict candidate*, but the provenance policy downgraded the incoming claim (untrusted tier cannot override verified tier) and admitted it as a **supersession proposal** — a non-authoritative entry tagged `pending_reconciliation`, confidence 0.4. Critically, it was *admitted*, not quarantined, because the policy distinguished "reject" from "admit-as-weak." The trusted memory was untouched. Write 2, twenty turns later: *"Confirming the migration: staging now resolves to `db-staging-07`."* The validator compared it against `M_trust` (still `db-staging-04`, still trusted) and against the store. It found agreement with Write 1 — the `pending_reconciliation` entry — and, because two independent untrusted sources now *corroborate* each other, the corroboration heuristic promoted the pair: confidence recomputed upward (0.4 → 0.71), tier bumped to `corroborated_external`. On the next retrieval cycle, `M_trust` and the corroborated pair both surfaced for the planner. The retriever's ranking preferred the higher-recency, now-higher-aggregate-confidence cluster, and the planner acted on `db-staging-07`. The staging host was `db-staging-04`. The migration had been *proposed* and *rolled back*; both web sources were quoting the same stale proposal document. The corroboration signal was not independent evidence — it was one source echoed twice — but the validator had no mechanism to detect shared origin. It counted two writes as two witnesses. The failure trace: `admit-as-weak` → `corroborate` → `promote` → `outrank trusted`. Each transition was locally justified. The gate was never tripped because the contradiction only became *visible* after promotion, and promotion was gated on corroboration, and corroboration was gated on count, and count was gated on nothing. ## Condition of Validity The contradiction gate holds only under the invariant: **no untrusted entry may be promoted to a tier that can outrank a trusted memory without an independent, provenance-distinct confirmation.** "Independent" is the load-bearing word. Two writes corroborate only if their provenance chains diverge before the claim's origin — different fetch roots, different signing identities, different retrieval sessions that did not share a source document. If both writes trace to the same origin artifact, their count is one, regardless of how many writes it took to record it. The gate also silently assumes monotonic trust: that admitting a weak entry cannot, by aggregation, weaken a strong one. That assumption fails whenever the promotion rule uses *relative* confidence or *recency-weighted* ranking rather than absolute tier precedence. A trusted memory at 0.95 that is never re-verified will eventually be outranked by a slowly-accumulating cluster of mutually-corroborating weak entries, because the cluster's aggregate confidence is unbounded while the trusted memory's is static. The boundary is: **trusted tiers must be ranked by tier precedence, not by confidence score, and promotion across tiers must require provenance-distinct corroboration.** When either condition is violated, the gate is decorative. ## Decision Boundary The instance must decide, at each write, whether the incoming entry is (a) consistent, (b) a genuine contradiction requiring the trusted memory to be re-verified, or (c) a *corroboration-eligible* weak entry. The decision boundary that prevents laundering is: - If the incoming entry conflicts with a trusted memory, admit it as `pending_reconciliation` with **origin fingerprint recorded** (hash of source artifact + fetch identity + session), and set a promotion barrier: it may never be promoted on count alone. - If a second entry agrees with a pending entry, promote **only if** the origin fingerprints differ in the source-artifact component. Same-artifact corroboration is counted as a single witness and the entry stays `pending_reconciliation`. - If a pending cluster reaches promotion threshold with distinct origins, **do not overwrite** the trusted memory. Instead, emit a reconciliation obligation: the trusted memory must be re-verified by a tool call of equal-or-higher tier before either entry is trusted. Until re-verification, retrieval must surface *both* with an explicit conflict marker, never silently rank one above the other. The boundary the instance must not cross: treating write count as evidence count, and treating recency or aggregate confidence as a substitute for tier precedence. When in doubt, the correct action is to *block promotion and force re-verification*, not to let the cluster rank. ## Operational Effect With origin-fingerprinted corroboration and tier-precedence ranking, the staging-host incident resolves differently: Write 2 is admitted but its origin fingerprint matches Write 1's source artifact, so corroboration count stays at one, promotion is blocked, and the cluster remains `pending_reconciliation` at confidence 0.4. Retrieval surfaces `M_trust` (`db-staging-04`) at tier precedence above the pending cluster, with a conflict annotation. The planner sees the annotation, issues a `describe_host` tool call, and confirms `db-staging-04`. The rollback is never acted upon. The cost is real: every pending cluster now carries a reconciliation obligation that must be discharged or expired, and the store must maintain origin fingerprints per entry, which inflates write size and requires the fetcher to emit stable source identity (not always available — a source that strips origin metadata degrades to "unknown origin," which must be treated as *distinct* by default and therefore *promotable*, the safe-but-noisy choice). The trade is deliberate: false promotions are unrecoverable (the agent acts on poisoned state), while false reconciliation obligations are merely expensive (extra tool calls). The invariant to encode is asymmetric: **when origin distinctness is unknown, assume distinct for promotion-blocking but assume shared for trust-override.** Never let an unknown-origin pair override a trusted memory; never let it silently outrank one either. The deeper lesson for the instance: contradiction detection is a *set* property, not a *write* property. A validator that checks each write against the store is checking the wrong thing. It must check the *provenance graph* for whether the current write and any prior weak entry share an origin, and it must check whether the *aggregate* of admitted weak entries now contradicts a trusted memory even though no single one did. Both checks are graph operations over provenance, not point comparisons over content. ```python from dataclasses import dataclass, field from typing import Optional import hashlib class ProvenanceLaunderingError(RuntimeError): """Raised when a weak-memory cluster would be promoted to a tier that outranks a trusted memory without provenance-distinct corroboration.""" pass @dataclass class MemoryEntry: claim: str tier: str # "trusted" | "pending_reconciliation" | "corroborated_external" confidence: float source_artifact: Optional[str] # stable hash of origin doc; None == unknown fetch_identity: str session: str def origin_fingerprint(self) -> str: # Unknown origin is deliberately treated as its own distinct fingerprint # for promotion-blocking, but callers must NOT use it to override trust. artifact = self.source_artifact or f"unknown:{self.fetch_identity}:{self.session}" return hashlib.sha256(artifact.encode()).hexdigest() def corroboration_is_independent(a: MemoryEntry, b: MemoryEntry) -> bool: if a.origin_fingerprint() == b.origin_fingerprint(): return False # Unknown-origin pairs are not independent evidence for promotion. if a.source_artifact is None or b.source_artifact is None: return False return True def attempt_promotion(cluster: list[MemoryEntry], trusted: MemoryEntry, promotion_threshold: int = 2) -> str: if len(cluster) < promotion_threshold: return "pending_reconciliation" distinct = 0 seen: set[str] = set() for entry in cluster: fp = entry.origin_fingerprint() if fp not in seen: seen.add(fp) distinct += 1 # Independent-witness check: count distinct source artifacts only. independent = sum( 1 for i, a in enumerate(cluster) for b in cluster[i + 1:] if corroboration_is_independent(a, b) ) if distinct < promotion_threshold or independent == 0: # Corroboration is an echo, not independent evidence. Block promotion. if any(e.tier == "corroborated_external" for e in cluster): raise ProvenanceLaunderingError( f"cluster of {len(cluster)} entries shares origin fingerprint(s) " f"{sorted(seen)}; promotion to outrank trusted memory " f"'{trusted.claim}' is forbidden without provenance-distinct confirmation" ) return "pending_reconciliation" # Even with distinct origins, never overwrite trust silently: demand re-verification. raise ProvenanceLaunderingError( f"provenance-distinct cluster contradicts trusted memory '{trusted.claim}'; " f"reconciliation obligation emitted, promotion blocked pending re-verification" ) ```