fix(bridge): retry ServerCancelled requests and fix integration test readiness gate#160
Merged
Merged
Conversation
When rust-analyzer returns error -32802 (ServerCancelled) with retriggerRequest: true, LspClient::request() now retries up to 3 times with exponential backoff (500ms->1s->2s) before surfacing the error. Replaces the publishDiagnostics-based readiness signal in integration tests with hover-probe polling: 3 consecutive successful hover responses required before declaring RA ready. Matches the ra_e2e approach. Closes #128, closes #127
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
LspClient::request()now retries up to 3 times with exponential backoff (500 ms → 1 s → 2 s) when LSP returns error -32802 (ServerCancelled) withdata.retriggerRequest: true. Addeddata: Option<serde_json::Value>toError::LspServerErrorto propagate error payloads.publishDiagnostics-based readiness signal in integration tests with hover-probe polling: 3 consecutive successful hover responses required before declaring RA ready. Matches thera_e2eapproach. Fixes 3 of 5 previously-failing tests; 2 remaining failures (test_hover_on_u64_type,test_diagnostics_with_error) are pre-existing and unrelated to this PR.Test plan
cargo nextest run --workspace --all-features --lib --bins)test_hover_on_std_vecpasses in isolationtest_references_user_structpasses in isolationtest_diagnostics_no_errorspasses in isolationtest_hover_on_u64_typeandtest_diagnostics_with_errorremain pre-existing failures (tracked separately)Closes #127, closes #128