fix(updater): make CLI updates resilient and actionable#52
Merged
Conversation
Prevent automatic update checks from interrupting successful commands when configuration, cache persistence, or release discovery fails. Keep atomic temporary files beside their destinations so writes and replacements stay on the same filesystem. Verify downloaded native binaries before replacing the current executable, preserve rollback behavior, and route source checkouts through the detected package manager while recommending the concise self-update command. Simplify human-facing update output, reuse cached availability between daily network checks, show notices after help, and make --clear-cache perform an immediate refresh. Add regression coverage for failure containment, installation routing, binary verification, cached notices, and command output.
leonkenneth
approved these changes
Jul 13, 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.
Context
Automatic CLI update checks could crash otherwise successful commands when configuration or update-state persistence failed. Atomic writes also created temporary files outside the destination directory, which could cause cross-filesystem rename failures.
The updater experience had several related issues:
update --clear-cachecleared the state but returned without performing the promised fresh check.altertable update --installflow.Proposed solution
This change makes the updater resilient, safe, and more actionable:
update --clear-cacheimmediately perform a fresh release check.altertable update --installunless a package-manager installation is positively detected.User-visible behavior
When an update is available: