TEST-INFRA: [test-architecture] Consolidate plan_cli step definition files #5868

Open
opened 2026-04-09 11:07:18 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Branch: refactor/test-arch-consolidate-plan-cli-steps
  • Commit Message: refactor(tests): consolidate plan_cli step definition files into a single focused file
  • Milestone: (none — backlog, see note below)
  • Parent Epic: #5407

Description

Background

The current test architecture for the plan_cli feature has a large number of step definition files. This is a violation of the BDD guidelines in CONTRIBUTING.md, which state that steps should be grouped with related ones and that feature-specific step files should be named after their feature.

Current Situation

The following step definition files exist for the plan_cli feature:

  • plan_cli_spec_alignment_steps.py
  • plan_cli_coverage_r2_steps.py
  • plan_cli_coverage_boost_steps.py
  • plan_cli_coverage_steps.py
  • plan_cli_coverage_r3_steps.py
  • plan_cli_uncovered_region_coverage_steps.py
  • plan_cli_coverage_boost_r2_steps.py
  • plan_cli_commands_r2_steps.py
  • plan_cli_cancel_revert_coverage_steps.py
  • plan_cli_legacy_r2_steps.py
  • plan_cli_spec_print_r2_steps.py
  • plan_cli_streaming_coverage_steps.py

This large number of files makes it difficult to find and maintain the step definitions for the plan_cli feature.

Recommendation

All of the above files should be merged into a single plan_cli_steps.py file. If the file becomes too large, it can be split into a few files with clear, purpose-driven names, such as plan_cli_use_steps.py, plan_cli_list_steps.py, etc.

Duplicate Check

  • Search query: plan_cli step definition
  • Results: 0
  • Reasoning: No existing issue covers the consolidation of plan_cli step definition files.

Subtasks

  • Audit all existing plan_cli_*_steps.py files and catalogue their step definitions.
  • Identify and remove any duplicate step definitions across the files.
  • Merge all step definitions into a single plan_cli_steps.py (or a small set of purpose-driven files if the result is too large).
  • Remove the old, now-redundant step definition files.
  • Verify all Behave scenarios still pass (nox -e unit_tests).
  • Verify coverage remains >= 97% (nox -e coverage_report).

Definition of Done

  • All plan_cli_*_steps.py files (except the consolidated one) have been removed.
  • All step definitions are consolidated into plan_cli_steps.py (or a small set of purpose-driven files).
  • No duplicate step definitions remain.
  • All tests pass.
  • All nox stages pass.
  • Coverage >= 97%.

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


Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: new-issue-creator

## Metadata - **Branch**: `refactor/test-arch-consolidate-plan-cli-steps` - **Commit Message**: `refactor(tests): consolidate plan_cli step definition files into a single focused file` - **Milestone**: *(none — backlog, see note below)* - **Parent Epic**: #5407 ## Description ### Background The current test architecture for the `plan_cli` feature has a large number of step definition files. This is a violation of the BDD guidelines in `CONTRIBUTING.md`, which state that steps should be grouped with related ones and that feature-specific step files should be named after their feature. ### Current Situation The following step definition files exist for the `plan_cli` feature: * `plan_cli_spec_alignment_steps.py` * `plan_cli_coverage_r2_steps.py` * `plan_cli_coverage_boost_steps.py` * `plan_cli_coverage_steps.py` * `plan_cli_coverage_r3_steps.py` * `plan_cli_uncovered_region_coverage_steps.py` * `plan_cli_coverage_boost_r2_steps.py` * `plan_cli_commands_r2_steps.py` * `plan_cli_cancel_revert_coverage_steps.py` * `plan_cli_legacy_r2_steps.py` * `plan_cli_spec_print_r2_steps.py` * `plan_cli_streaming_coverage_steps.py` This large number of files makes it difficult to find and maintain the step definitions for the `plan_cli` feature. ### Recommendation All of the above files should be merged into a single `plan_cli_steps.py` file. If the file becomes too large, it can be split into a few files with clear, purpose-driven names, such as `plan_cli_use_steps.py`, `plan_cli_list_steps.py`, etc. ### Duplicate Check * Search query: `plan_cli step definition` * Results: 0 * Reasoning: No existing issue covers the consolidation of `plan_cli` step definition files. ## Subtasks - [ ] Audit all existing `plan_cli_*_steps.py` files and catalogue their step definitions. - [ ] Identify and remove any duplicate step definitions across the files. - [ ] Merge all step definitions into a single `plan_cli_steps.py` (or a small set of purpose-driven files if the result is too large). - [ ] Remove the old, now-redundant step definition files. - [ ] Verify all Behave scenarios still pass (`nox -e unit_tests`). - [ ] Verify coverage remains >= 97% (`nox -e coverage_report`). ## Definition of Done - [ ] All `plan_cli_*_steps.py` files (except the consolidated one) have been removed. - [ ] All step definitions are consolidated into `plan_cli_steps.py` (or a small set of purpose-driven files). - [ ] No duplicate step definitions remain. - [ ] All tests pass. - [ ] All nox stages pass. - [ ] Coverage >= 97%. > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.8.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: new-issue-creator
HAL9000 added this to the v3.8.0 milestone 2026-04-09 11:37:14 +00:00
Author
Owner

Label compliance fix applied:

  • Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: backlog-groomer

Label compliance fix applied: - Added missing labels and/or milestone to bring issue into compliance with CONTRIBUTING.md --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: backlog-groomer
HAL9000 removed this from the v3.8.0 milestone 2026-04-09 13:21:42 +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.

Reference
cleveragents/cleveragents-core#5868
No description provided.