Fix duplicate results from Get-Command fuzzy matching - #28042
Open
Dongbo Wang (daxian-dbw) wants to merge 1 commit into
Open
Dongbo Wang (daxian-dbw) wants to merge 1 commit into
Dongbo Wang (daxian-dbw) wants to merge 1 commit into
Conversation
Filter fuzzy module candidates before adding them to the scored output collection, and cover duplicate module discovery with a focused regression test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Dongbo Wang (daxian-dbw)
September 21, 2026 21:09
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
All reviewed changes are covered by the supplied validation and have no unresolved blocking issues.
Review effort: Lite
Findings: None
What changed in this PR
Fixes duplicate results from fuzzy Get-Command matching while preserving candidate scores.
Changes:
- Filters duplicate fuzzy candidates using existing checks.
- Adds cross-platform regression coverage.
| File | Description |
|---|---|
test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Command.Tests.ps1 |
Adds duplicate-result regression coverage. |
src/System.Management.Automation/engine/GetCommandCommand.cs |
Filters fuzzy candidates and retains scores. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Ryan Yates (kilasuit)
approved these changes
Sep 22, 2026
Ryan Yates (kilasuit)
left a comment
Collaborator
There was a problem hiding this comment.
LGTM - tested a local build of this branch too and all good there
Contributor
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
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
Fixes #26593
Note: It's much easier to review the PR by ignoring the whitespace changes: https://github.com/PowerShell/PowerShell/pull/28042/changes?w=1
Get-Commandduplicate and parameter checks before adding them to scored output