Discard updates whose offered version is not newer than the installed… - #5462
Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit intoSep 30, 2026
Merged
Conversation
4 tasks done
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
September 30, 2026 19:06
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Valid zero-valued versions bypass the new comparison and can expose downgrades as updates.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Filters package updates whose offered version is not newer than the installed version.
Changes:
- Adds manager-specific version comparison and logging.
- Adds tests for older, unknown, and unparsable versions.
| File | Description |
|---|---|
UpgradablePackagesLoader.cs |
Rejects non-newer offered versions. |
UpgradablePackagesLoaderTests.cs |
Tests update-version validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
September 30, 2026 19:40
View session
There was a problem hiding this comment.
🤖 Pull request was approved automatically: the AI review is complete and all its review threads are resolved. 🎉
Integration Details
{
"deliveryId": "088d3a50-bd07-11f1-851e-3b41d8ac2285",
"headSha": "eed4cd45024aaf8ef7953457898ad7981b1cede9",
"reviewer": "copilot-pull-request-reviewer[bot]"
}
Gabriel Dufresne (GabrielDuf)
deleted the
fix/5344-backwards-winget-update
branch
September 30, 2026 19:42
4 tasks done
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.

This pull request improves the logic for determining whether a package update should be considered valid, specifically in scenarios where the offered update is not actually newer than the installed version. It also adds comprehensive tests to ensure the new logic behaves as expected, including edge cases involving unparsable or unknown versions.
Update validation logic
IsPackageValidinUpgradablePackagesLoader.csto reject updates where the offered version is not newer than the installed version, logging a message when this occurs. This check usesCompareVersionsand only applies when the new version can be normalized.Test coverage improvements
UpgradablePackagesLoaderTests.csto verify: