fix(updater): handle busy helpers and same-version repairs - #261
Merged
Merged
Conversation
Kuddev
marked this pull request as ready for review
September 23, 2026 07:07
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.
Result / 用户结果
A verified same-version installer can repair a previously locked helper while leaving the main executable byte-identical. The updater now accepts that successful repair instead of reporting “Same-version installation did not replace the application binary”. Fixes #258.
Design / 设计边界
Installer success and the expected reported application version remain required. Package size/SHA-256 verification, participant identity, commit authority and snapshot recovery are retained. The installed main hash is recorded as evidence, but is no longer an invalid same-version success condition. Before starting setup, a bounded preflight waits for installed Hook files to become writable. A persistent lock fails before setup can partially replace the installation. The causal note explains the partial-upgrade case and the limits of installed-file verification.
Evidence / 验证依据
scripts/tests/test_update_handoff.ps1: all 12 native process-fixture scenarios passed.repair-identicalreplaces the helper while retaining the main executable bytes and must succeed.upgrade-noopreturns setup success but leaves the wrong version and must fail. Cancellation, failed setup, checksum/identity errors and unprepared processes remain covered.helper-unlockedverifies transient locks are awaited;helper-heldverifies persistent locks prevent setup entirely and recover the original application.Required Review / 必须确认