Repository navigation
Clean stale Windows update rollback backups - #908
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Signed-off-by: Colin Neilens <coneilen@microsoft.com>
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 #758 by marking only committed update backups as cleanup-ready and removing those stale backups from the installed Windows shell once their files are no longer in use. Failed or incomplete rollback directories remain unmarked and are never selected for automatic cleanup.
Changes
Test plan
RED: pwsh -NoProfile -File Tools\windows\Tests\Packaging.Rollback.Tests.ps1 -> committed-cleanup-blocked did not mark the committed backup as cleanup-ready
GREEN: pwsh -NoProfile -File Tools\windows\Tests\Packaging.Rollback.Tests.ps1 -> Package transaction ownership and recoverable rollback contracts (23 cases): PASS
REGRESSION: pwsh -NoProfile -File Tools\windows\validate.ps1 -Task packaging -SwiftExecutable C:\Users\coneilen\AppData\Local\Programs\Swift\Toolchains\6.3.3+Asserts\usr\bin\swift.exe -> Packaging executable install/upgrade/uninstall tests: PASS
Additional validation:
zig test src\WindowsRollbackCleanup.zig -target x86_64-windows-msvc -lc -lkernel32with the pinned Winghostty include: 5/5 passedpwsh -NoProfile -File Tools\windows\Tests\WindowsShell.Tests.ps1 -ZigExecutable $env:GRAPHCODE_ZIG0152: 58/58 sections, 1405 passed, 17 skipped, 0 failedNo test ran against the user's installed GraphCode. This PR does not implement #780's other-workspaces preflight and does not close the live evidence gaps in #742, #743, or #744.
Checklist
git commit -s) per the DCOmake test)make check)