From 83c3ed2852055cdfe98282d457c4a5e6335e1ff4 Mon Sep 17 00:00:00 2001 From: highlander Date: Fri, 21 Aug 2026 20:06:04 -0500 Subject: [PATCH] fix(test): LAST_SHIPPED stays 17 until 7.16 actually ships My own U5 update asserted STORAGE_VERSION_LAST_SHIPPED == 20, which is wrong in the specific way storage.h warns about two lines above the constant: "Bump this baseline when a release ships, in the release commit, never to make a build compile: lowering it is the exact edit that turns every upgrade in the field into a silent wipe." LAST_SHIPPED is the high-water mark of what is IN THE FIELD, not of what sits in the tree. 7.15 shipped V17; 7.16 has shipped nothing. Asserting 20 would have forced the next person to raise the baseline to make the test pass -- the edit the gate exists to prevent, arrived at by way of the gate itself. The compile-time assert only requires STORAGE_VERSION >= LAST_SHIPPED, and 20 >= 17 holds, so the raise was never needed. It moves in the release commit that tags 7.16. --- tests/test_storage_version_gate.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/test_storage_version_gate.py b/tests/test_storage_version_gate.py index 67d80ff5..a67069fc 100644 --- a/tests/test_storage_version_gate.py +++ b/tests/test_storage_version_gate.py @@ -442,7 +442,18 @@ def test_active_flash_format_is_v20(self): "is a deliberate release act (docs/StorageVersionGate.md): confirm " "the reader chain, the anti-rollback story, and the release notes, " "then update this test." % self.version) - self.assertEqual(20, self.last_shipped) + # LAST_SHIPPED stays at 17 until 7.16 actually SHIPS in a signed + # release. It is the high-water mark of what is IN THE FIELD, not of + # what is in the tree -- and storage.h says two lines above the + # constant that raising it to make a build compile "is the exact edit + # that turns every upgrade in the field into a silent wipe". The + # compile-time assert only needs STORAGE_VERSION >= LAST_SHIPPED, and + # 20 >= 17 holds, so nothing requires the raise. + self.assertEqual( + 17, self.last_shipped, + "STORAGE_VERSION_LAST_SHIPPED is %d. It tracks the last SIGNED " + "release (7.15 = V17) and moves in the release commit that tags " + "7.16, not when a format lands in the tree." % self.last_shipped) def test_burned_versions_have_no_reader(self): """18 and 19 must never be parsed by 7.16.