fix(mcp): derive the remote request-level ok from the tool result, not HTTP status - #10231
Conversation
…t HTTP status enableJsonResponse means a refused tools/call is still HTTP 200, so the legacy mcp_tool_call event and the product-usage outcome -- both keyed off response.status -- reported every refusal as a success even though the dispatch chokepoint's own usage_event already recorded it as a failure. handleMcpRequest now reads the JSON-RPC body the same way it already reads the request, falling back to the status on any parse failure, and only for tools/call so every other request keeps its current behavior.
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-31 13:34:30 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
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://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Decision record
🟩 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.
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10231 +/- ##
==========================================
+ Coverage 80.47% 80.87% +0.39%
==========================================
Files 282 284 +2
Lines 58856 60240 +1384
Branches 6978 7302 +324
==========================================
+ Hits 47366 48719 +1353
- Misses 11199 11207 +8
- Partials 291 314 +23
Flags with carried forward coverage won't be shown. Click here to find out more.
|
fix(mcp): derive the remote request-level ok from the tool result, not HTTP status
enableJsonResponse means a refused tools/call is still HTTP 200, so the legacy
mcp_tool_call event and the product-usage outcome -- both keyed off
response.status -- reported every refusal as a success even though the
dispatch chokepoint's own usage_event already recorded it as a failure.
handleMcpRequest now reads the JSON-RPC body the same way it already reads the
request, falling back to the status on any parse failure, and only for
tools/call so every other request keeps its current behavior.
Closes #10035