pingqiuandClaude Opus 5.5 e4135b9668 fix(sw-block): refuse bad migration geometry before any write (row 13b P1, P2s)
codex01 review of 7c6a29d8:

- P1: ValidateMigrationV3 lacked the checked extent end, so an aligned
  geometry whose extent end overflows passed, the backup and the map were
  written, and only the slot validation refused. The geometry check now
  applies the same bounds (volume, extent, block, the checked WAL and
  extent ends, the file end within MaxInt64), and the tool runs it, and a
  file-size bound on the v2 WAL, before the WAL is read or anything is
  written.
- P2: the scan allocated the v2 WAL size from the superblock before any
  bound; it is now bounded by the file size first, with no wrapping sum.
- P2: a rerun that found the v2 chunk bitmap already renamed skipped the
  directory fsync an earlier run may have failed; it now fsyncs it.

Controls: an overflowing extent end, a WAL past the file end and a WAL
size whose sums wrap are each refused with no byte written; a retirement
whose directory fsync failed is made durable by the rerun. Mutants: no
checked file end, no file-size bound, the rerun skipping the fsync. The
WAL-region overflow check alone is equivalent: the file-size bound also
refuses that case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 18:22:05 -08:00
Languages
Go 84.6%
Rust 7.8%
Shell 2.7%
templ 1.6%
Java 1%
Other 2%