Repository navigation
Fix cli help and pip budget - #5485
Merged
Gabriel Dufresne (GabrielDuf) merged 3 commits intoOct 7, 2026
Merged
Gabriel Dufresne (GabrielDuf) merged 3 commits into
Gabriel Dufresne (GabrielDuf) merged 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Duplicate help-alias definitions undermine centralized detection and can reintroduce settings side effects when aliases evolve.
1 open finding
What changed in this PR
Refines global CLI help routing and fixes Pip’s cancellation-safe concurrency handling.
Changes:
- Routes
--helpand-hthrough centralized CLI parsing. - Prevents settings commands from consuming help flags.
- Avoids releasing unacquired Pip semaphore permits and adds regression tests.
| File | Description |
|---|---|
src/UniGetUI.Tests/IpcCliSyntaxTests.cs |
Tests global help recognition and routing. |
src/UniGetUI.Tests/CLIHandlerTests.cs |
Tests help precedence over settings commands. |
src/UniGetUI.PackageEngine.Tests/PipManagerTests.cs |
Tests canceled version-resolution budgets. |
src/UniGetUI.PackageEngine.Managers.Pip/Pip.cs |
Tracks semaphore acquisition before release. |
src/UniGetUI.Interface.IpcApi/IpcCliSyntax.cs |
Adds reusable help-request detection. |
src/UniGetUI.Avalonia/Infrastructure/AvaloniaAppHost.cs |
Handles help according to console availability. |
src/Shared/SharedPreUiCommandDispatcher.cs |
Defers help processing to the CLI layer. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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": "92014e30-c274-11f1-84f6-d99dc2912cdf",
"headSha": "4d6d1b7f6bc7e7b326cef6fe8a5b191e3a447ac6",
"reviewer": "copilot-pull-request-reviewer[bot]"
}
Gabriel Dufresne (GabrielDuf)
deleted the
fix/release-sweep-cli-help-and-pip-budget
branch
October 7, 2026 17:55
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 refines how command-line help flags are handled and improves test coverage for CLI argument parsing and package version resolution. The main changes include centralizing help flag detection, ensuring help requests are routed to the correct handler, and adding tests to verify this behavior. Additionally, it exposes and tests internals of the Pip package manager for robustness.
Command-line help handling improvements:
IsHelpRequestmethod inIpcCliSyntax, replacing scattered logic and supporting both--helpand-h(case-insensitive) globally.HelpArgumentsis now an array for easier extension (src/Shared/SharedPreUiCommandDispatcher.cs,src/UniGetUI.Interface.IpcApi/IpcCliSyntax.cs). [1] [2] [3]src/UniGetUI.Avalonia/Infrastructure/AvaloniaAppHost.cs). [1] [2] [3] [4]Testing enhancements:
--help) (src/UniGetUI.Tests/CLIHandlerTests.cs,src/UniGetUI.Tests/IpcCliSyntaxTests.cs). [1] [2]Pip package manager improvements:
VersionResolutionandResolveLatestVersionAsyncinternal for better testability and added tests to ensure version resolution fails gracefully when the cancellation token is already cancelled, and remains robust under repeated failures (src/UniGetUI.PackageEngine.Managers.Pip/Pip.cs,src/UniGetUI.PackageEngine.Tests/PipManagerTests.cs). [1] [2] [3] [4]These changes improve maintainability, user experience, and reliability of command-line operations and package management.