-
Notifications
You must be signed in to change notification settings - Fork 0
Remove URL manipulation in MCPServerClient #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Removed _prepare_url_for_proxy_mode method that appended /mcp or /sse paths - Workload URLs now passed directly to underlying MCP clients without modification - Eliminated temporary URL override logic in _execute_with_session - Added 7 unit tests verifying URL remains unchanged during: - MCPServerClient initialization - list_tools operations (both streamable-http and SSE) - call_tool operations - Multiple consecutive operations - All tests verify both the workload URL property and the URL passed to MCP clients 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
PR Review: Remove URL manipulation in MCPServerClientSummaryThis PR removes the URL manipulation logic that was appending Positive Aspects ✅
Code Quality ObservationsStrengths:
Minor Suggestions:
Potential IssuesCritical:
Minor:
Security & Performance
Testing Recommendations
Questions
Overall AssessmentRecommendation: Approve with minor concerns The code changes are clean and well-tested. The main concern is ensuring this doesn't break existing deployments. If workload URLs are already stored with the correct paths, this is a great simplification. If not, you may need a migration strategy. Score: 8/10
|
- Added mock_mcp_session fixture to eliminate repeated mock setup - Consolidated init tests using pytest.mark.parametrize (3 test cases in one) - Parametrized list_tools tests to cover both transport types (streamable, SSE) - Parametrized call_tool tests with different URL and proxy_mode combinations - Updated multiple operations test to use shared fixture - Reduced test code from ~245 lines to ~175 lines while maintaining coverage - All 16 tests pass (3 init variations + 2 list_tools + 2 call_tool + 1 multi-op + 8 existing) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
@claude check again the newest commit. Verify if the fixes were applied. Make your comment short and precise |
|
Claude finished @aponcedeleonch's task —— View job Review Complete ✓
AssessmentFixes Applied Successfully ✅ The latest commit "Refactor URL preservation tests to reduce duplication" addresses the previous review concerns:
Result: Test coverage maintained while significantly reducing code duplication. Well done. |
therealnb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were definitely cases where that URL mangling was required (that is why I put it in there, but it was questionable that was the right place for it to be sure).
I think it is fine to take it out from here and test further. We can fix the problems somewhere else.
🤖 Generated with Claude Code