Skip to content

fix(client): direct CLI queries warn when the server was still indexing (#1520) - #1626

Merged
alex09x merged 1 commit into
mainfrom
fix/1520-cli-indexing-warning
Oct 27, 2026
Merged

alex09x merged 1 commit into
mainfrom
fix/1520-cli-indexing-warning

Conversation

@alex09x

@alex09x alex09x commented Oct 27, 2026

Copy link
Copy Markdown
Owner

Problem

The direct-query loop in commands/query/lsp_client.rs accepts only a method-less payload with id == 2 and drops everything else (#1520). A prod-code/indexing note, which the gateway sends just before an answer given while the server was still loading or indexing, was discarded. A direct prod-code impls FILE LINE COL then printed a possibly partial list, or "No implementations found", with no hint why.

Change

New busy_note(payload) recognises the prod-code/indexing notification and parses its Busy params. The loop prints it to stderr as "warning: the language server was still indexing (…); the answer below may be incomplete". It does not wait for a complete index, and response matching is unchanged.

Reproduce and verify

New commands::query::lsp_client::tests::an_indexing_note_becomes_a_warning: a note becomes the warning, while an answer and an unrelated notification do not.

Break-check, with the method test inverted so no note is recognised:

an_indexing_note_becomes_a_warning ... FAILED   a note

No live query against a still-indexing server was run.

Measurements

None.

Checks

On a Linux build node, default stable toolchain, one gate on the tree holding #1517, #1519, #1520, #1521 and #1522 (merged one after another):

  • cargo test -p prod-code-client --no-fail-fast: first run exit 101, two targets failed, both asserting behaviour these changes replace on purpose:
  • cargo clippy -p prod-code-client --all-targets: exit 0. The warnings in touched lsp_bridge files are pre-existing (collapsible_if on the unchanged $/cancelRequest branch, and in reconnect.rs, state.rs, transport.rs).
  • cargo fmt --all -- --check: exit 0, after the test edits too.

Closes #1520

@alex09x alex09x added bug Something isn't working client CLI and MCP client labels Oct 27, 2026
@alex09x
alex09x merged commit 03f0612 into main Oct 27, 2026
@alex09x
alex09x deleted the fix/1520-cli-indexing-warning branch October 27, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working client CLI and MCP client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Direct CLI LSP queries discard indexing warnings before returning partial results

1 participant