Repository navigation
Trim safe serve upgrade to drain, restore, and retire (MN-REQ-06.14) - #210
Merged
Merged
Conversation
The upgrade stays inside memnet serve. Client retry and the systemd helper leave the requirement, the verify case, and the operator note. Co-authored-by: chouswei <chouswei@users.noreply.github.com>
memnet-mcp and the gateway no longer retry serve_draining. A clean startup restore marks the manifest retired so a later restart does not replay the snapshots. Co-authored-by: chouswei <chouswei@users.noreply.github.com>
chouswei
marked this pull request as ready for review
October 9, 2026 04:32
chouswei
added a commit
that referenced
this pull request
Oct 9, 2026
chouswei
added a commit
that referenced
this pull request
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Trims the squash-merged safe-upgrade cut (#208) to what a standalone
memnet serveneeds: save every loaded session, restart on the new version, reload every session. MN-REQ-06.14 and MN-VER-06-S12 are narrowed first. Version stays 0.19.21. No changelog version section. Not merged.Kept
memnet admin upgrade-prepare(MEMNET_ADMIN_TOKEN): quiesce,@ERR: serve_draining|retry_after_s=<seconds>, and the in-flight wait.--allow-unsaved.@STAT: upgrade_restore|ok|n|failed|m.Removed
MEMNET_UPGRADE_RETRY_S). Clients see the normal refusal or a connection error during the restart.memnet-upgradehelper (systemdExecStartswap, gateway pin edit, unit rollback, and the clients-ready gate).upgrade-retirecommand. Serve retires a clean manifest itself.Operator note:
docs/operations/safe-upgrade.mdis the short procedure (install the new venv,upgrade-prepare, check ready-to-stop, restart the unit, read the restore stat). Rollback is pointing the unit at the old venv.Tests
tests/test_safe_upgrade.pyandtests/test_sysml_safe_upgrade.py: ACL, near-expiry TTL, and a near-cap graph; unsaveable blocks ready-to-stop; a corrupt snapshot fails loud and stays on disk; an older format v1 loads; an unsupported format leaves the file; drain refuses new work while in-flight commands finish; a clean restore retires and a later start does not replay; TCP restart keeps the same id, then a further restart does not replay.