fix(lsp): classify initialize-request write failures with stderr - #270
Merged
Merged
Conversation
When an LSP server dies immediately after spawn, the initialize
*request* write can fail with a broken pipe before the initialize
*response* wait ever starts — on Windows under CI load this raced often
enough to flake broker_marks_initialize_exit_crashed_without_message_
classification on a changelog-only release PR (run 28690268431): the
bare write error propagated without the captured stderr, so the
crash reason ("unknown binary ...") was dropped. Route the request-write
failure through the same kill + stderr-enrichment path as the response
failure, making the classification deterministic on both platforms.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Merged
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.
Fixes the Windows CI flake in
broker_marks_initialize_exit_crashed_without_message_classification(seen on release PR #267, run 28690268431, whose diff was changelog-only).Mechanism: a server that exits immediately can fail the initialize request write (broken pipe) before the initialize response wait begins. That write used a bare
?, bypassing the kill + captured-stderr enrichment that the response path has — so the error lost the server's actual crash reason ("unknown binary ...") and the assertion failed. On Linux the write usually lands in the pipe buffer first, which is why only Windows-under-load flakes.Fix at the mechanism level rather than loosening the test: the request-write failure now routes through the same stderr-enriched classification, so the crash reason is deterministic on both platforms. LSP suite 24/24 locally, strict clippy clean.
🤖 Generated with Claude Code