[AUTO-INF-3] Break up oversized Behave step modules and remove zero-byte placeholders #8264

Open
opened 2026-04-13 06:56:06 +00:00 by HAL9000 · 0 comments
Owner

Summary

  • Several Behave step modules have grown into multi-thousand-line monoliths: features/steps/plan_service_steps.py is 3,531 lines, features/steps/container_tool_exec_steps.py is 1,785 lines, and features/steps/context_unit_tests_steps.py is 1,813 lines.
  • Many other feature step files are zero-byte placeholders (for example features/steps/actor_cli_coverage_steps.py), which exist only to satisfy the current import convention.

Problem

  • Oversized modules are hard to navigate, concentrate unrelated helpers, and encourage copy/paste of mocks instead of reuse; new contributors struggle to find the relevant step definitions.
  • Empty placeholder files hide the actual implementation location and add import overhead without value, making the test suite structure opaque.

Proposal

  1. Split the largest step modules into domain packages (e.g., features/steps/plan/service/...) with focused submodules per command group and shared helper modules.
  2. Introduce a loader/registry in environment.py so features map to reorganised modules directly, eliminating the need for zero-byte placeholders (replace them with explicit re-exports or remove them).
  3. Extract shared helpers (mock builders, cleanup utilities) into support modules consumed by both Behave and Robot packages so that logic shared during the split is centralised.

Acceptance Criteria

  • Plan, container-tool, and context step definitions are reorganised into smaller modules (target < 400 lines each) with shared helpers factored out.
  • Zero-byte step modules are removed or replaced with explicit imports that point to their real implementations.
  • Behave and Robot suites still pass with coverage ≥ 97%, and contributor documentation describes the new structure.

Duplicate Check

  • Open issues (q="plan service"): hits such as #7100 address product bugs, not test organisation.
  • Open issues (q="behave steps"): no restructuring work surfaced.
  • Cross-area (q=[AUTO-INF-): items like #8168 target CI parallelism, not step module organisation.
  • Closed issues (q="behave steps"): only status/epic reports; no prior restructuring work identified.
  • Closed issues (q="robot test"): likewise only status/epic reports, with no overlapping effort.

Automated by CleverAgents Bot
Supervisor: Test Infrastructure Pool | Agent: test-infra-worker

### Summary - Several Behave step modules have grown into multi-thousand-line monoliths: `features/steps/plan_service_steps.py` is 3,531 lines, `features/steps/container_tool_exec_steps.py` is 1,785 lines, and `features/steps/context_unit_tests_steps.py` is 1,813 lines. - Many other feature step files are zero-byte placeholders (for example `features/steps/actor_cli_coverage_steps.py`), which exist only to satisfy the current import convention. ### Problem - Oversized modules are hard to navigate, concentrate unrelated helpers, and encourage copy/paste of mocks instead of reuse; new contributors struggle to find the relevant step definitions. - Empty placeholder files hide the actual implementation location and add import overhead without value, making the test suite structure opaque. ### Proposal 1. Split the largest step modules into domain packages (e.g., `features/steps/plan/service/...`) with focused submodules per command group and shared helper modules. 2. Introduce a loader/registry in `environment.py` so features map to reorganised modules directly, eliminating the need for zero-byte placeholders (replace them with explicit re-exports or remove them). 3. Extract shared helpers (mock builders, cleanup utilities) into support modules consumed by both Behave and Robot packages so that logic shared during the split is centralised. ### Acceptance Criteria - Plan, container-tool, and context step definitions are reorganised into smaller modules (target < 400 lines each) with shared helpers factored out. - Zero-byte step modules are removed or replaced with explicit imports that point to their real implementations. - Behave and Robot suites still pass with coverage ≥ 97%, and contributor documentation describes the new structure. ### Duplicate Check - Open issues (`q="plan service"`): hits such as #7100 address product bugs, not test organisation. - Open issues (`q="behave steps"`): no restructuring work surfaced. - Cross-area (`q=[AUTO-INF-`): items like #8168 target CI parallelism, not step module organisation. - Closed issues (`q="behave steps"`): only status/epic reports; no prior restructuring work identified. - Closed issues (`q="robot test"`): likewise only status/epic reports, with no overlapping effort. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure Pool | Agent: test-infra-worker
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#8264
No description provided.