fix(mcp): make loopover-mcp CLI failures respect --json - #6104
fix(mcp): make loopover-mcp CLI failures respect --json#6104RealDiligent wants to merge 1 commit into
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Wrap top-level runCli dispatch in try/catch and mirror @loopover/miner's
cli-error contract so --json failures emit { ok: false, error } on stdout
instead of a raw Node stack trace.
Closes JSONbored#5928
Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6104 +/- ##
=======================================
Coverage 95.24% 95.24%
=======================================
Files 595 595
Lines 47035 47046 +11
Branches 15015 15015
=======================================
+ Hits 44797 44808 +11
Misses 1493 1493
Partials 745 745
Flags with carried forward coverage won't be shown. Click here to find out more. |
|
Caution 🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥🟥 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-15 09:48:53 UTC
🛑 Suggested Action - Fix Blockers Review summary Nits — 5 non-blocking
CI checks failing
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
LoopOver is closing this pull request on the maintainer's behalf (CI is failing (validate, validate-code)). This is an automated maintenance action — to pursue this change, please open a new pull request with the issues resolved. Closed PRs may be analyzed later to improve review accuracy, but they are not automatically reopened or re-reviewed. |
Summary
packages/loopover-mcp/lib/cli-error.jsmirroring @loopover/miner's{ ok: false, error }contractrunClidispatch in try/catch so thrown errors never escape as raw Node stack tracesrunExpectingFailureand tests for unknown command, missing--login, and unsupported--agent-profilefailures with--jsonCloses #5928
Test plan
npx vitest run test/unit/mcp-cli-basics.test.ts(21/21 pass)npx vitest run test/unit/mcp-cli-(125/128 pass; 3 symlink rejection tests fail on Windows only — pre-existing)