You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three gaps in the installer download flow, all reported in #5422.
An unpinned bundle entry could not be downloaded at all
ImportedPackage returns the localized "Latest" placeholder from VersionString, and the managers whose installer URL follows the package version fed that straight into their version-keyed lookups. Against the real Chocolatey feed:
No installer URL came back, so the operation reported that no installer exists — the reporter's "download installer sometimes not work", and it is specific to the bundle page because that is the only place a package has no concrete version. BaseNuGetDetailsHelper now resolves the newest installable version before the lookup and threads it through all three paths; Cargo falls back to max_stable_version.
Selection goes through NuGetV3Client.SelectHighestVersion, which parses real SemVer and prefers a stable release, so the download matches what installing the same bundle entry would get. The V2 listing is sorted ordinally, so a digit-collecting comparison would also have picked 9.0 over 10.0.
The downloaded file carried no version for those entries
The version was read off what the UI renders rather than what the manifest supplying the installer URL reports, so a placeholder produced a bare name. IPackageDetails now carries the version the installer URL belongs to, populated by every manager that knows it, and ResolveInstallerVersion prefers it. It is ignored unless it contains a digit, so Unknown and other placeholders fall through to the existing chain instead of suppressing it.
WinGet reads it only from the corrected in-process manifest: the bundled CLI exposes the collapsed manifest document, whose PackageVersion pinget itself treats as unreliable and overwrites from the catalog.
An installer already present was downloaded again
PublishedInstallerHash parses every shape the managers publish and hashes the existing file with the matching algorithm:
Format
Managers
bare hex (MD5 … SHA-512)
WinGet, Pip, Cargo, Scoop
algorithm:hex
Scoop
SRI algorithm-base64
npm, Bun
bare base64
Chocolatey, .NET, PowerShell
A digest whose length contradicts its stated algorithm is refused rather than guessed at. A match skips the download; anything else downloads as before, so a corrupted or stale file is still replaced.
Failures are also no longer silent — the two bundle download entry points reported only to the log, which is what made this look intermittent.
Verification
Each manager's real published hash was checked against the real downloaded artifact (npm's SRI vs express-5.2.1.tgz, Chocolatey's base64 SHA-512 vs 7zip.26.3.0.nupkg, pip's hex vs the requests wheel), and the bundle path was driven end to end against the live NuGet feed:
HasConcreteVersion = False
VersionString = 'Latest'
Download URL found at https://api.nuget.org/v3-flatcontainer/dotnetsay/3.0.3/dotnetsay.3.0.3.nupkg
The file was saved to ...\Dotnetsay_3.0.3.nupkg
VERDICT = Succeeded
SECOND RUN = Succeeded
... matches the Sha512 hash published for this installer, the download was skipped
The same probe on the pre-change code reports VERDICT = Failed — "UniGetUI was not able to find any installer for this package."
Downloads were also run through the app itself headless over the IPC API: first fetch, re-run skipped on the hash, file corrupted by hand and correctly re-downloaded, and Dotnetsay_2.1.7.nupkg once a versioned naming scheme was selected.
3615 tests pass, with 22 added. dotnet format whitespace src --folder --verify-no-changes exits 0, and the translation validation scripts pass.
Deliberately left out
A download's own bytes are still not verified after the transfer; the digest is in hand, but making downloads hard-fail on a hash mismatch is a policy change that deserves its own issue.
Prerelease resolution ignores the manager's PreRelease option, which BaseNuGet honours elsewhere. Not touched here, since the issue does not mention it.
Bun is patched by analogy with npm and could not be run (not installed on the dev machine); if its info --json lacks a root version, naming falls back to previous behaviour rather than producing anything wrong.
For a V3 source, GetInstallableVersions_UnSafe reads the flat-container version list, which includes withdrawn/unlisted versions. Selecting its semantic maximum directly can therefore make an unpinned bundle download an unlisted release rather than the latest installable release. The existing update/search path explicitly filters candidates through SelectNewestNotUnlisted (NuGetV3Client.cs:434-483); this resolution path should use the same listed-aware selection before loading details.
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
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.
Three gaps in the installer download flow, all reported in #5422.
An unpinned bundle entry could not be downloaded at all
ImportedPackagereturns the localized "Latest" placeholder fromVersionString, and the managers whose installer URL follows the package version fed that straight into their version-keyed lookups. Against the real Chocolatey feed:No installer URL came back, so the operation reported that no installer exists — the reporter's "download installer sometimes not work", and it is specific to the bundle page because that is the only place a package has no concrete version.
BaseNuGetDetailsHelpernow resolves the newest installable version before the lookup and threads it through all three paths; Cargo falls back tomax_stable_version.Selection goes through
NuGetV3Client.SelectHighestVersion, which parses real SemVer and prefers a stable release, so the download matches what installing the same bundle entry would get. The V2 listing is sorted ordinally, so a digit-collecting comparison would also have picked9.0over10.0.The downloaded file carried no version for those entries
The version was read off what the UI renders rather than what the manifest supplying the installer URL reports, so a placeholder produced a bare name.
IPackageDetailsnow carries the version the installer URL belongs to, populated by every manager that knows it, andResolveInstallerVersionprefers it. It is ignored unless it contains a digit, soUnknownand other placeholders fall through to the existing chain instead of suppressing it.WinGet reads it only from the corrected in-process manifest: the bundled CLI exposes the collapsed manifest document, whose
PackageVersionpinget itself treats as unreliable and overwrites from the catalog.An installer already present was downloaded again
PublishedInstallerHashparses every shape the managers publish and hashes the existing file with the matching algorithm:algorithm:hexalgorithm-base64A digest whose length contradicts its stated algorithm is refused rather than guessed at. A match skips the download; anything else downloads as before, so a corrupted or stale file is still replaced.
Failures are also no longer silent — the two bundle download entry points reported only to the log, which is what made this look intermittent.
Verification
Each manager's real published hash was checked against the real downloaded artifact (npm's SRI vs
express-5.2.1.tgz, Chocolatey's base64 SHA-512 vs7zip.26.3.0.nupkg, pip's hex vs therequestswheel), and the bundle path was driven end to end against the live NuGet feed:The same probe on the pre-change code reports
VERDICT = Failed— "UniGetUI was not able to find any installer for this package."Downloads were also run through the app itself headless over the IPC API: first fetch, re-run skipped on the hash, file corrupted by hand and correctly re-downloaded, and
Dotnetsay_2.1.7.nupkgonce a versioned naming scheme was selected.3615 tests pass, with 22 added.
dotnet format whitespace src --folder --verify-no-changesexits 0, and the translation validation scripts pass.Deliberately left out
PreReleaseoption, whichBaseNuGethonours elsewhere. Not touched here, since the issue does not mention it.info --jsonlacks a rootversion, naming falls back to previous behaviour rather than producing anything wrong.Closes #5422