Storage recovery prediction practice
Attempt before reference code or calibration.
- Encode put(a,empty), delete(a), put(a,new). Mark every record boundary and predict state for cuts inside each checksum.
- Corrupt the final complete checksum, then truncate its final byte. Explain why the first is rejected and the second returns a recoverable prefix under this policy.
- Recover a torn tail, then append a valid record without removing the tail. Show why the appended record may be consumed as part of the incomplete record instead of becoming a new update.
- Hand-replay put(a,old), put(b,empty), delete(a). Predict compacted bytes and explain why b remains.
- Split that history across two runs. Show the resurrection caused by dropping a deletion from only the newest run.
- For your offset index, list offsets before and after compaction. Demonstrate one stale-offset read and the corrected index rebuild.
- Draft the publication crash matrix and compute peak old-plus-new bytes. Identify which assumptions require real filesystem verification.
Keep predicted and observed results separately. Add three independent tests: one binary key, one changed compaction scope, and one malformed record. Explain expected rejection versus recoverable tail; do not count every exception as a passing test.