UAT: LspRegistry missing update() method — spec requires servers to be "added, updated, listed, shown, and removed" #4881

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

Bug Report

Feature Area: LSP Integration — LSP Registry

What Was Tested

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

Expected Behavior (from spec)

ADR-027 states:

Independently versioned and managed — language servers can be added, updated, listed, shown, and removed like any other registered entity.

This implies the registry must support an update() operation to replace an existing server configuration (e.g., to change the command path, add capabilities, or update initialization options).

Actual Behavior

LspRegistry only provides:

  • register() — raises ValueError if name already exists (no update semantics)
  • get() / get_or_raise() — read-only lookup
  • list_servers() — listing
  • remove() — deletion

There is no update() method. To update a server, a user must call remove() then register(), which is not atomic and has no CLI equivalent.

The register() method explicitly rejects duplicates:

if config.name in self._servers:
    raise ValueError(f"LSP server '{config.name}' is already registered")

This is also related to the existing issue "UAT: LspRegistry.register() raises ValueError on duplicate — no update/replace semantics for re-registration".

Impact

  • agents lsp update CLI command (if it exists) has no backing registry method
  • Re-registering a server after configuration changes requires two separate operations with a window where the server is unregistered
  • Inconsistent with other registries (Tool Registry, Skill Registry, Actor Registry) which all support update operations

Code Location

src/cleveragents/lsp/registry.py — missing method:

def update(self, config: LspServerConfig) -> None:
    """Update an existing LSP server configuration.
    
    Args:
        config: The updated LspServerConfig.
        
    Raises:
        LspServerNotFoundError: If the server is not registered.
        ValueError: If config is None.
    """
    if config is None:
        raise ValueError("config must not be None")
    with self._lock:
        if config.name not in self._servers:
            raise LspServerNotFoundError(config.name)
        self._servers[config.name] = config
        logger.info("Updated LSP server: %s", config.name)

Steps to Reproduce

  1. Register local/pyright
  2. Try to update it with a new command path
  3. Observe that register() raises ValueError: LSP server 'local/pyright' is already registered
  4. Observe there is no update() method to call instead

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

## Bug Report **Feature Area:** LSP Integration — LSP Registry ### What Was Tested Code analysis of `src/cleveragents/lsp/registry.py` against ADR-027 (Language Server Protocol Integration). ### Expected Behavior (from spec) ADR-027 states: > **Independently versioned and managed** — language servers can be added, **updated**, listed, shown, and removed like any other registered entity. This implies the registry must support an `update()` operation to replace an existing server configuration (e.g., to change the command path, add capabilities, or update initialization options). ### Actual Behavior `LspRegistry` only provides: - `register()` — raises `ValueError` if name already exists (no update semantics) - `get()` / `get_or_raise()` — read-only lookup - `list_servers()` — listing - `remove()` — deletion There is no `update()` method. To update a server, a user must call `remove()` then `register()`, which is not atomic and has no CLI equivalent. The `register()` method explicitly rejects duplicates: ```python if config.name in self._servers: raise ValueError(f"LSP server '{config.name}' is already registered") ``` This is also related to the existing issue "UAT: LspRegistry.register() raises ValueError on duplicate — no update/replace semantics for re-registration". ### Impact - `agents lsp update` CLI command (if it exists) has no backing registry method - Re-registering a server after configuration changes requires two separate operations with a window where the server is unregistered - Inconsistent with other registries (Tool Registry, Skill Registry, Actor Registry) which all support update operations ### Code Location `src/cleveragents/lsp/registry.py` — missing method: ```python def update(self, config: LspServerConfig) -> None: """Update an existing LSP server configuration. Args: config: The updated LspServerConfig. Raises: LspServerNotFoundError: If the server is not registered. ValueError: If config is None. """ if config is None: raise ValueError("config must not be None") with self._lock: if config.name not in self._servers: raise LspServerNotFoundError(config.name) self._servers[config.name] = config logger.info("Updated LSP server: %s", config.name) ``` ### Steps to Reproduce 1. Register `local/pyright` 2. Try to update it with a new command path 3. Observe that `register()` raises `ValueError: LSP server 'local/pyright' is already registered` 4. Observe there is no `update()` method to call instead --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.5.0 milestone 2026-04-08 20:15:58 +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#4881
No description provided.