test(runtime): add missing BDD unit tests for the runtime module #2071

Open
opened 2026-04-03 03:48:19 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: test/runtime-missing-unit-tests
  • Commit Message: test(runtime): add missing BDD unit tests for the runtime module
  • Milestone: v3.6.0
  • Parent Epic: #824

Background

The runtime module (LSP Functional Runtime) currently lacks comprehensive BDD unit test coverage. The LspRuntime class, LspToolAdapter, and related helpers were implemented as part of Epic #824, but the corresponding Behave scenario files in features/ are absent or incomplete. This leaves the module below the mandatory 97% coverage threshold and violates the project's TDD-first principle.

All unit tests must be written as Gherkin scenarios using the Behave framework and placed in the features/ directory. Mocks and test doubles must live exclusively in features/mocks/. No xUnit-style (pytest) unit tests are permitted.

Subtasks

  • Audit the runtime module to enumerate all untested public and protected methods/classes
  • Write Behave feature files (features/runtime/) covering LspRuntime lifecycle (start, stop, restart)
  • Write Behave scenarios for LspRuntime query operations (diagnostics, completions, hover, definitions)
  • Write Behave scenarios for LspToolAdapter tool-spec generation and handler dispatch
  • Write Behave scenarios for error paths (LspNotAvailableError, invalid state transitions)
  • Add any required mock implementations to features/mocks/ (e.g., mock LSP server subprocess)
  • Ensure all new step definitions are fully, statically typed (Pyright-clean)
  • Run nox -e unit_tests and confirm all new scenarios pass
  • Run nox -e coverage_report and confirm coverage >= 97%
  • Run nox -e typecheck and confirm zero type errors

Definition of Done

  • All public and protected methods of the runtime module are covered by at least one Behave scenario
  • All happy-path and error-path scenarios are implemented
  • All mock implementations are placed exclusively in features/mocks/
  • No # type: ignore suppressions introduced
  • All nox stages pass (nox -e lint, nox -e typecheck, nox -e unit_tests, nox -e coverage_report)
  • Coverage >= 97%

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

## Metadata - **Branch**: `test/runtime-missing-unit-tests` - **Commit Message**: `test(runtime): add missing BDD unit tests for the runtime module` - **Milestone**: v3.6.0 - **Parent Epic**: #824 ## Background The `runtime` module (LSP Functional Runtime) currently lacks comprehensive BDD unit test coverage. The `LspRuntime` class, `LspToolAdapter`, and related helpers were implemented as part of Epic #824, but the corresponding Behave scenario files in `features/` are absent or incomplete. This leaves the module below the mandatory 97% coverage threshold and violates the project's TDD-first principle. All unit tests must be written as Gherkin scenarios using the Behave framework and placed in the `features/` directory. Mocks and test doubles must live exclusively in `features/mocks/`. No xUnit-style (pytest) unit tests are permitted. ## Subtasks - [ ] Audit the `runtime` module to enumerate all untested public and protected methods/classes - [ ] Write Behave feature files (`features/runtime/`) covering `LspRuntime` lifecycle (start, stop, restart) - [ ] Write Behave scenarios for `LspRuntime` query operations (diagnostics, completions, hover, definitions) - [ ] Write Behave scenarios for `LspToolAdapter` tool-spec generation and handler dispatch - [ ] Write Behave scenarios for error paths (`LspNotAvailableError`, invalid state transitions) - [ ] Add any required mock implementations to `features/mocks/` (e.g., mock LSP server subprocess) - [ ] Ensure all new step definitions are fully, statically typed (Pyright-clean) - [ ] Run `nox -e unit_tests` and confirm all new scenarios pass - [ ] Run `nox -e coverage_report` and confirm coverage >= 97% - [ ] Run `nox -e typecheck` and confirm zero type errors ## Definition of Done - [ ] All public and protected methods of the `runtime` module are covered by at least one Behave scenario - [ ] All happy-path and error-path scenarios are implemented - [ ] All mock implementations are placed exclusively in `features/mocks/` - [ ] No `# type: ignore` suppressions introduced - [ ] All nox stages pass (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e coverage_report`) - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: Unknown | Agent: ca-new-issue-creator
freemo added this to the v3.6.0 milestone 2026-04-03 03:48:25 +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.

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