fix(cli): parse codex plugin list text output instead of --json#314
Conversation
Codex CLI 0.136.0's `codex plugin list` has no `--json` flag, so the codex plugin host-registration probe in `nemo-relay doctor --plugin codex` (and `--plugin all`) failed with "unexpected argument '--json' found". Parse the `codex plugin list` text table instead, matching the existing `codex_marketplace_registered` text parsing. Claude Code keeps `--json` because its CLI still supports it. Fixes NVIDIA#313 Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (8)**/*.rs📄 CodeRabbit inference engine (.agents/skills/add-binding-feature/SKILL.md)
Files:
**/{Cargo.toml,**/*.rs}📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Files:
**/*.{h,hpp,c,cpp,rs}📄 CodeRabbit inference engine (.agents/skills/maintain-packaging/SKILL.md)
Files:
**/*.{rs,toml}📄 CodeRabbit inference engine (.agents/skills/rename-surfaces/SKILL.md)
Files:
**/*.{rs,py,js,ts,tsx,jsx,go,sh,toml,yaml,yml,md}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{rs,py,go,js,ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
crates/**/*.rs📄 CodeRabbit inference engine (AGENTS.md)
Files:
**⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (2)
WalkthroughCodex plugin registration checks now read ChangesCodex plugin list parsing
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codex no longer parses JSON after the --json removal, so move the parse_json_command_output parse-error assertion out of the codex-focused helper test and into host_registration_report_surfaces_capture_status_and_stderr_variants, keeping the coverage with the host (Claude Code) that still uses --json. Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
Signed-off-by: Zhongxuan Wang <daniewang@nvidia.com>
|
/merge |
Overview
nemo-relay doctor --plugin codex(and--plugin all) fails on Codex CLI 0.136.0 witherror: unexpected argument '--json' found. The codex plugin host-registration probe callscodex plugin list --json, but current Codexplugin listhas no--jsonflag (only-c,-m/--marketplace,--enable,--disable).Details
codex_plugin_registerednow runscodex plugin list(no--json) and parses the text table, mirroring the existingcodex_marketplace_registeredtext parsing. A small helpercodex_plugin_line_installedmatches the row whose first column isnemo-relay-plugin@nemo-relay-localand whose status column starts withinstalled(soinstalled, enabledmatches butnot installeddoes not).--json, since its CLI supports it.plugin_installtests to mock the Codex text output, added not-installed and wrong-marketplace negative cases, and moved the JSON parse-error assertion to the Claude path (Codex no longer has a JSON parse path).Validation (isolated worktree off
main):cargo test -p nemo-relay-cli plugin_install— 34 passedcargo clippy -p nemo-relay-cli --all-targets— cleancargo fmt -- --check— cleanWhere should the reviewer start?
crates/cli/src/plugin_install/host.rs—codex_plugin_registeredand the newcodex_plugin_line_installedhelper.Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)
Summary by CodeRabbit
Bug Fixes
Tests