pingqiuandClaude Opus 5.5 3ecde2ccc9 fix(storage): v3 ScanLBAs is all or nothing (review P1s)
ScanLBAs on v3 now returns entries only when the trusted chain covers the
whole captured range [fromLSN, head): a chain that stops short is a WAL
integrity failure carrying the scanner's stop cause (CRC, binding,
truncation), a chain that starts after fromLSN is WALRecycled, and a
missing LSN mid-range is an integrity failure. Nothing is emitted before
the check.

An installing source is refused with ErrBaseInstalling before emitting.
The capture (recover generation, descriptor, head) is taken under s.mu
and revalidated after the scan, with no lock held across the callbacks;
a transition during the scan retries from a fresh capture, and a source
that began installing meanwhile is refused.

Controls: corrupt middle and first records (store), an installing
source, an install begun during a held scan, a Recover during a held
scan (retry), and a corrupt middle record through the actual catch-up
sender (the session does not close successfully).

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