Skip to content

Revert hardlinks for portables and include moderate repair (1.30) - #6723

Open
JohnMcPMS wants to merge 9 commits into
microsoft:release-v1.30from
JohnMcPMS:release-1.30-revert-6308
Open

JohnMcPMS wants to merge 9 commits into
microsoft:release-v1.30from
JohnMcPMS:release-1.30-revert-6308

Conversation

@JohnMcPMS

@JohnMcPMS JohnMcPMS commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

📖 Description

Fixes for the hardlink functionality were running in circles due to issues pre-existing in the portable installation code along with the impacts of new issues introduced. As an alternative, this PR backs out the hardlink change and adds moderate repair functionality with an attempt at keeping the changes minimized for 1.30 release. In turn, that frees up the mainline change to make much larger changes to portables so that we can stop piling bandaids onto the fundamental issues.

🔗 References

#6308

Microsoft Reviewers: Open in CodeFlow

JohnMcPMS and others added 6 commits November 25, 2026 12:01
…30-revert-6308

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2f49898e-04cf-4e5a-b6bf-b5519ed4dfe3
@JohnMcPMS
JohnMcPMS requested a review from a team as a code owner December 2, 2026 00:43
@JohnMcPMS
JohnMcPMS requested a balanced review from Copilot December 2, 2026 00:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Active findings show that empty-registration recovery can delete an unrelated portable index or abort after registration writes, and multi-executable installs can silently leave executables inaccessible.

2 open issues
What changed in this PR

Reverts portable hardlink aliases from #6308 for WinGet 1.30 while retaining preview cleanup compatibility and adding targeted recovery safeguards.

Changes:

  • Restores earlier portable alias behavior and preserves PATH entries with uncertain ownership.
  • Adds empty-registration recovery, safer cleanup, and regression tests.
  • Updates release notes and enables PR validation for release branches.
File Description
src/​AppInstallerSharedLib/​Public/​winget/​Filesystem.h Removes hardlink helper declaration.
src/​AppInstallerSharedLib/​Filesystem.cpp Removes hardlink helper implementation.
src/​AppInstallerCommonCore/​Public/​winget/​PortableFileEntry.h Retains preview alias read compatibility.
src/​AppInstallerCommonCore/​Public/​winget/​PortableARPEntry.h Declares lazy registration and recovery support.
src/​AppInstallerCommonCore/​Public/​winget/​PathVariable.h Documents whole-entry PATH removal.
src/​AppInstallerCommonCore/​PortableARPEntry.cpp Implements lazy registration and recovery checks.
src/​AppInstallerCommonCore/​PathVariable.cpp Removes complete PATH entries safely.
src/​AppInstallerCLITests/​UpdateFlow.cpp Isolates portable upgrade fallback tests.
src/​AppInstallerCLITests/​TestHooks.h Adds isolated registry and PATH hooks.
src/​AppInstallerCLITests/​PortableInstaller.cpp Tests preview cleanup and registration recovery.
src/​AppInstallerCLITests/​PathVariable.cpp Tests precise PATH removal.
src/​AppInstallerCLITests/​InstallFlow.cpp Tests recovery, rollback, and alias behavior.
src/​AppInstallerCLIPackage/​Shared/​Strings/​en-us/​winget.resw Adds manual PATH-review guidance.
src/​AppInstallerCLIE2ETests/​UpgradeCommand.cs Removes reverted transition tests and cleanup.
src/​AppInstallerCLIE2ETests/​UninstallCommand.cs Removes hardlink-era tests and cleanup.
src/​AppInstallerCLIE2ETests/​TestData/​Manifests/​TestZipInstaller_Portable_SymlinkToPathFallback.yaml Deletes transition fixture.
src/​AppInstallerCLIE2ETests/​TestData/​Manifests/​TestZipInstaller_Portable_SymlinkToPathFallback.2.0.0.0.yaml Deletes transition upgrade fixture.
src/​AppInstallerCLIE2ETests/​TestData/​Manifests/​TestZipInstaller_Portable_PathFallbackToSymlink.yaml Deletes reverse-transition fixture.
src/​AppInstallerCLIE2ETests/​TestData/​Manifests/​TestZipInstaller_Portable_PathFallbackToSymlink.2.0.0.0.yaml Deletes reverse-transition upgrade fixture.
src/​AppInstallerCLIE2ETests/​InstallCommand.cs Removes hardlink installation tests and cleanup.
src/​AppInstallerCLIE2ETests/​Helpers/​TestCommon.cs Removes unused PATH helper.
src/​AppInstallerCLICore/​Workflows/​PortableFlow.cpp Restores alias planning and guards rollback.
src/​AppInstallerCLICore/​Resources.h Registers PATH-review message.
src/​AppInstallerCLICore/​PortableInstaller.h Tracks registration writes and recovery.
src/​AppInstallerCLICore/​PortableInstaller.cpp Revises publication, preview cleanup, and PATH handling.
doc/​ReleaseNotes.md Documents rollback and recovery safeguards.
azure-pipelines.yml Enables release-branch PR validation.
.github/​actions/​spelling/​allow.txt Removes hardlink-era spelling exceptions.

Review effort: Balanced

@github-actions

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Windows runtime checks were unavailable for persisted preview-alias migration and destructive cleanup, leaving packaged-process symlink redirection, locked-file retries, and registry/PATH effects unverified.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants