UAT: PR #2629 — Missing feature file for coverage_threshold_config_steps.py (steps are dead code) #2767

Closed
opened 2026-04-04 19:19:44 +00:00 by freemo · 5 comments
Owner

Bug Report

PR Under Test: #2629 (fix/master-ci-quality-gates, HEAD SHA 938ea8194c6a2044b17efabea1766995c62eeaf1)
Issue Being Fixed: #2597
Feature Area: coverage-threshold-config


What Was Tested

Code-level analysis of features/steps/coverage_threshold_config_steps.py and the corresponding feature files in the features/ directory.

Expected Behavior (from spec/PR intent)

PR #2629 adds --coverage-min pattern support to coverage_threshold_config_steps.py for the nightly workflow. The step function step_nightly_fail_under should be exercised by a Behave feature scenario that validates the nightly workflow uses an appropriate coverage threshold.

Actual Behavior

features/steps/coverage_threshold_config_steps.py defines the following step functions that are not used by any feature file:

  • step_load_pyproject_for_coverage — "the pyproject toml file is loaded for coverage check"
  • step_load_noxfile_for_coverage — "the noxfile py is loaded for coverage check"
  • step_load_ci_workflow_for_coverage — "the ci workflow file is loaded for coverage check"
  • step_load_nightly_workflow_for_coverage — "the nightly quality workflow file is loaded for coverage check"
  • step_coverage_run_section_exists — "the coverage run section should exist"
  • step_coverage_source_includes — "the coverage source should include ..."
  • step_coverage_branch_enabled — "the coverage branch tracking should be enabled"
  • step_noxfile_fail_under — "the noxfile should contain a fail-under threshold of at least N"
  • step_noxfile_coverage_session_exists — "the noxfile should define a coverage_report session"
  • step_coverage_html_directory — "the coverage html directory should be ..."
  • step_coverage_xml_output — "the coverage xml output should be ..."
  • step_coverage_data_file — "the coverage data file should be ..."
  • step_coverage_omit_includes — "the coverage omit patterns should include ..."
  • step_ci_coverage_nox_session — "the ci workflow should reference nox coverage_report session"
  • step_nightly_fail_under — "the nightly workflow should use a fail-under of at least N" ← key new step with --coverage-min pattern

No coverage_threshold_config.feature file exists in the repository. The only coverage threshold feature file is coverage_threshold_enforcement.feature, which uses a completely different step file (coverage_threshold_enforcement_steps.py).

Steps to Reproduce

  1. Checkout branch fix/master-ci-quality-gates
  2. Run grep -r "the nightly quality workflow file is loaded for coverage check" features/
  3. Observe: no feature file references this step
  4. Run grep -r "the nightly workflow should use a fail-under of at least" features/
  5. Observe: no feature file references this step

Impact

  • The --coverage-min pattern support added to step_nightly_fail_under is never exercised by any Behave test
  • All 15 step functions in coverage_threshold_config_steps.py are dead code — they cannot be run
  • The PR's stated goal of adding nightly workflow threshold validation via --coverage-min pattern is incomplete: the step exists but no scenario invokes it
  • This means the coverage threshold config behave tests cannot pass (they don't exist to run)

Code Location

  • Dead step file: features/steps/coverage_threshold_config_steps.py
  • Missing feature file: features/coverage_threshold_config.feature (does not exist)

Fix Required

Create features/coverage_threshold_config.feature with scenarios that exercise the steps in coverage_threshold_config_steps.py, including at minimum:

Scenario: Nightly workflow enforces coverage threshold via --coverage-min
  Given the nightly quality workflow file is loaded for coverage check
  Then the nightly workflow should use a fail-under of at least 97

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-uat-tester

## Bug Report **PR Under Test**: #2629 (`fix/master-ci-quality-gates`, HEAD SHA `938ea8194c6a2044b17efabea1766995c62eeaf1`) **Issue Being Fixed**: #2597 **Feature Area**: coverage-threshold-config --- ## What Was Tested Code-level analysis of `features/steps/coverage_threshold_config_steps.py` and the corresponding feature files in the `features/` directory. ## Expected Behavior (from spec/PR intent) PR #2629 adds `--coverage-min` pattern support to `coverage_threshold_config_steps.py` for the nightly workflow. The step function `step_nightly_fail_under` should be exercised by a Behave feature scenario that validates the nightly workflow uses an appropriate coverage threshold. ## Actual Behavior `features/steps/coverage_threshold_config_steps.py` defines the following step functions that are **not used by any feature file**: - `step_load_pyproject_for_coverage` — "the pyproject toml file is loaded for coverage check" - `step_load_noxfile_for_coverage` — "the noxfile py is loaded for coverage check" - `step_load_ci_workflow_for_coverage` — "the ci workflow file is loaded for coverage check" - `step_load_nightly_workflow_for_coverage` — "the nightly quality workflow file is loaded for coverage check" - `step_coverage_run_section_exists` — "the coverage run section should exist" - `step_coverage_source_includes` — "the coverage source should include ..." - `step_coverage_branch_enabled` — "the coverage branch tracking should be enabled" - `step_noxfile_fail_under` — "the noxfile should contain a fail-under threshold of at least N" - `step_noxfile_coverage_session_exists` — "the noxfile should define a coverage_report session" - `step_coverage_html_directory` — "the coverage html directory should be ..." - `step_coverage_xml_output` — "the coverage xml output should be ..." - `step_coverage_data_file` — "the coverage data file should be ..." - `step_coverage_omit_includes` — "the coverage omit patterns should include ..." - `step_ci_coverage_nox_session` — "the ci workflow should reference nox coverage_report session" - **`step_nightly_fail_under`** — "the nightly workflow should use a fail-under of at least N" ← **key new step with `--coverage-min` pattern** **No `coverage_threshold_config.feature` file exists** in the repository. The only coverage threshold feature file is `coverage_threshold_enforcement.feature`, which uses a completely different step file (`coverage_threshold_enforcement_steps.py`). ## Steps to Reproduce 1. Checkout branch `fix/master-ci-quality-gates` 2. Run `grep -r "the nightly quality workflow file is loaded for coverage check" features/` 3. Observe: no feature file references this step 4. Run `grep -r "the nightly workflow should use a fail-under of at least" features/` 5. Observe: no feature file references this step ## Impact - The `--coverage-min` pattern support added to `step_nightly_fail_under` is **never exercised** by any Behave test - All 15 step functions in `coverage_threshold_config_steps.py` are **dead code** — they cannot be run - The PR's stated goal of adding nightly workflow threshold validation via `--coverage-min` pattern is incomplete: the step exists but no scenario invokes it - This means the coverage threshold config behave tests **cannot pass** (they don't exist to run) ## Code Location - Dead step file: `features/steps/coverage_threshold_config_steps.py` - Missing feature file: `features/coverage_threshold_config.feature` (does not exist) ## Fix Required Create `features/coverage_threshold_config.feature` with scenarios that exercise the steps in `coverage_threshold_config_steps.py`, including at minimum: ```gherkin Scenario: Nightly workflow enforces coverage threshold via --coverage-min Given the nightly quality workflow file is loaded for coverage check Then the nightly workflow should use a fail-under of at least 97 ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.2.0 milestone 2026-04-04 19:30:13 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — 15 step functions in coverage_threshold_config_steps.py are dead code with no corresponding feature file. The --coverage-min pattern support added by PR #2629 is never tested.
  • Milestone: v3.2.0
  • MoSCoW: Should Have — Dead test code means the coverage threshold configuration is untested. Creating the missing feature file is straightforward and ensures the nightly workflow threshold validation actually works.
  • Parent Epic: #1678 (CI Execution Time Optimization)

This is another PR #2629 follow-up. The step file was created but the feature file that exercises it was not.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — 15 step functions in `coverage_threshold_config_steps.py` are dead code with no corresponding feature file. The `--coverage-min` pattern support added by PR #2629 is never tested. - **Milestone**: v3.2.0 - **MoSCoW**: Should Have — Dead test code means the coverage threshold configuration is untested. Creating the missing feature file is straightforward and ensures the nightly workflow threshold validation actually works. - **Parent Epic**: #1678 (CI Execution Time Optimization) This is another PR #2629 follow-up. The step file was created but the feature file that exercises it was not. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Starting implementation on branch fix/coverage-threshold-feature-file.

Task: Create features/coverage_threshold_config.feature with BDD scenarios that exercise all 15 step functions in features/steps/coverage_threshold_config_steps.py.

Analysis:

  • 15 step functions are dead code — no feature file invokes them
  • Steps cover: pyproject.toml coverage config, noxfile coverage session, CI workflow, nightly workflow
  • Key values confirmed: COVERAGE_THRESHOLD = 97, data_file = "build/.coverage", directory = "build/htmlcov", output = "build/coverage.xml", source = ["src", "scripts"]

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

Starting implementation on branch `fix/coverage-threshold-feature-file`. **Task**: Create `features/coverage_threshold_config.feature` with BDD scenarios that exercise all 15 step functions in `features/steps/coverage_threshold_config_steps.py`. **Analysis**: - 15 step functions are dead code — no feature file invokes them - Steps cover: pyproject.toml coverage config, noxfile coverage session, CI workflow, nightly workflow - Key values confirmed: `COVERAGE_THRESHOLD = 97`, `data_file = "build/.coverage"`, `directory = "build/htmlcov"`, `output = "build/coverage.xml"`, `source = ["src", "scripts"]` --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

All subtasks complete. Quality gates passed. PR created.

PR #3237 created on branch fix/coverage-threshold-feature-file. PR review and merge handled by continuous review stream.

Implementation summary:

  • Created features/coverage_threshold_config.feature with 11 BDD scenarios
  • All 15 previously-dead step functions in coverage_threshold_config_steps.py are now exercised
  • All 11 scenarios verified to pass against actual project configuration values
  • ruff check features/: All checks passed

Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

All subtasks complete. Quality gates passed. PR created. **PR #3237** created on branch `fix/coverage-threshold-feature-file`. PR review and merge handled by continuous review stream. **Implementation summary:** - Created `features/coverage_threshold_config.feature` with 11 BDD scenarios - All 15 previously-dead step functions in `coverage_threshold_config_steps.py` are now exercised - All 11 scenarios verified to pass against actual project configuration values - `ruff check features/`: All checks passed --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

PR #3237 reviewed, approved, and scheduled to merge when all CI checks pass.

Review summary: All 11 Gherkin scenarios verified against the 15 step functions in coverage_threshold_config_steps.py. Every step matches exactly, all dead code is now exercised, and threshold values are correct. Clean, minimal-risk change (feature file only, no Python modifications).


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

PR #3237 reviewed, approved, and scheduled to merge when all CI checks pass. **Review summary**: All 11 Gherkin scenarios verified against the 15 step functions in `coverage_threshold_config_steps.py`. Every step matches exactly, all dead code is now exercised, and threshold values are correct. Clean, minimal-risk change (feature file only, no Python modifications). --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
Author
Owner

Issue transitioned to State/Completed. PR #3237 is scheduled to merge when all CI checks pass — the Closes #2767 keyword in the PR body will auto-close this issue upon merge.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

Issue transitioned to `State/Completed`. PR #3237 is scheduled to merge when all CI checks pass — the `Closes #2767` keyword in the PR body will auto-close this issue upon merge. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
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#2767
No description provided.