Repository navigation
release: keep the legacy schema marker at 4 so older Cores update - #1306
Conversation
Cores before v3.6.0-beta.1 read the release-notes marker <!-- ftw-state-schema:N --> and copy their whole history before any update whose N differs from their own schema, 4. On a Raspberry Pi with a large history that copy cannot finish (#1302), so no such box could ever reach a release with a newer schema through the UI. Release notes now carry two markers. The legacy one stays at state-schema.json's legacy_marker (4), so older Cores skip the copy and update. The new <!-- ftw-state-schema-v2:N --> carries the real schema; Cores from this change on read it first and use it to refuse a downgrade. The stable release guard requires exactly one of each, a Go test pins legacy_marker to 4, and the promotion test rejects notes that would send old Cores back into the copy. Refs #1302 Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e9ae4bfba7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| { | ||
| "version": 7 | ||
| "version": 7, | ||
| "legacy_marker": 4 |
There was a problem hiding this comment.
Preserve a rollback snapshot across schema-changing updates
For a legacy Core on schema 4, this marker makes the schema-7 release appear schema-compatible: its old parser reads 4, sets FullBackupRequired to false, and runVersionUpdate skips createPreUpdateSnapshot. If the new Core fails after changing state.db, reverting the image leaves no schema-4 snapshot even though SchemaVersion explicitly denotes a format the prior Core cannot safely reopen. Avoid representing a schema-changing update as unchanged; resolve the backup timeout without removing the rollback safety net.
AGENTS.md reference: AGENTS.md:L24-L25
Useful? React with 👍 / 👎.
Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Fredrik Ahlgren <[email protected]>
Refs #1302. Pairs with #1304; both must be in the next beta.
Problem
#1304 stops new Cores from copying history into the update rollback point. It cannot help a box that is still on v3.5.3-beta.1 or older: that box runs the old code when it updates. The old code reads
<!-- ftw-state-schema:N -->from the target's release notes and, whenever N differs from its own schema (4), runs the paced full-history export first. On a Raspberry Pi with a large history that export cannot finish, so no such box can reach any release with a newer schema through the UI. Asking every tester to update over SSH is not acceptable.Change
Release notes carry two markers from now on:
<!-- ftw-state-schema:N -->state-schema.jsonlegacy_marker(4)<!-- ftw-state-schema-v2:N -->state-schema.jsonversion)beta.ymlandrelease.ymlreadlegacy_markerfromstate-schema.jsonand publish both markers.scripts/check-stable-release.pyrequires exactly one legacy marker with the floor value and exactly one v2 marker with the expected schema.state.LegacyReleaseMarkerand a Go test pin the floor to 4; changing it trips the test and its comment explains why.Why this is safe now
v3.6.0-beta.1 was the only release whose Core reads the legacy marker with a schema above 4. It was withdrawn to a draft on 2026-09-17 and, as far as the owner knows, no box installed it. A box that did would refuse this update ("newer history format") and needs a manual image change; that is documented in the PR for #1302.
Old Cores take no local rollback point on this transition. They never had a usable one from the UI: the updater restores only
state.db, and the rollback handler refuses points that predate a history-format change. Going back still means a full backup made before the update, as before.Evidence
go test ./internal/selfupdate/ ./internal/state/pass, including the new parser test that checks what an old Core sees (4) and what a new Core sees (7) in the exact body the workflows publish.make release-workflow-testpasses.scripts/test-exact-image-promotion.shnow also rejects notes with the legacy marker at the current schema (which would send old Cores back into the copy) and notes without the v2 marker.🤖 Generated with Claude Code