Review report

core: PR #33324

๐ŸŸ  Major

Reject read errors before removing the original (src/node/blockstorage.cpp:281, head)

detail_fread returns zero for either EOF or a read error. The copy loop relies on feof(), but EOF and error are separate indicators, and this check does not reject a stream with both set. If a source read fails while also indicating EOF, the truncated staged file can be committed and the original removed. Check ferror as well as EOF before committing the staged file or deleting the original.

๐Ÿ’ก Suggestion

Test resuming after partial file replacement (test/functional/feature_reobfuscation.py:69, head)

The resume tests stage a key before copying any block files, then separately simulate the rename-only phase. They miss the reachable state where some originals have been removed after successful staging while others remain, possibly with an incomplete staged replacement. Add a deterministic fixture for this state and verify that resumed files decode to their original contents under the activated target key. This covers per-file recovery without relying on timing-dependent interruption.