fix(migrations): don't fail the update over an unloadable sleep-lock unit - #414
Open
duketopceo wants to merge 1 commit into
Open
duketopceo wants to merge 1 commit into
duketopceo wants to merge 1 commit into
Conversation
…unit migrations/1785608166.sh treated a reset-failed error as fatal, but on a unit that never loaded reset-failed is a normal no-op — the update stopped with a misleading "Could not reset" over nothing. Tolerate it the way omarchy-restart-audio already does, and skip the live repair entirely when the manager cannot load the unit (not packaged here, or user-masked): there is no failed state to clear and nothing to restart. Real inspection, restart, and stop failures still stay retryable. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
duketopceo
force-pushed
the
fix-sleep-lock-migration
branch
from
September 12, 2026 03:54
4b1543d to
fd3b546
Compare
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
Fixes #313.
migrations/1785608166.shtreated areset-failederror as fatal, but on a unit that never loadedreset-failedis an ordinary no-op — on machines whereomarchy-sleep-lock.servicewas never started (or never packaged — the #310 gap), the update stopped with a misleading "Could not reset" and a pointless retry.Two changes, matching the conventions already in the tree (
omarchy-restart-audiotoleratesreset-failedthe same way):reset-failedis no longer fatal in either branch; therestartthat actually repairs the monitor is what keeps its retry semanticsLoadState— a unit that isnot-foundormaskedhas nothing to repair and nothing to restart, so it skips cleanly (a masked unit also shouldn't be force-started over the user's choice)Failed inspection of LoadState still exits retryable, consistent with the migration's other probes.
Test plan
test/shell.d/sleep-lock-environment-migration-test.shextended: benignreset-failedfailure still restarts,not-found/maskedunits skip without restarting, failed LoadState inspection stays retryable — 12/12 passGenerated with Devin