UAT: LspServerConfig missing health_check and root_path fields defined in spec #3412

Open
opened 2026-04-05 16:35:02 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/lsp-server-config-missing-fields
  • Commit Message: fix(lsp): add health_check and root_path fields to LspServerConfig per spec
  • Milestone: Backlog (no milestone — see backlog note below)
  • Parent Epic: #824

Backlog note: This issue was discovered during autonomous operation
on milestone v3.6.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Bug Description

LspServerConfig in src/cleveragents/lsp/models.py is missing two fields that are defined in the specification:

  1. health_check — health monitoring configuration (enabled, interval, restart_on_failure, max_restarts)
  2. root_path — workspace root path with Jinja2 template support

Note: Epic #824 already tracks a related child issue #835 (feat(lsp): add missing LspServerConfig model fields). This UAT-discovered issue specifically documents the health_check and root_path fields with full spec references and impact analysis, and may be consolidated with #835 at the project owner's discretion.

Expected Behavior (from spec)

Per docs/specification.md Structure Reference table (lines 36165–36180):

Field Type Required Description
root_path string No Workspace root path sent in the LSP initialize request. Supports Jinja2 template variables. Default: {{ project.root }}.
health_check object No Health monitoring configuration.
health_check.enabled boolean No Whether to perform periodic health checks. Default: true.
health_check.interval_seconds integer No Seconds between health check probes. Default: 60, min: 10.
health_check.restart_on_failure boolean No Auto-restart server on health check failure. Default: true.
health_check.max_restarts integer No Maximum automatic restarts before marking server as failed. Default: 3, min: 0.

The informal YAML schema (lines 36134–36158) also shows these fields:

root_path: "{{ project.root }}"   # Workspace root, Jinja2 supported (optional)
health_check:
  enabled: true
  interval_seconds: 60
  restart_on_failure: true
  max_restarts: 3

Actual Behavior

LspServerConfig (lines 64–132 of src/cleveragents/lsp/models.py) has no health_check or root_path fields. The model only has: name, description, languages, command, args, transport, env, capabilities, initialization, workspace_settings.

Note: The spec uses init_options (line 36136) while the model uses initialization — this naming discrepancy is a separate concern but worth noting.

Code Location

  • File: src/cleveragents/lsp/models.py
  • Lines 64–132: LspServerConfig class — missing health_check and root_path fields

Impact

  • LSP server health monitoring cannot be configured per-server (health check interval, auto-restart behavior)
  • Workspace root path cannot be customized or use Jinja2 templates
  • YAML configuration files following the spec will have their health_check and root_path fields silently ignored

Subtasks

  • Add HealthCheckConfig Pydantic model with enabled, interval_seconds, restart_on_failure, max_restarts fields
  • Add health_check: HealthCheckConfig field to LspServerConfig
  • Add root_path: str field to LspServerConfig with default "{{ project.root }}"
  • Wire health_check configuration into LspLifecycleManager (use interval_seconds for health check timing)
  • Wire root_path into LspRuntime.start_server() for workspace root resolution
  • Add unit tests for new fields
  • Update features/lsp_config_fields.feature to cover new fields

Definition of Done

  • LspServerConfig has health_check and root_path fields matching the spec
  • HealthCheckConfig model validates interval_seconds >= 10 and max_restarts >= 0
  • Health check configuration is consumed by the lifecycle manager
  • All unit tests pass
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/lsp-server-config-missing-fields` - **Commit Message**: `fix(lsp): add health_check and root_path fields to LspServerConfig per spec` - **Milestone**: Backlog (no milestone — see backlog note below) - **Parent Epic**: #824 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.6.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Bug Description `LspServerConfig` in `src/cleveragents/lsp/models.py` is missing two fields that are defined in the specification: 1. `health_check` — health monitoring configuration (enabled, interval, restart_on_failure, max_restarts) 2. `root_path` — workspace root path with Jinja2 template support > **Note:** Epic #824 already tracks a related child issue #835 (`feat(lsp): add missing LspServerConfig model fields`). This UAT-discovered issue specifically documents the `health_check` and `root_path` fields with full spec references and impact analysis, and may be consolidated with #835 at the project owner's discretion. ## Expected Behavior (from spec) Per `docs/specification.md` Structure Reference table (lines 36165–36180): | Field | Type | Required | Description | |-------|------|----------|-------------| | `root_path` | string | No | Workspace root path sent in the LSP `initialize` request. Supports Jinja2 template variables. Default: `{{ project.root }}`. | | `health_check` | object | No | Health monitoring configuration. | | `health_check.enabled` | boolean | No | Whether to perform periodic health checks. Default: `true`. | | `health_check.interval_seconds` | integer | No | Seconds between health check probes. Default: `60`, min: `10`. | | `health_check.restart_on_failure` | boolean | No | Auto-restart server on health check failure. Default: `true`. | | `health_check.max_restarts` | integer | No | Maximum automatic restarts before marking server as failed. Default: `3`, min: `0`. | The informal YAML schema (lines 36134–36158) also shows these fields: ```yaml root_path: "{{ project.root }}" # Workspace root, Jinja2 supported (optional) health_check: enabled: true interval_seconds: 60 restart_on_failure: true max_restarts: 3 ``` ## Actual Behavior `LspServerConfig` (lines 64–132 of `src/cleveragents/lsp/models.py`) has no `health_check` or `root_path` fields. The model only has: `name`, `description`, `languages`, `command`, `args`, `transport`, `env`, `capabilities`, `initialization`, `workspace_settings`. Note: The spec uses `init_options` (line 36136) while the model uses `initialization` — this naming discrepancy is a separate concern but worth noting. ## Code Location - File: `src/cleveragents/lsp/models.py` - Lines 64–132: `LspServerConfig` class — missing `health_check` and `root_path` fields ## Impact - LSP server health monitoring cannot be configured per-server (health check interval, auto-restart behavior) - Workspace root path cannot be customized or use Jinja2 templates - YAML configuration files following the spec will have their `health_check` and `root_path` fields silently ignored ## Subtasks - [ ] Add `HealthCheckConfig` Pydantic model with `enabled`, `interval_seconds`, `restart_on_failure`, `max_restarts` fields - [ ] Add `health_check: HealthCheckConfig` field to `LspServerConfig` - [ ] Add `root_path: str` field to `LspServerConfig` with default `"{{ project.root }}"` - [ ] Wire `health_check` configuration into `LspLifecycleManager` (use `interval_seconds` for health check timing) - [ ] Wire `root_path` into `LspRuntime.start_server()` for workspace root resolution - [ ] Add unit tests for new fields - [ ] Update `features/lsp_config_fields.feature` to cover new fields ## Definition of Done - [ ] `LspServerConfig` has `health_check` and `root_path` fields matching the spec - [ ] `HealthCheckConfig` model validates `interval_seconds >= 10` and `max_restarts >= 0` - [ ] Health check configuration is consumed by the lifecycle manager - [ ] All unit tests pass - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
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#3412
No description provided.