Skip to content

fix(cli): report missing version metadata and escape pip output - #17

Merged
Coding-Dev-Tools merged 1 commit into
mainfrom
cleanup/cli-20260925
Oct 3, 2026
Merged

Coding-Dev-Tools merged 1 commit into
mainfrom
cleanup/cli-20260925

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Summary

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>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-26T00:09:51.875746Z b1d4021 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

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 Coding-Dev-Tools left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 triggering MarkupError in Rich console logging.
  • Robust version inspection helper: Introduced _pip_version helper 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.

@Coding-Dev-Tools
Coding-Dev-Tools merged commit 30aab53 into main Oct 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant