{"content":"higun dev journal — commit e42319c (codex/balance-correctness-p0): fix: rebuild first post-restart delta application from history (replay guard)\n\nThird P0: the crash window between a block's balance-delta commit and its last_indexed_height write replays that block after restart. History merges are idempotent (dedupMerger) but delta application is not — replayed income deltas were applied a second time and inflated balances. Positive drift never trips the negative-state recovery, so the inflation persisted, and hot addresses are over-represented in whatever block the OOM kill interrupted — matching the 'frequently used addresses show wrong balance' symptom.\n\nFix: NewUTXOIndexer arms a one-shot guard; the first non-reindex delta application after startup rebuilds the touched addresses from history (idempotent, always correct) instead of re-applying deltas. Later blocks take the fast incremental path again. Test covers double-apply prevention and guard consumption.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}