Repository navigation
Fix 100 correctness defects in Rust and C# (waves 13–22) - #73
Merged
Marc-André Moreau (mamoreau-devolutions) merged 21 commits intoNov 15, 2026
Merged
Marc-André Moreau (mamoreau-devolutions) merged 21 commits into
Marc-André Moreau (mamoreau-devolutions) merged 21 commits into
Conversation
- W14-1 (both): `winget source export` with no sources prints "There are no sources configured." instead of JSON; it is now an empty list, not a parse error. - W14-2 (C#): MergeSourceCacheMetadata used ToDictionary on Identifier and threw ArgumentException when two exported sources share an identifier (e.g. a mirror of the winget CDN). - W14-3 (both): mirror refresh carried ETag/Last-Modified/SourceVersion/LastUpdate onto a source re-added at a different Arg; metadata now requires identifier and argument to match. - W14-4 (both): an unreadable system-sources.json mirror failed every open (Auto silently fell back to private) and blocked its own refresh; it is now treated as absent and re-exported. - W14-5 (both): direct-mode `source update <identifier>` passed the identifier to `winget source update --name`; the resolved source name is passed instead. - W14-6 (C#): a pre-indexed update whose candidates all returned non-success HTTP statuses failed with an empty reason; each candidate's HTTP status is now reported. - W14-7 (Rust): a source2.msix that could not be read or lacked Public/index.db aborted the update instead of falling back to source.msix like C#. - W14-8 (both): a V1 index whose pathparts parent chain loops made relative-path resolution spin forever; a cycle is now an error. - W14-9 (both): packaged user_sources omitted the `Identifier` key, which is the only key WinGet's SourceList reads the identifier from. - W14-10 (both): packaged sources were not ordered like WinGet (stable sort by descending Priority): Rust ignored Priority, C# sorted explicit sources last and alphabetized by name. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-iteration-6815a3
- Interactive ARP uninstall now falls back to QuietUninstallString when UninstallString is missing (WinGet GetUninstallInfo) instead of failing. - Blank QuietUninstallString/UninstallString values are ignored instead of running an empty cmd.exe command that exits 0 and reports a false success. - Direct MSI execution accepts property names WinGet accepts (e.g. MY.PROP, %VAR) instead of failing the silent install. - The requested mode's switch now comes from the manifest, then the installer type default, before the other mode's manifest switch (an MSI with only SilentWithProgress is fully quiet under --silent). - Delegated `winget uninstall` passes --interactive for interactive requests (Rust only; C# has no delegation). - --uninstall-previous only applies to an update, like WinGet; a same-version reinstall no longer uninstalls first. - The Upgrade switch is no longer appended after the previous version was uninstalled (WinGet clears InstallerExecutionUseUpdate). - The downloaded installer is removed after a successful install (WinGet RemoveInstaller) instead of piling up in %TEMP%\pinget-install. - The InstallLocation switch is only added when --location is supplied, even when the manifest switch has no <INSTALLPATH> token. - Uninstalling an MSIX package never matches (and runs the uninstaller of) a same-named ARP entry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-iteration-6815a3 # Conflicts: # rust/crates/pinget-core/src/lib.rs
1. Version: `Latest` sorted below numeric versions; it now sorts above every version like WinGet (Rust+C#). 2. Version: `> 1.0` compared equal to `1.0`; approximate `<`/`>` now order just below/above their base (Rust+C#). 3. Search: pre-indexed search applied only the first of query/--id/--name/--moniker/--tag/--command; all are now ANDed (Rust+C#). 4. Search: many-search --tag/--command used Exact instead of the request's Substring match type (pre-indexed and REST, Rust+C#). 5. Selection: --installer-type ignored a zip installer's NestedInstallerType (and appx/msix aliasing) (Rust+C#). 6. Selection: no default installer type preference (msstore > msix > msi > wix > burn > nullsoft > inno > exe > portable) (Rust+C#). 7. Selection: neutral ranked above x86 on x64 and above emulated x64/x86 on arm64; neutral is now last (Rust+C#). 8. Search: a REST single lookup with a positional query dropped the --id/--name/--moniker/--tag/--command filters (Rust+C#). 9. Selection: scope preference (requested, else WinGet's default user) never ranked installers; ranking now follows WinGet's strong/weak comparator order (locale, scope, architecture, type) (Rust+C#). 10. Search: REST results were marked truncated when exactly MaximumResults came back, and a ContinuationToken was ignored (Rust+C#). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-iteration-6815a3 # Conflicts: # rust/crates/pinget-core/src/lib.rs
…efects - Name normalization: the SAP Business Objects short-circuit returned the name un-folded, so it never matched the lowercase catalog value. - Name normalization: no Unicode NFKC step like WinGet's PrepareForValidation (™, full-width letters, ligatures normalized differently). - Name normalization: lowercase instead of ICU full case folding (ß/ẞ -> ss, ς -> σ), so such names/publishers never correlated. - Name normalization: the @@ cut-off took the first @@ at any position (and in Rust a UTF-8 byte offset) instead of find(L"@@", 3). - Normalized correlation: never tried the architecture-qualified name (foo(X64)) first, so "Foo (x64)" vs "Foo (x86)" packages stayed ambiguous. - installed.db correlation: queried every identity table even when only one pair exists (pre-1.6 schema), failing list with "no such table". - list <query>: did not match PackageFamilyName/ProductCode/UpgradeCode exactly like WinGet's query search. - list --name: ignored the correlated catalog name, unlike --id and WinGet's installed search. - MSIX enumeration: packages without a display name were dropped instead of listed under the package name. - ARP enumeration: entries with ParentKeyName were skipped although WinGet's ARPHelper only skips SystemComponent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-iteration-6815a3 # Conflicts: # rust/crates/pinget-core/src/lib.rs
1. REST manifestSearch ignored ContinuationToken and returned only the first page; now resends with the ContinuationToken header until done or enough results, and fails on a repeated token (Rust+C#).
2. Single-package search sent PackageIdentifier/PackageName/Moniker inclusions even when /information lists them as unsupported; unsupported inclusions are now dropped, and a search with none left returns no results without a request (Rust+C#).
3. Filters on fields listed in UnsupportedPackageMatchFields were sent (and could be ignored, returning unfiltered results), and missing non-Market RequiredPackageMatchFields were not reported; both now fail the search like WinGet (Rust+C#).
4. An empty manifestSearch response carrying RequiredPackageMatchFields/UnsupportedPackageMatchFields was reported as "no packages found"; it is now an unsupported-request error (Rust+C#).
5. A null (or non-string-item) optional array in /information made the whole REST source fail to load; arrays are now read leniently like WinGet's GetRawStringArrayFromJsonNode (Rust+C#).
6. REST search results kept surrounding whitespace in PackageIdentifier/PackageVersion; both are now trimmed like WinGet (Rust+C#).
7. A REST manifest whose PackageVersion had surrounding whitespace did not match the requested version and failed; versions are trimmed before matching (Rust+C#).
8. An empty installer switch string ("Silent": "") overrode the version-level default and the Silent/SilentWithProgress fallback; empty switches are now treated as absent (Rust+C#).
9. /information responses marked Cache-Control no-store/no-cache were cached anyway, and Rust ignored "Max-Age" written in other casing or with spaces; such responses are no longer cached and directives parse case-insensitively (Rust+C#).
10. A C# REST search result with no versions (or a version entry without PackageVersion) became a match with version "?"; it is now invalid data, as in Rust and WinGet (C#).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Resolve overlap with wave 16: keep the ContinuationToken paging loop from wave 15 and wave 16's truncation rule (more than MaximumResults, or a non-blank token), now computed from the last continuation token. Single lookups keep wave 16's flow, so their filters reach validation. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- R22-1 (Rust COM): AddSource/RemoveSource/ResetSource/ListSourcesJson/GetDefaultAppRoot never set or cleared the last error, so failures surfaced as bare E_FAIL or a stale message; they now go through the shared helpers (E_INVALIDARG kept for bad arguments). - R22-2 (Rust COM): ResetSource(name, all) reset every source when a name was also given; a named reset now only resets that source, like Reset-WinGetSource and the managed client. - R22-3 (C#, net + net48): a piped PSCatalogPackage added its display name and moniker as exact filters, so Find-PingetPackage | Uninstall/Update/Repair-PingetPackage missed packages whose ARP name differs; piped packages are targeted by id and source only. - R22-4 (C#, net + net48): Uninstall/Repair of a piped found package pinned the catalog's latest version as the installed-version filter; only an installed package contributes its version. - R22-5 (C#, net + net48): Install/Update/Export-PingetPackage never accepted package agreements (WinGet's InstallOptions/DownloadOptions default to true) and failed with a CLI-only hint; requests now accept them. - R22-6 (C#, net): Get-PingetPackage on PowerShell 7 dropped PackageFamilyNames/ProductCodes that the Windows PowerShell path returns; the mapping now carries them. - R22-7 (C#): CompareToVersion used System.Version/lexical ordering (1.0 < 1.0.0, 2.0.1.0.5 > 2.0.1.0.10, 1.0.0-beta > 1.0.0); it now follows WinGet version semantics. - R22-8 (C#, net + net48): -MatchOption Equals was case-insensitive and StartsWithCaseInsensitive matched substrings for Find/Get-PingetPackage; the results are now filtered accordingly. - R22-9 (C#, net + net48): found packages dropped the catalog channel, so GetPackageVersionInfo(v).Channel was always empty. - R22-10 (scripts): RunTests.ps1 staged the module with -NoBuild, which failed with "Native COM DLL not found" under PowerShell 7 (which never loads it), left a half-staged dist that later runs reused, and never restaged stale dist; it now always restages and skips the Windows PowerShell half on Core, and Build-PowerShellModule resolves native DLLs before staging. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1. Tables (both): column widths counted chars/UTF-16 units, so CJK/fullwidth names misaligned; measure East Asian Wide/Fullwidth as 2 columns like WinGet UTF8ColumnWidth.
2. Truncation (both): truncated table/search cells ended in '.', indistinguishable from a dotted package id; use WinGet's '…' and pad a wide char that no longer fits.
3. export (both): packages were neither sorted by id nor de-duplicated, so side-by-side installs exported twice; sort by id and collapse duplicates without --include-versions (SelectVersionsToExport).
4. import (both): schema 1.0 files ("Id" instead of "PackageIdentifier") were rejected (C#) or imported as "?" (Rust); read "Id" as a fallback.
5. Rust install/uninstall/repair: a failed action whose installer reported exit code 0 exited the process with 0; exit 1 instead (as the C# CLI does).
6. list (both): --include-unknown/--include-pinned were accepted without --upgrade-available; reject them like WinGet's ValidateArgumentDependency.
7. WinGet exclusive sets (both): uninstall --purge|--preserve and --all-versions|--version, pin add --version|--blocking, install --skip-dependencies|--dependencies-only were accepted; reject them (Rust also gains --dependencies-only and uninstall --all).
8. C# CLI: RootCommand.Parse().Invoke() had no middleware, so unknown options, bad --output values, --count bounds and missing required options were ignored and the handler ran (exit 0), and --help printed nothing; report parse errors (exit 1) and serve --help/-?.
9. hash (both): output was labelled "SHA256:" instead of WinGet's "InstallerSha256:", and --file/-f and -m (--msix) were rejected.
10. import/export (both): the file could only be named (-i/-o); accept it positionally too, as WinGet does.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-iteration-6815a3
…-iteration-6815a3
- Archive portable with no NestedInstallerFiles installed silently with no command; now rejected like WinGet. - Non-portable nested archive naming several NestedInstallerFiles ran only the first; now rejected like WinGet. - Superscript device names (COM¹²³/LPT¹²³) were accepted in portable relative paths; now reserved like MakeSuitablePathPart. - Portable ARP entry wrote PortableTargetFullPath/PortableSymlinkFullPath and no SHA256; now writes WinGet's TargetFullPath/SymlinkFullPath/SHA256 so WinGet can remove pinget installs. - Portable ARP read ignored WinGet's TargetFullPath/SymlinkFullPath, so uninstalling a WinGet-installed portable left its binary; both names now read. - Uninstall left the install directory in PATH when InstallDirectoryAddedToPath=1, and pinget set that flag for the Links dir; PATH entry now removed and flag keeps WinGet meaning. - ARP DisplayName/DisplayVersion/Publisher ignored the installer's AppsAndFeaturesEntries and HelpLink was missing; now set like SetAppsAndFeaturesMetadata. - --manifest portable installs were recorded under the community source; now *DefaultSource with a MakeSuitablePathPart-style product code. - A failed fresh portable install (e.g. corrupt archive) left a partial payload; now rolled back. - Uninstalling a portable whose install directory was already deleted (or unknown) failed without --force; now unregisters like WinGet. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1. Agreement/AgreementLabel were not string-typed, so `Agreement: 0x10` became 16 and `AgreementLabel: 1.10` became 1.1 in the merged manifest (Rust + C#). 2. Rust skipped empty leading YAML documents, publishing a manifest after `---\n---` that WinGet (first document only) and the .NET publisher reject (Rust). 3. Root `Commands` were indexed even when every installer declared its own; WinGet only inherits them into installers without Commands (Rust + C#). 4. ARP DisplayNames lacked WinGet's architecture variant in norm_names2 (e.g. `contosoapp(X64)`), so arch-aware correlation found nothing (Rust + C#). 5. .NET accepted non-sequence values for string-list fields (`Tags: foo`, mappings, nested lists) and published manifests WinGet cannot parse; Rust rejects them (C#). 6. An explicit relative `--psign-tool` was checked relative to the current directory but executed through a PATH search (Rust). 7. `repository build` failed forever once the latest snapshot directory was removed, instead of rebuilding it for unchanged input (Rust). 8. Tags, Commands and ARP ProductCode/UpgradeCode/DisplayVersion were indexed untrimmed, unlike WinGet's populator, breaking exact search and correlation (Rust + C#). 9. packages.name/moniker were stored untrimmed and an empty Moniker as '' instead of NULL (Rust + C#). 10. .NET accepted PackageLocale values longer than 35 characters that the Rust publisher rejects (C#). Co-Authored-By: Claude Opus 5.5 <[email protected]>
- W18-1 (both): an installer key with a null value erased the root default; null keys are now ignored like WinGet's populator. - W18-2 (both): root ProductCode/AppsAndFeaturesEntries flowed into every installer; now only into ARP-writing effective types (exe/inno/msi/nullsoft/wix/burn/portable). - W18-3 (both): root PackageFamilyName flowed into every installer; now only into msix/appx/msstore (or AFE naming an msix type). - W18-4 (both): root NestedInstallerType/NestedInstallerFiles flowed into non-archive installers; now only into zip installers. - W18-5 (C#): legacy unframed MSZYML decompression was unbounded; now capped at 64 MiB like the framed path and Rust. - W18-6 (both): an empty Description did not fall back to ShortDescription (YAML and REST manifests). - W18-7 (both): splitting a merged manifest dropped its Localization list from show -o json|yaml and download manifests. - W18-8 (both): dependency lists were not trimmed or de-duplicated per kind like WinGet DependencyList::Add (highest MinimumVersion kept). - W18-9 (Rust): boolean-looking scalars lost their source text (PackageName: True became "true"), diverging from C# and WinGet. - W18-10 (Rust): an empty YAML document (stray ---) made a singleton look multi-file and wiped the structured document. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-iteration-6815a3
…-iteration-6815a3 # Conflicts: # rust/crates/pinget-core/src/lib.rs
…-iteration-6815a3 # Conflicts: # rust/crates/pinget-core/src/lib.rs
The temp-dir and unique-name helpers are used only by Windows-only tests, so clippy -D warnings failed on Linux with dead-code errors. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Marc-André Moreau (mamoreau-devolutions)
merged commit Nov 15, 2026
9a4cdd6
into
master
14 checks passed
Marc-André Moreau (mamoreau-devolutions)
deleted the
claude/bug-fixes-iteration-6815a3
branch
November 15, 2026 20:00
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
This PR fixes 100 defects in 10 waves of 10 (waves 13–22). It follows the 12 waves in #68. Each fix covers both Rust (
rust/) and C# (dotnet/) wherever the feature exists in both, so the two implementations stay aligned.winget-clisources. Findings were dropped when WinGet behaves the same way.wave{N}_tests.rs,wave20_cli_tests.rs,wave22_com_tests.rsandWave{N}DefectTests.cs. Each wave can be reviewed on its own, and every defect test was checked to fail before its fix.git log --first-parentlists the waves.QuietUninstallStringA blank uninstall string is no longer reported as success
Per-mode switch merging now matches WinGet
--uninstall-previousapplies only to updatesDownloaded installers are deleted after a successful install
An MSIX uninstall can no longer run a same-named ARP uninstaller
winget source exportno longer breaks loadingThe mirror cache keys on identifier + URL and repairs itself when corrupt
source update <identifier>passes the source name to wingetA looping V1
pathpartschain no longer hangsPackaged sources write
Identifierand sort by PriorityContinuationTokenpagingUnsupported inclusions are dropped and unsupported filters fail the search
Null arrays in
/informationare toleratedIds and versions are trimmed
Empty switches are ignored
no-store/no-cacheresponses are not cachedLatestand> xversions sort correctlyPre-indexed filters are combined with AND
Tag and command filters use the request's match type
WinGet's
IsFirstBetterinstaller ranking (locale, scope, architecture, type)Neutral architecture ranks last
REST truncation flag fixed
ß→ss), SAP lowercase,@@cut-off positionArchitecture-qualified normalized names are looked up first
An older
installed.dbno longer breakslistlistmatches PackageFamilyName, ProductCode, UpgradeCode and the catalog nameARP entries with
ParentKeyNameare listedRoot
ProductCode,PackageFamilyNameandNested*are inherited only by matching installer typesDependencies are trimmed and de-duplicated
Localizationis preservedThe C# legacy MSZIP path has a size limit
TargetFullPath,SymlinkFullPath,SHA256); the old pinget names are still readInstallDirectoryAddedToPathis removed from PATH on uninstallA failed install is rolled back
COM¹–LPT³device names are rejectedArchives with no or several nested installers are rejected
--helpCJK and other wide characters are measured in display columns, and truncation uses
…exportsorts and de-duplicatesimportreads schema 1.0IdWinGet's exclusive and dependent argument rules are enforced
hashprintsInstallerSha256:Positional import/export file
AgreementandAgreementLabelare kept as stringsPer-installer
Commandsfollow WinGet's rulenorm_names2includes the architecture variantIndex terms, names and monikers are trimmed
A relative
--psign-toolpath resolves correctlyA build recovers when a snapshot was removed
C# PackageLocale length limit
A named
ResetSourceno longer resets every sourcePiped packages are targeted by id and source
-MatchOptionis honouredWinGet version comparison
Channel and identity properties are carried through
RunTests.ps1runs againReviewer notes: behaviour changes
Install-,Update-andExport-PingetPackagenow accept package agreements automatically, as WinGet's cmdlets do.--tagand--commandare now substring matches unless--exactis given (WinGet'sSearchSourceApplyFilters). This reverses one assertion that wave 9 kept, inwave9_tests.rsandWave9DefectTests.cs.ParentKeyName:listnow shows these entries. WinGet'sARPHelperonly skipsSystemComponententries.RemoveInstaller), and kept when the install fails.ContinuationTokenpaging loop and wave 16's truncation rule: more thanMaximumResultsresults, or a non-blank token.Validation
cargo +nightly fmtandcargo clippy --workspace --tests -- -D warnings: clean.cargo test --workspace: all passed (core 471, cli 81 + 2, com 7, publisher 64 + 26 conformance).dotnet build dotnet/Devolutions.Pinget.slnx -c Release: 0 errors.dotnet format --verify-no-changes: no changes.IOException("file is being used by another process") inPublish_And_VerifyDestination_RejectSignedMsixInUnsignedDevelopmentMode; that test and the code it covers are unchanged.dotnet/tests/RunTests.ps1under PowerShell 7: 13/13 passed. On the dev machine, Pester reported the container as failed because deleting its temp folder was denied (sandbox restriction).🤖 Generated with Claude Code