Skip to content

Fix LSP malformed JSON and lifecycle exit handling - #2942

Merged
Widthdom merged 4 commits into
mainfrom
fix-issue2829-2830
Jun 2, 2026
Merged

Fix LSP malformed JSON and lifecycle exit handling#2942
Widthdom merged 4 commits into
mainfrom
fix-issue2829-2830

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Handle malformed LSP JSON-RPC payloads inside the message handler and return a parse-error response instead of letting the server loop terminate.
  • Stop the stdio LSP loop on exit notifications, preserve successful shutdown -> exit termination, and return a non-zero process code when exit arrives before shutdown.
  • Add focused LSP regression coverage and bilingual changelog fragments.

Validation

  • dotnet build
  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~LspServerTests"
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • Codex adversarial review: No blocking/actionable issues found.

Documentation / Changelog

  • changelog.d/unreleased/2829.fixed.md
  • changelog.d/unreleased/2830.fixed.md

Follow-up candidates

None.

Fixes #2829
Fixes #2830

@Widthdom
Widthdom marked this pull request as ready for review June 2, 2026 16:46
@Widthdom
Widthdom merged commit 69d06d8 into main Jun 2, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue2829-2830 branch June 2, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LSP shutdown and exit notifications do not stop the server loop LSP malformed JSON can terminate the server loop

1 participant