fix: remove stuck node upgrade-scheduled status#145
Merged
jacderida merged 1 commit intoJul 8, 2026
Conversation
The daemon flipped a running node to `UpgradeScheduled` from a 60s poll the moment its on-disk binary version drifted, but only returned it to `Running` on process exit + respawn. When the exit never followed (false-positive drift, an adopted node still alive, or a fast/Windows upgrade the poll missed), the node stayed `UpgradeScheduled` indefinitely. Remove the status entirely rather than fix it: the window it represented was tiny and not useful. Upgrades are now detected purely at process exit by on-disk binary version drift for exit codes 0 (Unix) and 100 (Windows RESTART_EXIT_CODE) — which also fixes the pre-existing misclassification of Windows and fast upgrades that the exit-code-0-only path missed. Removes the UpgradeScheduled status variant, the spawn_upgrade_monitor poll, mark_upgrade_scheduled, the pending_version field/plumbing, and the UpgradeScheduled SSE event. Version refresh (respawn_upgraded_node) and the NodeUpgraded completion event are retained. Backwards compatible: the status is never persisted, and a serde alias on Running maps any `upgrade_scheduled` value emitted by an older daemon during a rolling upgrade back to Running. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dirvine
approved these changes
Jul 8, 2026
dirvine
left a comment
Contributor
There was a problem hiding this comment.
Approved under the requested severe-issue-only threshold.
Reviewed PR #145 at head a40b61a and did not find a PR-introduced severe blocker in the upgrade-status removal / exit-driven upgrade respawn path.
Verified locally:
cargo check --all-targetspassedcargo clippy --all-targets --all-features -- -D warningspassedcargo test -p ant-core upgrade --lib --no-fail-fastpassedcargo test -p ant-core node_status --lib --no-fail-fastpassed
Notes, not blockers for this PR:
- PR-head Security Audit is failing because the branch is based before the
quinn-proto 0.11.15lockfile fix onmain; GitHub's synthetic merge ref hasquinn-proto 0.11.15, so this does not reintroduce that advisory in the merge result. - Follow-up issues should cover hardening upgrade-respawn against concurrent stop/eviction and updating docs/UI notes for the removal of
UpgradeScheduled/pending_version.
Given Chris's stated release urgency and severe-only review bar, this is approved.
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.
The daemon flipped a running node to
UpgradeScheduledfrom a 60s poll the moment its on-diskbinary version drifted, but only returned it to
Runningon process exit + respawn. When the exitnever followed (false-positive drift, an adopted node still alive, or a fast/Windows upgrade the
poll missed), the node stayed
UpgradeScheduledindefinitely.Remove the status entirely rather than fix it: the window it represented was tiny and not useful.
Upgrades are now detected purely at process exit by on-disk binary version drift for exit codes 0
(Unix) and 100 (Windows
RESTART_EXIT_CODE) — which also fixes the pre-existing misclassificationof Windows and fast upgrades that the exit-code-0-only path missed.
Summary
NodeStatus::UpgradeScheduledstatus variant, thespawn_upgrade_monitor60s poll,mark_upgrade_scheduled, thepending_versionfield/plumbing (runtime state,NodeInfo,NodeStatusSummary, REST handlers, CLI), and theNodeEvent::UpgradeScheduledSSE event.{0, RESTART_EXIT_CODE}and respawn directly via
respawn_upgraded_node.respawn_upgraded_node) and theNodeUpgradedcompletion event.NodeConfig), anda
#[serde(alias = "upgrade_scheduled")]onRunningmaps any value emitted by an older daemonduring a rolling upgrade back to
Running.ant-uineeds no changes (it is a thin proxy over the daemon API).Test plan
transition cleanly with the
UpgradeScheduledstatus removed.cargo check --all-targetsandcargo clippy --all-targets --all-features -- -D warningspass.cargo test --all(full suite via CI).🤖 Generated with Claude Code