Take the latest version from the index, and prove a folder is a version - #12
Merged
Merged
Conversation
Microsoft.Office could not be installed at all. manifests/m/Microsoft/Office contains "2010", which is not a release but the Microsoft.Office.2010.* package namespace. Sorting numerically ranked 2010 above 16.0.20228.20124, resolution looked for an installer manifest inside it, and the failure surfaced to the operator as "not found in GitHub OR Custom Catalog" for an application that is published. Paired with a detection service this does not fail once, it loops: detection correctly reports not installed, the install policy fails, and the pair repeats every scan. Observed continuously on STAR-S01003. Two changes. The version now comes from the detection index, which carries winget's own packages.latest_version. That is authoritative rather than inferred, and it removes one of the two API calls per resolve. Where no index entry exists, the directory listing is still used, but a folder is no longer assumed to be a version because it sorts highest. The candidates are walked in order until one actually contains an installer manifest, bounded to five probes because each is an API call. The error now names every candidate tried instead of only the first. The earlier ^\d guard is kept but was never sufficient: it rejects "x86" and "Canary", and cannot reject "2010". Verified against the live repository: Microsoft.Office resolves to 16.0.20228.20124, Discord.Discord to 1.0.9258, Google.Chrome to 153.0.8010.53, Valve.Steam to 2.10.91.91 and Git.Git to 2.55.0.3.
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.
Microsoft.Officecould not be installed at all.manifests/m/Microsoft/Officecontains2010— not a release, but theMicrosoft.Office.2010.*package namespace. Numeric sorting ranked2010above16.0.20228.20124, so resolution looked for an installer manifest inside it and failed.Paired with a detection service this does not fail once, it loops: detection correctly reports not installed, install fails, the pair repeats every scan. Observed continuously on a production endpoint:
Changes
The version comes from the index. It already carries winget's own
packages.latest_version— authoritative rather than inferred, and it removes one of the two API calls per resolve.A folder is only a version if it contains an installer manifest. Where there is no index entry the directory listing is still used, but candidates are walked in order until one proves out, bounded to five probes since each is an API call. The error now names every candidate tried rather than only the first.
The earlier
^\dguard stays but was never sufficient — it rejectsx86andCanary, and cannot reject2010.Verification
Against the live repository: