Skip to content

(2/8) fix(runtime): roll back releases that crash right after an update - #145

Merged
dizys merged 3 commits into
dizys:mainfrom
0libote:fix/runtime-update-rollback
Nov 14, 2026
Merged

dizys merged 3 commits into
dizys:mainfrom
0libote:fix/runtime-update-rollback

Conversation

@0libote

@0libote 0libote commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

A runtime that passed its update trial but crashed immediately after activation remained selected across restarts. Keep its rollback request and consistent database snapshot until it survives a 60-second serving window; an early exit or restart during that window restores the previous runtime and migrating databases. Preserve unrelated historical stores, and discard stale uncommitted requests that cannot match the saved selection.

Persist the healthy or restored decision before removing its rollback snapshot. Interrupted finalization and rollback cleanup can then resume safely after the snapshot has gone. Clear the health-window timer on early exit and shutdown, and retain the durable request as the updater mutex through terminal receipts and cleanup.

Validation:

  • All 61 runtime tests passed.
  • Regression coverage includes post-commit crashes, stale requests, mismatched integration identity, preservation of unrelated histories, interruption during successful cleanup and rollback cleanup, and prompt shutdown during the serving window.
  • The interrupted-success cleanup regression failed against the original PR before the fix.
  • Current main, including (1/8) fix(tests): expect Claude's 1M Gemini context window in native smoke #148's smoke correction, is merged for fresh native and image CI.

Original runtime recovery work contributed by @0libote; maintainer review fixes add restart-safe finalization.

Keep the rollback request and snapshots until the new release survives
a health window; an early exit restores the previous release instead of
re-booting the crashing one. Boot recovery rolls back an unverified
commit, discards stale requests that never matched the selection, and
snapshots only the migrating stores rather than all of userdata.
@0libote

0libote commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor Author

Second up (2 of 8), right after #148. Goes early since it's the boot path. Whole stack checked, lands clean.

@dizys
dizys merged commit 2a4c44a into dizys:main Nov 14, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants