Repository navigation
Harden the updater after an outside review - #16
Merged
Merged
Conversation
Reviewed by GameModeExecutor's session before 1.1.0 freezes the swap script into every installed copy: the recovery restores first (new file set aside, old one back, retried), then restarts, and writes result.txt last, each step in its own try; a new executable that refuses to start is set aside and the old one restarted; the rename into place gets 30 s of retries for OneDrive; the wait checks the process id is still this program. PowerShell and winget are started by absolute path (Windows searches the application's folder first). GitHub's hourly limit gets its own message with the minutes to wait; Restart now warns that the queue is cleared; Close is sent once. Docs: the digest when GitHub gives one, the TLS-inspecting proxy trade, the rare cases left. Measured: a normal update to the published 1.0.0, and a new file that refuses to start (rolled back, reason shown, nothing left behind). A test runs the script through Windows PowerShell's parser. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Why
GameModeExecutor's session reviewed the updater, at the maintainer's request, before 1.1.0 freezes the swap script. The script a version carries is the one that installs the next, so anything wrong in it reaches every 1.1.0 user.
What
Blockers fixed
$ErrorActionPreference = 'Stop'applies insidecatch, so a failingSet-Content result.txtused to skip the restore. Each recovery step now runs in its owntry:result.txtwritten last.powershell.exedropped beside the exe (a Downloads folder) would have run.Should and nice items
x-ratelimit-reset.Closeis sent once.Checks
.\scripts\build.ps1passes: 88 unit tests (new: the script parsed by Windows PowerShell's own parser, the rate-limit answer) and 3 end-to-end tests.review test [it's], a debug build as 0.9.0):a55a5f19…);Start-Processfailed, the old exe was restored and restarted, the reason was shown, and no.oldor.newwas left.🤖 Generated with Claude Code