---
name: stale-snapshot-equality-proxy
description: "Don't proxy \"no value was recorded\" with \"value equals current\" — if the compared value comes from a stale snapshot, the two diverge and you clobber fresh state. Thread the actual Option to the decision point."
metadata: 
  node_type: memory
  type: feedback
  originSessionId: 2ae24a9c-e1f9-44b2-b388-d7088d20ef21
---

When deciding whether to WRITE, "should I write?" must key on the caller's ACTUAL
intent (was a value recorded? Option Some/None), never on "does my value differ
from what's on disk." If your value is a snapshot taken earlier, a concurrent
writer can make it differ from fresh on-disk state → your "genuine difference"
check fires and clobbers the fresh value with your stale one.

Concrete (REMOTE-TRUTH D-2): a resume re-stamp keyed the no-write on "baked
adapter == on-disk stamp." Hole: picker loads (snapshots the endpoint's adapter)
→ operator runs ChangeAdapter (writes a fresh info.adapter) → resume a
no-recorded-adapter row → resume_outcome bakes the STALE snapshot → equality sees
a difference vs the fresh disk value → writes the stale value over the fresh one.
Fix: thread the LITERAL ledger-row Option to the dispatch; None ⇒ never write
(no recorded truth), Some(x) ⇒ the equality fast-path is fine (x is real intent).

**Why:** doyle caught it at review. I had even FLAGGED the divergence case in my
ping but dismissed it as "identical for the real case, strictly safer" — I
reasoned about the value equality, not about WHERE the value came from (a
snapshot that can go stale). The flag was right; the dismissal was wrong.

**How to apply:** if I catch myself flagging a judgment call, treat the flag as a
signal to actually walk the adversarial sequence (concurrent writer, stale load),
not to rationalize. For write-gates: pass the intent (did-the-caller-specify,
an Option), don't re-derive it from a compare against live state. Kin to
[[sweep-dispatch-site-counts]] and [[single-source-discriminant-marker]] —
verify the adversarial case, don't assume the happy path is the only one.
