From 6268e38a3d05b82f30adb23e0729fd435af5c845 Mon Sep 17 00:00:00 2001 From: highlander Date: Tue, 8 Sep 2026 22:17:08 -0600 Subject: [PATCH] test(storage): preserve CRC framing in migration fixtures --- tests/test_storage_version_gate.py | 40 ++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/tests/test_storage_version_gate.py b/tests/test_storage_version_gate.py index c00823fc..4cfc34ca 100644 --- a/tests/test_storage_version_gate.py +++ b/tests/test_storage_version_gate.py @@ -577,6 +577,20 @@ def patch(self, off, rel, data): with open(self.img, "r+b") as f: f.seek(off + rel) f.write(data) + # These edits construct alternate-version fixtures, not corrupt + # records. Preserve the optional durable-commit envelope so boot + # reaches the version reader rather than rejecting a stale CRC. + f.seek(off) + record = f.read(2580) + if record[2572:2576] == b"crc1": + crc = 0xffffffff + for (word,) in struct.iter_unpack("