fix(cli): add missing -u short form to lsp add --update #912

Closed
opened 2026-03-13 23:58:56 +00:00 by freemo · 4 comments
Owner

Background

The specification defines lsp add with --update/-u (spec line 8645):

agents lsp add [--update|-u] (--config|-c) <FILE>

In the current implementation (src/cleveragents/cli/commands/lsp.py:122), --update is defined without the -u short form:

update: Annotated[
    bool,
    typer.Option(
        "--update",
        help="Allow overwriting an existing LSP server registration",
    ),
] = False,

There is no conflict — -u is not used by any other option on lsp add (existing short forms are -c for --config and -f for --format).

Acceptance Criteria

  • lsp add --update also accepts -u short form
  • CLI --help output for lsp add shows --update/-u
  • Existing tests pass

Metadata

  • Suggested commit message: fix(cli): add -u short form to lsp add --update
  • Suggested branch name: fix/lsp-add-update-short-form

Definition of Done

Code merged to main, -u alias works on lsp add.

## Background The specification defines `lsp add` with `--update/-u` ([spec line 8645](../docs/specification.md)): ``` agents lsp add [--update|-u] (--config|-c) <FILE> ``` In the current implementation (`src/cleveragents/cli/commands/lsp.py:122`), `--update` is defined without the `-u` short form: ```python update: Annotated[ bool, typer.Option( "--update", help="Allow overwriting an existing LSP server registration", ), ] = False, ``` There is no conflict — `-u` is not used by any other option on `lsp add` (existing short forms are `-c` for `--config` and `-f` for `--format`). ## Acceptance Criteria - [x] `lsp add --update` also accepts `-u` short form - [x] CLI `--help` output for `lsp add` shows `--update/-u` - [x] Existing tests pass ## Metadata - **Suggested commit message:** `fix(cli): add -u short form to lsp add --update` - **Suggested branch name:** `fix/lsp-add-update-short-form` ## Definition of Done Code merged to `main`, `-u` alias works on `lsp add`.
freemo added this to the v3.4.0 milestone 2026-03-13 23:59:38 +00:00
freemo self-assigned this 2026-04-02 06:13:53 +00:00
Author
Owner

PR #1262 reviewed, approved, and merged.

The -u short form has been added to lsp add --update as specified. The squash merge commit includes Closes #912.

PR #1262 reviewed, approved, and merged. The `-u` short form has been added to `lsp add --update` as specified. The squash merge commit includes `Closes #912`.
Member

Implementation Notes

Changes Made

  1. src/cleveragents/cli/commands/lsp.pyadd() function, update parameter: Added "-u" as a second positional argument to typer.Option() alongside "--update". This follows the same pattern used by the existing --config/-c and --format/-f options on the same command. Commit: dec177a4.

  2. features/lsp_cli_new_coverage.feature — Added scenario "Add LSP server with -u short form overwrites existing" under the @lsp_cli_add tag. This scenario registers a server, then re-registers using -u (not --update) to verify the short form triggers the update path.

  3. features/steps/lsp_cli_new_coverage_steps.py — Added step step_run_lsp_add_u_short which invokes app via CliRunner with [..., "-u"] to exercise the new alias.

Design Decisions

  • No conflict with existing short forms: -c (config), -f (format). Confirmed -u is free.
  • The test specifically uses -u (not --update) to validate the short form independently of the existing --update test.

Quality Gate Results

Stage Result
nox -s lint Passed
nox -s typecheck Passed
nox -s unit_tests Passed
nox -s integration_tests Passed
nox -s e2e_tests Passed
nox -s coverage_report 98.7% (≥ 97%)

PR

PR #1262 updated with full description, Type/Task label, and v3.4.0 milestone.

## Implementation Notes ### Changes Made 1. **`src/cleveragents/cli/commands/lsp.py`** — `add()` function, `update` parameter: Added `"-u"` as a second positional argument to `typer.Option()` alongside `"--update"`. This follows the same pattern used by the existing `--config/-c` and `--format/-f` options on the same command. Commit: `dec177a4`. 2. **`features/lsp_cli_new_coverage.feature`** — Added scenario "Add LSP server with -u short form overwrites existing" under the `@lsp_cli_add` tag. This scenario registers a server, then re-registers using `-u` (not `--update`) to verify the short form triggers the update path. 3. **`features/steps/lsp_cli_new_coverage_steps.py`** — Added step `step_run_lsp_add_u_short` which invokes `app` via `CliRunner` with `[..., "-u"]` to exercise the new alias. ### Design Decisions - No conflict with existing short forms: `-c` (config), `-f` (format). Confirmed `-u` is free. - The test specifically uses `-u` (not `--update`) to validate the short form independently of the existing `--update` test. ### Quality Gate Results | Stage | Result | |-------|--------| | `nox -s lint` | ✅ Passed | | `nox -s typecheck` | ✅ Passed | | `nox -s unit_tests` | ✅ Passed | | `nox -s integration_tests` | ✅ Passed | | `nox -s e2e_tests` | ✅ Passed | | `nox -s coverage_report` | ✅ 98.7% (≥ 97%) | ### PR PR #1262 updated with full description, `Type/Task` label, and `v3.4.0` milestone.
Author
Owner

PR #1262 created on branch fix/lsp-add-update-short-form. PR review and merge handled by continuous review stream.

Implementation summary:

  • Added -u as short-form alias to typer.Option("--update", "-u", ...) in src/cleveragents/cli/commands/lsp.py
  • Added BDD scenario "Add LSP server with -u short form overwrites existing" in features/lsp_cli_new_coverage.feature
  • Added step definition step_run_lsp_add_u_short in features/steps/lsp_cli_new_coverage_steps.py

Quality gates: lint | typecheck | unit_tests (lsp_cli_add)

PR #1262 created on branch `fix/lsp-add-update-short-form`. PR review and merge handled by continuous review stream. **Implementation summary:** - Added `-u` as short-form alias to `typer.Option("--update", "-u", ...)` in `src/cleveragents/cli/commands/lsp.py` - Added BDD scenario "Add LSP server with -u short form overwrites existing" in `features/lsp_cli_new_coverage.feature` - Added step definition `step_run_lsp_add_u_short` in `features/steps/lsp_cli_new_coverage_steps.py` **Quality gates:** lint ✅ | typecheck ✅ | unit_tests (lsp_cli_add) ✅
Author
Owner

PR #1262 reviewed, approved, and merged. The -u short form for lsp add --update is now available on master.

PR #1262 reviewed, approved, and merged. The `-u` short form for `lsp add --update` is now available on master.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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#912
No description provided.