Repository navigation
fix(device): recover wedged Shell restarts safely - #585
Merged
Merged
Conversation
This was referenced Aug 30, 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
This is a recovery hardening follow-up to #584 and supports the unattended NET-05 workflow tracked by #544.
Why
During the signed Mini Plus corrective deployment for #584, the old Bloom Shell PID retained a pending TERM signal while wedged in its SDL wait. The deployer correctly restored bytes but could not complete the supervised restart until that exact retained PID was killed manually. That left an unattended Hot deployment unable to recover even though the runtime supervisor, network association, key-only SSH listener, and signed rollback state were healthy.
The new path preserves graceful termination as the default. Escalation occurs only after 20 bounded 250 ms observations, only when
pidofstill resolves exactly one process, and only when that PID is the same PID originally sent TERM. A replacement process is never signaled by this path.Validation
test/shell/dev_deploy.bats: 17/17 pass in 14 secondsgit diff --check: passDevice evidence
The motivating failure was observed on the USB-powered Miyoo Mini Plus while running the signed #584 candidate. The exact old Bloom Shell PID remained after TERM; killing only that retained PID allowed the existing runtime supervisor to reap it and launch the corrected Shell. The replacement Shell reached structured
readystate, the prior PID disappeared, Wi-Fi remained associated with its existing IPv4/default route, the reviewed key-only SSH listener remained clean, and the active session remained IDLE.No device filesystem or network mutation is needed to validate this host-side policy change. The currently running Mini Plus overlay remains the signed #584 Shell candidate and is deliberately not replaced by this PR.
Dependencies and limitations
mainafter merged fix(shell): keep Wi-Fi polling inside SDL 1.2 event range #584Closes no issue; follow-up to #544 and #584.