UAT: LspLifecycleManager never sends workspace/didChangeConfiguration with workspace_settings after server initialization #4875

Open
opened 2026-04-08 20:12:04 +00:00 by HAL9000 · 0 comments
Owner

Bug Report

Feature Area: LSP Integration — LSP Runtime Lifecycle Management

What Was Tested

Code analysis of src/cleveragents/lsp/lifecycle.py against ADR-027 (Language Server Protocol Integration).

Expected Behavior (from spec)

ADR-027 specifies the workspace_settings field in LspServerConfig:

workspace_settings: Workspace-specific settings sent via workspace/didChangeConfiguration after initialization.

The YAML schema example shows:

workspace_settings:
  python.analysis.diagnosticMode: "workspace"

After the LSP initialize handshake completes, the runtime should send a workspace/didChangeConfiguration notification with the configured workspace settings.

Actual Behavior

In lifecycle.py, start_server() calls client.initialize(workspace_path) but never sends workspace/didChangeConfiguration:

client = LspClient(transport, server_name=config.name)
try:
    client.initialize(workspace_path)
except Exception:
    transport.stop()
    raise

The config.workspace_settings dict is never used. Similarly, restart_server() has the same omission.

Impact

  • Language servers that require workspace configuration (e.g., Pyright's python.analysis.diagnosticMode) will not receive their settings
  • Servers may operate in a degraded mode (e.g., single-file analysis instead of workspace-wide analysis)
  • The workspace_settings field in LspServerConfig is effectively dead code

Code Location

src/cleveragents/lsp/lifecycle.py, start_server() method (~line 90) and restart_server() method (~line 160).

After client.initialize(workspace_path), add:

if config.workspace_settings:
    client.did_change_configuration(config.workspace_settings)

Steps to Reproduce

  1. Register a server with workspace_settings={"python.analysis.diagnosticMode": "workspace"}
  2. Start the server via LspLifecycleManager.start_server()
  3. Observe that no workspace/didChangeConfiguration notification is sent to the language server

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** LSP Integration — LSP Runtime Lifecycle Management ### What Was Tested Code analysis of `src/cleveragents/lsp/lifecycle.py` against ADR-027 (Language Server Protocol Integration). ### Expected Behavior (from spec) ADR-027 specifies the `workspace_settings` field in `LspServerConfig`: > `workspace_settings`: Workspace-specific settings sent via `workspace/didChangeConfiguration` after initialization. The YAML schema example shows: ```yaml workspace_settings: python.analysis.diagnosticMode: "workspace" ``` After the LSP `initialize` handshake completes, the runtime should send a `workspace/didChangeConfiguration` notification with the configured workspace settings. ### Actual Behavior In `lifecycle.py`, `start_server()` calls `client.initialize(workspace_path)` but never sends `workspace/didChangeConfiguration`: ```python client = LspClient(transport, server_name=config.name) try: client.initialize(workspace_path) except Exception: transport.stop() raise ``` The `config.workspace_settings` dict is never used. Similarly, `restart_server()` has the same omission. ### Impact - Language servers that require workspace configuration (e.g., Pyright's `python.analysis.diagnosticMode`) will not receive their settings - Servers may operate in a degraded mode (e.g., single-file analysis instead of workspace-wide analysis) - The `workspace_settings` field in `LspServerConfig` is effectively dead code ### Code Location `src/cleveragents/lsp/lifecycle.py`, `start_server()` method (~line 90) and `restart_server()` method (~line 160). After `client.initialize(workspace_path)`, add: ```python if config.workspace_settings: client.did_change_configuration(config.workspace_settings) ``` ### Steps to Reproduce 1. Register a server with `workspace_settings={"python.analysis.diagnosticMode": "workspace"}` 2. Start the server via `LspLifecycleManager.start_server()` 3. Observe that no `workspace/didChangeConfiguration` notification is sent to the language server --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-08 20:15:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#4875
No description provided.