pingqiuandClaude Opus 5.5 54de8ab8ac storage: v3 read damage verdict bound to one recovery lifetime; read I/O is substrate I/O (codex01 P2s)
(1) A same-open Recover can fence a dropped record and re-allocate its
LSN to the same LBA at the same position: a read parked across it saw the
fenced bytes and, finding the entry unchanged, reported false WAL damage.
The unchanged-entry verdict now also requires the same recovery
generation (a reset bumps it too) across the attempt; otherwise the read
retries and returns the new write.

(2) A failed or short pread (including io.EOF: the WAL region lies inside
the file) is a substrate I/O failure, never WAL integrity. Only a record
that was read and fails validation within one stable lifetime is damage.

The comment no longer implies a nonce check: LSN allocation runs on across
a reset, and LBA+LSN+CRC identify the resolved write.

Controls: a parked read across a reusing same-open recovery returns the
new write; a truncated file and a failing fd give substrate I/O.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 06:19:50 -08:00
Languages
Go 84.5%
Rust 7.9%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%