๐ Major
Probe genesis at its block-payload offset (src/validation.cpp:4960, head)
{0, 0} points to the start of the storage header, not the genesis payload. ReadRawBlock() rejects positions below STORAGE_HEADER_BYTES (8 bytes), while WriteBlock() returns the position after that header. The probe therefore always fails and the code always calls WriteBlock(). On macOS, the allocator still calls ftruncate(offset + length); if recovery has empty block-file metadata and the existing blk00000.dat extends beyond the first allocation chunk, rewriting genesis can truncate the file and discard later blocks. Probe {0, node::STORAGE_HEADER_BYTES} so a valid on-disk genesis can be reused.
๐ก Suggestion
Test genesis reuse during block-index recovery (src/validation.cpp:4969, head)
Add a focused regression test for LoadGenesisBlock() when index metadata is absent but blk00000.dat contains a valid genesis record followed by later block-file data. Verify that recovery reuses genesis and preserves the file tail, including data beyond the first allocation chunk so truncation is observable. Current tests check storage offsets or call this loader as setup, but do not assert this recovery behavior. Such a test would guard the data-preservation goal of this change.