Skip to content

[codex] Fix code diagnostics LSP startup states#145

Draft
ScriptedAlchemy wants to merge 3 commits into
masterfrom
codex/complete-tracedecay-followups
Draft

[codex] Fix code diagnostics LSP startup states#145
ScriptedAlchemy wants to merge 3 commits into
masterfrom
codex/complete-tracedecay-followups

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

  • Capture LSP stderr during initialization so rust-analyzer startup failures show the real toolchain/proxy error instead of a generic crash.
  • Mark language engines inactive when the indexed project does not need them, and skip inactive engines during refresh/backfill.
  • Require adapter root markers for document selection where appropriate so stray files do not start irrelevant language servers.
  • Update the Code Diagnostics dashboard to display the new inactive state.

Root Cause

The stdio LSP client discarded stderr and surfaced "closed before initialize response" when the rustup proxy exited early. The diagnostics broker then classified all refresh failures as crashed, so a missing or unavailable rust-analyzer binary appeared as a crash. Separately, dashboard document selection was extension-only, which could activate language servers for files that did not represent a real project for that adapter.

Impact

Rust analyzer failures now report the actionable rustup/toolchain stderr and are classified as unavailable instead of crashed. Language servers are only activated when project signals indicate they are needed, which reduces noisy startup attempts and makes Code Diagnostics state match the actual repository.

Validation

  • cargo nextest run --test lsp_code_diagnostics_test --no-fail-fast
  • cargo nextest run --test dashboard_code_diagnostics_api_test --no-fail-fast
  • cargo nextest run documents_for_adapter --no-fail-fast
  • cd dashboard && npm run test:node
  • cd dashboard && npm run test:dom
  • Live dashboard check confirmed Rust reports unavailable with captured rustup stderr, while unrelated languages report inactive.

@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 50c3532

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy ScriptedAlchemy force-pushed the codex/complete-tracedecay-followups branch from c87d758 to 9a3e2f8 Compare June 29, 2026 18:06
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.

1 participant