feat(phase-6): Production Readiness - Milestone 1 E2E Testing#11
Merged
Conversation
- Add MCP client simulator for protocol testing - Add 11 E2E tests for MCP protocol validation - Test initialize, list_tools, tool schemas, error handling - Add empty_config.toml fixture for protocol-only testing - Fix binary path resolution for workspace structure Tests verify: - Initialize handshake and protocol version - All 8 MCP tools are listed - Tool schemas are valid JSON Schema - Invalid tool calls return proper errors - Missing parameters are rejected - Complete MCP workflow works end-to-end
Implement Milestone 2: Real LSP Integration Tests for Phase 6. Changes: - Add comprehensive rust_analyzer_tests.rs with 15 integration tests - Tests cover all MCP tool handlers with real rust-analyzer: * test_hover_on_std_vec - Hover on String type * test_hover_on_u64_type - Hover on u64 type * test_definition_user_struct - Go-to-definition across files * test_definition_across_files - Definition for Repository type * test_references_create_repo_function - Find function references * test_references_user_struct - Find struct references * test_diagnostics_with_error - Detect compilation errors * test_diagnostics_no_errors - Verify clean files * test_document_symbols - Extract symbols from lib.rs * test_document_symbols_types_file - Extract from types.rs * test_completions_basic - Code completion (timing-sensitive) * test_format_document - Document formatting * test_timeout_handling - Verify timeout behavior * test_invalid_file_path - Error handling for bad paths * test_out_of_bounds_position - Graceful bounds handling - Export translator types from bridge module for test access: * DiagnosticSeverity, Diagnostic, DiagnosticsResult * ReferencesResult, Location, Position2D, Range * All result types for MCP handlers - Add documentation to DiagnosticSeverity enum variants - All tests marked with #[ignore] and require rust-analyzer - Use timeout wrappers (10s) for all LSP operations - Tests use existing test fixtures in tests/fixtures/rust_workspace/ Test execution: - Regular tests: cargo nextest run (skips ignored tests) - LSP tests: cargo nextest run -- --ignored (requires rust-analyzer) Quality: - All existing tests pass (83 tests) - Clippy clean with allowed test lints - Formatted with rustfmt
Add comprehensive user-facing documentation: - Getting started guide with quick setup instructions - Configuration reference with all options documented - Tools reference covering all 8 MCP tools - Troubleshooting guide for common issues All documentation includes practical examples and cross-references for easy navigation.
Fix two documentation issues identified in code review: 1. Add missing `env` field documentation for LSP server configuration - Includes type, default value, and usage example with PYTHONPATH and VIRTUAL_ENV 2. Correct `file_patterns` field requirement status - Changed from Required: Yes to Required: No (defaults to empty array) - Aligns with actual implementation using serde(default)
Milestone 4 - Release Preparation: - Add release.yml workflow for automated releases - Support crates.io publishing (mcpls-core → mcpls) - Build binaries for Linux, macOS, Windows - Create GitHub Releases with artifacts - Add CHANGELOG.md for v0.1.0 Milestone 6 - Deployment Guides: - Add Dockerfile (multi-stage, non-root user) - Add installation.md with 4 install methods - Document 7 language server setups
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 6 Milestone 1: End-to-End Testing Infrastructure
mcp_client.rs)Test Coverage
test_e2e_initialize_handshaketest_e2e_list_toolstest_e2e_tool_schemastest_e2e_invalid_tool_calltest_e2e_tool_call_missing_paramstest_e2e_tool_call_invalid_filetest_e2e_tool_call_invalid_positiontest_e2e_complete_workflowtest_e2e_multiple_requestsReview Summary
Test plan
cargo clippycleancargo fmtapplied