[mcp] fix: classify invalid visible gpu ids - #146
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughAdds ChangesGPU IDs Invalid Params Reclassification
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
gpu_idsmistakes.gpu_idsin service startup to invalid params while preserving internal errors for arbitrary controller failures.Test Plan
-32603and MCPtools/callreturning an internal-error envelope.PYTHONPATH=$PWD/src pytest tests/mcp/test_server.py::test_jsonrpc_start_keep_out_of_range_gpu_ids_returns_invalid_params tests/mcp/test_server.py::test_mcp_tools_call_out_of_range_gpu_ids_returns_tool_error tests/mcp/test_server.py::test_jsonrpc_start_keep_runtime_value_error_remains_internal_error -qPYTHONPATH=$PWD/src pytest tests/mcp -qPYTHONPATH=$PWD/src pytest tests -qPYTHONPATH=$PWD/src mkdocs buildpre-commit run --all-filesgit diff --checkLocal Review
Summary by CodeRabbit
New Features
gpu_idsvalidation so out-of-range visible GPU selections are reported as input errors instead of generic server failures.Invalid params, and MCP tool calls now returnisError=truefor these cases.Bug Fixes