fix(cli): report missing version metadata and escape pip output - #17
Open
Coding-Dev-Tools wants to merge 1 commit into
Open
Coding-Dev-Tools wants to merge 1 commit into
Coding-Dev-Tools wants to merge 1 commit into
Conversation
A tool whose pip metadata lacked a Version line printed nothing at all, so it looked silently fine. Extract a _pip_version helper that distinguishes not installed from broken metadata, and escape exception and stderr text so bracket-bearing pip output can no longer raise inside rich markup. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Coding-Dev-Tools
commented
Oct 3, 2026
Coding-Dev-Tools
left a comment
Owner
Author
There was a problem hiding this comment.
Governance & Code Quality Review: VERIFIED & ENDORSED
Summary of Changes:
- Pip output rich markup escaping: Escaped stderr and exception messages using
rich.markup.escape, preventing brackets such as[WinError 2]from triggeringMarkupErrorin Rich console logging. - Robust version inspection helper: Introduced
_pip_versionhelper that distinguishes uninstalled packages (None) from packages with missing/broken metadata (""), reporting "installed, no version metadata" clearly instead of failing silently. - Encoding robustness: Added
errors="replace"to decode pip output safely even when package metadata contains non-ASCII characters. - Comprehensive test coverage: Added unit tests covering pip version parsing, missing metadata reporting, rich markup error handling, and non-ASCII metadata handling.
Validation & Gates:
- All 6 CI checks green (audit, lint, test across Python 3.10, 3.11, 3.12, 3.13).
- Code quality, tests, and formatting verified clean and ready for merge.
This branch has not been deployed
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