Repository navigation
Fix Windows repeat installs while the current generation is running - #1325
Merged
Merged
Conversation
AnthonyRonning
marked this pull request as ready for review
October 27, 2026 18:21
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.
A repeat Windows NSIS install could fail after the installed app started its host. Preparation’s append-only executable probe succeeded, but activation then requested
GENERIC_WRITEon every generation, including the currently mapped executable. Windows refused that redundant write guard with sharing violation 32 even though the requested generation was already current.The unchanged activation path reproduced this in diagnostic CI:
repeat-install→activation-child→generation-guards, native error 32. A separate native probe confirmed append access succeeds and generic write access fails on the same mapped private PE; ordinary existing-pointer republication passed. The original failure in #1315’s packaging run is retained.Exact-current repeats now pin
current.jsonand all fixed payload files read-only, repeat registration/bootstrap/parent-bound intent/hash/tree/PE/signature admission under those pins, and complete only the matching installer intent. Other generations retain their write guards; different-generation and uninstall-recovery installs keep the original atomic publication path. The existing pointer and payload bytes are preserved.The installer smoke now retains an explicit Windows read pin on
current.jsonthrough repeat installation and identity assertions, making no-republication a deterministic requirement. A native regression uses a genuinely mapped copied PE, checks metadata write denial and unchanged file IDs/hashes, and requires an explicit child-completion marker. Both native discovery and its contract test require the new case.The mapped-image fixture also copies executable bytes into strict-DACL private temporary storage before executing the exact test, so runner workspace ACLs no longer stand in for installed-storage permissions. Activation failures now preserve fixed stage/Win32 diagnostics through NSIS without replacing their original typed errors or rollback behavior.
Validation:
just ci, rootjust lane repo, all 45 portable Windows packaging tests, and the normal commit hook passed.ci-okare preserved as the before-fix result.90e4e8d108cdcbf914a6dc10da771d3098651242:ci-okand all three requested Windows lanes passed. Native suites executed 88 + 5 tests with zero failures/ignored/filtered; the new same-current mapped-image case passed. The actual unsigned Dev NSIS smoke passed install, pointer-pinned repeat, GUI/ACP checks, host stop and state-preserving uninstall.968fed6. Actual master Desktop Builds #752 is fully green, source968fed66115855d452e13e96c969f8418ca62847, attempt 1. All six Windows build/sign/downloaded-consumer jobs passed. Both real signed Dev and Prod installers passed provenance, fresh install, pointer-pinned repeat, CLI/GUI/ACP checks, host stop and state-preserving uninstall viawindows-release.py verify ... --smoke. The combined source also contains independently merged Remove Agent third-party notice machinery #1330 (four-file v2 inner bundle); integration review, all 45 merged-source portable packaging tests and root repository checks passed. The earlier green PR results apply to reviewed head90e4e8d1, not automatically to the combined master tree.Rebased onto the merged CI rewrite, master
864374411b06c9bd314a72c6421fd4923100350b. Bothci:packageandci:windowsare applied. This PR did not change release/publisher workflows or signing environments. No skip-CI marker or public Windows publication is included.