UAT: LspToolAdapter raises LspNotAvailableError for 7 of 11 LSP capabilities — references, rename, code_actions, formatting, signature_help, document_symbols, workspace_symbols not implemented in runtime #2468

Open
opened 2026-04-03 18:33:33 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: feat/lsp-full-capability-implementation
  • Commit Message: feat(lsp): implement remaining 7 LSP capabilities in runtime, client, and tool adapter
  • Milestone: v3.6.0
  • Parent Epic: #824

Summary

LspToolAdapter generates tool specs for all 11 LSP capabilities declared in LspCapability, but the runtime handler (_make_runtime_handler) only implements 4 of them: DIAGNOSTICS, COMPLETIONS, HOVER, and DEFINITIONS. The remaining 7 capabilities — REFERENCES, RENAME, CODE_ACTIONS, FORMATTING, SIGNATURE_HELP, DOCUMENT_SYMBOLS, and WORKSPACE_SYMBOLS — always raise LspNotAvailableError when invoked, even when a runtime is provided. This means actors cannot use these capabilities despite them being registered as tools.

What Was Tested

  • Code analysis of src/cleveragents/lsp/tool_adapter.py
  • Code analysis of src/cleveragents/lsp/runtime.py
  • Code analysis of src/cleveragents/lsp/client.py
  • Specification review of LSP capability exposure requirements

Expected Behavior (from spec)

Per docs/specification.md (lines 20529, 63):

"LSP capabilities — diagnostics, type information, symbol navigation, completions, references, rename, code actions, and more — are exposed to the actor as callable tools (via the LSPToolAdapter)"

All 11 capabilities in LspCapability should be callable tools that actually invoke the LSP server:

  • DIAGNOSTICS implemented
  • HOVER implemented
  • COMPLETIONS implemented
  • DEFINITIONS implemented
  • REFERENCES raises LspNotAvailableError
  • RENAME raises LspNotAvailableError
  • CODE_ACTIONS raises LspNotAvailableError
  • FORMATTING raises LspNotAvailableError
  • SIGNATURE_HELP raises LspNotAvailableError
  • DOCUMENT_SYMBOLS raises LspNotAvailableError
  • WORKSPACE_SYMBOLS raises LspNotAvailableError (returns error dict for missing query, then raises)

Actual Behavior

In src/cleveragents/lsp/tool_adapter.py (lines 161-166), the _make_runtime_handler function falls through to:

# Capabilities not yet implemented raise an explicit error
raise LspNotAvailableError(
    f"LSP capability '{capability.value}' is not yet implemented "
    f"for server '{server_name}'",
    details={"server": server_name, "capability": capability.value},
)

This affects: REFERENCES, RENAME, CODE_ACTIONS, FORMATTING, SIGNATURE_HELP, DOCUMENT_SYMBOLS, WORKSPACE_SYMBOLS.

Additionally, LspRuntime (src/cleveragents/lsp/runtime.py) only implements:

  • get_diagnostics()
  • get_completions()
  • get_hover()
  • get_definitions()

And LspClient (src/cleveragents/lsp/client.py) only implements:

  • get_completions()
  • get_hover()
  • get_definitions()
  • get_diagnostics()

The missing protocol methods in LspClient are:

  • textDocument/references
  • textDocument/rename
  • textDocument/codeAction
  • textDocument/formatting
  • textDocument/signatureHelp
  • textDocument/documentSymbol
  • workspace/symbol

Code Locations

  • src/cleveragents/lsp/tool_adapter.py lines 161-166: unimplemented capability fallthrough
  • src/cleveragents/lsp/runtime.py: missing get_references(), get_rename(), get_code_actions(), get_formatting(), get_signature_help(), get_document_symbols(), get_workspace_symbols()
  • src/cleveragents/lsp/client.py: missing corresponding LSP protocol request methods

Impact

Actors that declare lsp_capabilities: [references, rename, code_actions, formatting, signature_help, document_symbols, workspace_symbols] in their YAML configuration will have those capabilities registered as tools, but every invocation will raise LspNotAvailableError. This silently breaks actor workflows that depend on these capabilities.

Subtasks

  • Implement get_references() in LspRuntime and LspClient (textDocument/references)
  • Implement get_rename() in LspRuntime and LspClient (textDocument/rename)
  • Implement get_code_actions() in LspRuntime and LspClient (textDocument/codeAction)
  • Implement get_formatting() in LspRuntime and LspClient (textDocument/formatting)
  • Implement get_signature_help() in LspRuntime and LspClient (textDocument/signatureHelp)
  • Implement get_document_symbols() in LspRuntime and LspClient (textDocument/documentSymbol)
  • Implement get_workspace_symbols() in LspRuntime and LspClient (workspace/symbol)
  • Wire all 7 capabilities in _make_runtime_handler in tool_adapter.py
  • Add BDD tests for each new capability
  • Verify all CI checks pass

Definition of Done

  • All 11 LspCapability values produce working tool handlers when a runtime is provided
  • LspRuntime and LspClient implement all 11 LSP protocol methods
  • BDD tests cover each capability
  • All CI checks pass
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `feat/lsp-full-capability-implementation` - **Commit Message**: `feat(lsp): implement remaining 7 LSP capabilities in runtime, client, and tool adapter` - **Milestone**: v3.6.0 - **Parent Epic**: #824 ## Summary `LspToolAdapter` generates tool specs for all 11 LSP capabilities declared in `LspCapability`, but the runtime handler (`_make_runtime_handler`) only implements 4 of them: `DIAGNOSTICS`, `COMPLETIONS`, `HOVER`, and `DEFINITIONS`. The remaining 7 capabilities — `REFERENCES`, `RENAME`, `CODE_ACTIONS`, `FORMATTING`, `SIGNATURE_HELP`, `DOCUMENT_SYMBOLS`, and `WORKSPACE_SYMBOLS` — always raise `LspNotAvailableError` when invoked, even when a runtime is provided. This means actors cannot use these capabilities despite them being registered as tools. ## What Was Tested - Code analysis of `src/cleveragents/lsp/tool_adapter.py` - Code analysis of `src/cleveragents/lsp/runtime.py` - Code analysis of `src/cleveragents/lsp/client.py` - Specification review of LSP capability exposure requirements ## Expected Behavior (from spec) Per `docs/specification.md` (lines 20529, 63): > "LSP capabilities — diagnostics, type information, symbol navigation, completions, references, rename, code actions, and more — are exposed to the actor as callable tools (via the `LSPToolAdapter`)" All 11 capabilities in `LspCapability` should be callable tools that actually invoke the LSP server: - `DIAGNOSTICS` ✅ implemented - `HOVER` ✅ implemented - `COMPLETIONS` ✅ implemented - `DEFINITIONS` ✅ implemented - `REFERENCES` ❌ raises `LspNotAvailableError` - `RENAME` ❌ raises `LspNotAvailableError` - `CODE_ACTIONS` ❌ raises `LspNotAvailableError` - `FORMATTING` ❌ raises `LspNotAvailableError` - `SIGNATURE_HELP` ❌ raises `LspNotAvailableError` - `DOCUMENT_SYMBOLS` ❌ raises `LspNotAvailableError` - `WORKSPACE_SYMBOLS` ❌ raises `LspNotAvailableError` (returns error dict for missing query, then raises) ## Actual Behavior In `src/cleveragents/lsp/tool_adapter.py` (lines 161-166), the `_make_runtime_handler` function falls through to: ```python # Capabilities not yet implemented raise an explicit error raise LspNotAvailableError( f"LSP capability '{capability.value}' is not yet implemented " f"for server '{server_name}'", details={"server": server_name, "capability": capability.value}, ) ``` This affects: `REFERENCES`, `RENAME`, `CODE_ACTIONS`, `FORMATTING`, `SIGNATURE_HELP`, `DOCUMENT_SYMBOLS`, `WORKSPACE_SYMBOLS`. Additionally, `LspRuntime` (`src/cleveragents/lsp/runtime.py`) only implements: - `get_diagnostics()` - `get_completions()` - `get_hover()` - `get_definitions()` And `LspClient` (`src/cleveragents/lsp/client.py`) only implements: - `get_completions()` - `get_hover()` - `get_definitions()` - `get_diagnostics()` The missing protocol methods in `LspClient` are: - `textDocument/references` - `textDocument/rename` - `textDocument/codeAction` - `textDocument/formatting` - `textDocument/signatureHelp` - `textDocument/documentSymbol` - `workspace/symbol` ## Code Locations - `src/cleveragents/lsp/tool_adapter.py` lines 161-166: unimplemented capability fallthrough - `src/cleveragents/lsp/runtime.py`: missing `get_references()`, `get_rename()`, `get_code_actions()`, `get_formatting()`, `get_signature_help()`, `get_document_symbols()`, `get_workspace_symbols()` - `src/cleveragents/lsp/client.py`: missing corresponding LSP protocol request methods ## Impact Actors that declare `lsp_capabilities: [references, rename, code_actions, formatting, signature_help, document_symbols, workspace_symbols]` in their YAML configuration will have those capabilities registered as tools, but every invocation will raise `LspNotAvailableError`. This silently breaks actor workflows that depend on these capabilities. ## Subtasks - [ ] Implement `get_references()` in `LspRuntime` and `LspClient` (`textDocument/references`) - [ ] Implement `get_rename()` in `LspRuntime` and `LspClient` (`textDocument/rename`) - [ ] Implement `get_code_actions()` in `LspRuntime` and `LspClient` (`textDocument/codeAction`) - [ ] Implement `get_formatting()` in `LspRuntime` and `LspClient` (`textDocument/formatting`) - [ ] Implement `get_signature_help()` in `LspRuntime` and `LspClient` (`textDocument/signatureHelp`) - [ ] Implement `get_document_symbols()` in `LspRuntime` and `LspClient` (`textDocument/documentSymbol`) - [ ] Implement `get_workspace_symbols()` in `LspRuntime` and `LspClient` (`workspace/symbol`) - [ ] Wire all 7 capabilities in `_make_runtime_handler` in `tool_adapter.py` - [ ] Add BDD tests for each new capability - [ ] Verify all CI checks pass ## Definition of Done - [ ] All 11 `LspCapability` values produce working tool handlers when a runtime is provided - [ ] `LspRuntime` and `LspClient` implement all 11 LSP protocol methods - [ ] BDD tests cover each capability - [ ] All CI checks pass - All nox stages pass - Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.6.0 milestone 2026-04-03 18:33:38 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — 7 of 11 LSP capabilities raise LspNotAvailableError. This means the LSP integration is largely non-functional.
  • MoSCoW: Must Have — LSP is a core integration point. Having only 4 of 11 capabilities working means the LSP tool adapter is incomplete.

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — 7 of 11 LSP capabilities raise `LspNotAvailableError`. This means the LSP integration is largely non-functional. - **MoSCoW**: Must Have — LSP is a core integration point. Having only 4 of 11 capabilities working means the LSP tool adapter is incomplete. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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.

Blocks
#824 Epic: LSP Functional Runtime
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2468
No description provided.