Repository navigation
Conversation
splitCommandLine dropped a quoted empty token, so a command string of "" node ran node. Keep that token, matching config command strings, and reject an empty executable instead of promoting the next argument. An unquoted Program Files path still splits the same way. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
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. |
|
Codex review: needs maintainer review before merge. What this changesPreserve quoted empty arguments in ad-hoc stdio command strings and reject an empty executable. Example: Run mcporter list --stdio '"" node'.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a distinct argument-parsing bug still present on main, with a focused patch and recorded CLI proof; no actionable defects were found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe CLI tokenizes ad-hoc command strings into executable and argument arrays used by runtime server definitions and generated CLIs. flowchart TD
A[CLI command string] --> B[Shared command splitter]
B --> C[Ad-hoc server resolver]
B --> D[Generated CLI command parser]
C --> E[Executable and argument array]
D --> E
E --> F[Stdio transport]
Technical reviewBest possible solution: Land the focused splitter repair and executable validation while retaining explicit quoting and existing argument-array formats. Do we have a high-confidence way to reproduce the issue? Current-main source directly establishes that '"" node' becomes ['node'] and that middle empty arguments disappear; the contributor also supplies before output and after-fix CLI traces. Is this the best way to solve the issue? The patch repairs token presence in the existing shared splitter and validates its executable consumers without changing quoting rules or adding another parsing path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 21624e8cc823. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 5, 2026, 6:31 PM ET / 23:31 UTC. |
What Problem This Solves
splitCommandLinedrops a quoted empty argument.mcporter list --stdio '"" node'therefore launchesnodewith no arguments. The same string in a configcommandfield is already rejected:parseCommandStringkeeps the empty token, and an empty executable is not promoted.--stdioandgenerate-cli --commandnow follow that rule.A quoted empty argument between other tokens is kept. An unquoted
C:\Program Files\...path still splits the same way. That path behavior was rejected in #385 and is unchanged here. Config command strings were already fixed in #484 (the change proposed in #486). This pull covers the separate--stdioandgenerate-cli --commandsplitter.Evidence
Before this patch, importing
splitCommandLineandresolveEphemeralServerfromsrc/cli/adhoc-server.tson main (21624e8) printed:"" nodebecame executablenode.node --label "" afterlost the empty argument.After this patch, the CLI rejects the empty executable and does not start a server. macOS, Node v26.12.1, pnpm 10.34.6,
pnpm exec tsx src/cli.tsfromb26deb8:Both commands exit 1. The same parser keeps the empty argument and leaves the unquoted Program Files split unchanged:
Real behavior proof
--stdioandgenerate-cli --commandwas discarded, so"" noderannode.pnpm exec tsx src/cli.tsfrom this branch.pnpm exec tsx src/cli.ts list --stdio '"" node'andpnpm exec tsx src/cli.ts generate-cli --command '"" node'.--stdio requires a non-empty command.and--command requires a non-empty value.No server process is started. A middle empty argument stays in the parsed argv:["node","--label","","after"].