[lsp] Accept initialize requests with out-of-range process IDs - #626
Conversation
Decode only workspace-owned initialization fields so an unused processId cannot reject the request. Keep process ID interpretation in the protocol actor and cover initialization through the workspace channel. Fixes #551 Amp-Thread-ID: https://ampcode.com/threads/T-01a0fb0c-a2df-760d-95e0-8425796d646d Co-authored-by: Amp <amp@ampcode.com>
Granite ReviewCouncil
FindingsNo actionable findings. |
Compatibility regression reportPackage set ✅ The candidate introduces no compatibility errors.
Introduced errorsNone. Fixed errors (0)None. Warning changes (0 introduced, 0 fixed)Introduced None. Fixed None. Candidate errors (0)None. Candidate warnings (36)
|
|
Review against AGENTS.md: no issues found. The fix is in the layer that owns the problem. The workspace actor now decodes only the fields it uses ( The new regression test drives the workspace actor through its channel, and it sits beside the existing actor tests in Checks run:
🤖 Generated with Claude Code |
Fixes #551.
The workspace rejected initialize requests with process IDs above i32::MAX even though it does not use that field. Decode only capabilities and workspace folders, leaving process ID interpretation and monitoring with the protocol actor. Unrepresentable IDs continue to skip monitoring.
The workspace-channel regression sends processId 2147483648 and checks the InitializeResult and UTF-8 negotiation. It reproduced the InvalidParams rejection before the fix and passes afterward. The existing server test separately covers skipping the monitor.
Validation:
Amp thread: https://ampcode.com/threads/T-01a0fb0c-a2df-760d-95e0-8425796d646d