Description
After PR #123 replaced the fixed sleep with a `wait_for_indexing_ready` readiness poll, 5 integration tests now fail consistently when run in isolation (not just under parallelism). The readiness gate fires on the first `textDocument/publishDiagnostics` notification, but rust-analyzer is not yet fully stable — it continues indexing and cancels subsequent requests.
This is a regression from the simple diagnostic signal used in `wait_for_indexing_ready`. The ra_e2e test suite (PR #125) correctly uses hover-probe polling (3 consecutive successful responses) which is a reliable readiness oracle.
Reproduction Steps
cargo test --workspace --all-features --test integration_tests -- --ignored test_hover_on_std_vec
cargo test --workspace --all-features --test integration_tests -- --ignored test_hover_on_u64_type
cargo test --workspace --all-features --test integration_tests -- --ignored test_references_user_struct
cargo test --workspace --all-features --test integration_tests -- --ignored test_diagnostics_no_errors
cargo test --workspace --all-features --test integration_tests -- --ignored test_diagnostics_with_error
Each fails consistently in isolation.
Failure Modes Observed
test_hover_on_std_vec: LSP error -32801 "content modified"
test_hover_on_u64_type: hover returns {"contents":"No hover information available","range":null} (null hover from not-yet-indexed RA)
test_references_user_struct: LSP error -32801 "content modified"
test_diagnostics_no_errors: LSP error -32802 "server cancelled the request" with retriggerRequest: true
test_diagnostics_with_error: LSP error -32802 "server cancelled the request" with retriggerRequest: true
Expected Behavior
Tests should pass in isolation. RA should be fully ready before LSP queries are issued.
Actual Behavior
RA is still indexing when `wait_for_indexing_ready` returns. It cancels or gives stale responses on the first request.
Root Cause
`wait_for_indexing_ready` uses `publishDiagnostics` as its readiness signal. RA emits diagnostics early during indexing (before type-checking is complete), so this is not a reliable "ready" oracle.
The ra_e2e suite uses a more robust approach: poll `get_hover` on a known symbol until 3 consecutive successful responses are received. The integration tests should adopt the same pattern.
Environment
- HEAD: 0f40608
- rust-analyzer: 1.95.0 (59807616 2026-04-14)
- Affects all 5 tests run individually, 100% reproducible
Logs / Evidence
ERROR mcpls_core::lsp::client: LSP error response: content modified (code -32801)
ERROR mcpls_core::lsp::client: LSP error response: server cancelled the request (code -32802)
Description
After PR #123 replaced the fixed sleep with a `wait_for_indexing_ready` readiness poll, 5 integration tests now fail consistently when run in isolation (not just under parallelism). The readiness gate fires on the first `textDocument/publishDiagnostics` notification, but rust-analyzer is not yet fully stable — it continues indexing and cancels subsequent requests.
This is a regression from the simple diagnostic signal used in `wait_for_indexing_ready`. The ra_e2e test suite (PR #125) correctly uses hover-probe polling (3 consecutive successful responses) which is a reliable readiness oracle.
Reproduction Steps
Each fails consistently in isolation.
Failure Modes Observed
test_hover_on_std_vec: LSP error-32801"content modified"test_hover_on_u64_type: hover returns{"contents":"No hover information available","range":null}(null hover from not-yet-indexed RA)test_references_user_struct: LSP error-32801"content modified"test_diagnostics_no_errors: LSP error-32802"server cancelled the request" withretriggerRequest: truetest_diagnostics_with_error: LSP error-32802"server cancelled the request" withretriggerRequest: trueExpected Behavior
Tests should pass in isolation. RA should be fully ready before LSP queries are issued.
Actual Behavior
RA is still indexing when `wait_for_indexing_ready` returns. It cancels or gives stale responses on the first request.
Root Cause
`wait_for_indexing_ready` uses `publishDiagnostics` as its readiness signal. RA emits diagnostics early during indexing (before type-checking is complete), so this is not a reliable "ready" oracle.
The ra_e2e suite uses a more robust approach: poll `get_hover` on a known symbol until 3 consecutive successful responses are received. The integration tests should adopt the same pattern.
Environment
Logs / Evidence