fix(tests): add missing Behave feature file for coverage_threshold #3237
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#2767 UAT: PR #2629 — Missing feature file for coverage_threshold_config_steps.py (steps are dead code)
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core!3237
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/coverage-threshold-feature-file"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Creates
features/coverage_threshold_config.feature, the missing Gherkin feature file that exercises all 15 step functions infeatures/steps/coverage_threshold_config_steps.py. Prior to this PR, every step in that module was dead code — no scenario invoked any of them — meaning the coverage threshold configuration was entirely untested by Behave. This PR resolves the gap introduced by PR #2629 and ensures the--coverage-minpattern support added tostep_nightly_fail_underis actually exercised.Changes
features/coverage_threshold_config.feature— a new Gherkin feature file containing 11 BDD scenarios organized into four logical groups:pyproject.tomlcoverage configuration (7 scenarios): validates the[tool.coverage.run]section exists, thatsrcis listed as a coverage source, that branch tracking is enabled (branch = true), that the data file isbuild/.coverage, that the HTML output directory isbuild/htmlcov, that the XML output isbuild/coverage.xml, and that the omit patterns include*/tests/*.noxfile.pycoverage session (2 scenarios): asserts that acoverage_reportsession is defined and that the fail-under threshold is at least 97 (matching theCOVERAGE_THRESHOLD = 97constant).nox -s coverage_report.--coverage-minthreshold of at least 85 (matching the actual--coverage-min 85value innightly-quality.yml).coverage_threshold_config_steps.pywere already complete; only the driving feature file was absent.Design Decisions
@given/@thendecorator strings incoverage_threshold_config_steps.pyto guarantee correct Behave step resolution without any ambiguity.COVERAGE_THRESHOLD = 97constant; the nightly workflow threshold (85) was taken from the literal--coverage-min 85argument in.forgejo/workflows/nightly-quality.yml.Testing
ruff check features/): All checks passedModules Affected
features/coverage_threshold_config.feature(new file)Closes #2767
Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-pr-api-creator
- What was implemented - Created features/coverage_threshold_config.feature containing 11 BDD scenarios to exercise coverage threshold configurations. - All 15 step functions in features/steps/coverage_threshold_config_steps.py are now exercised by the new scenarios. - Scenarios cover: - pyproject.toml coverage config (7 scenarios) - noxfile.py coverage session (2 scenarios) - CI workflow (1 scenario) - nightly quality workflow (1 scenario) - All 11 scenarios verified to pass against actual project configuration values. - Key design decisions - Used the exact step text from the step file to ensure proper Gherkin-to-step matching. - Nightly workflow threshold set to 85 (matching the actual --coverage-min 85 value in nightly-quality.yml). - Noxfile threshold set to 97 (matching COVERAGE_THRESHOLD = 97 constant). - Organized scenarios into logical groups with comments for readability. - Modules/components affected - features/coverage_threshold_config.feature (new feature file) - features/steps/coverage_threshold_config_steps.py (all steps now exercised) ISSUES CLOSED: #2767🔒 Review claimed by reviewer-pool-1 [claim-token: reviewer-pool-1-3237-1775372600]
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
Review: APPROVED ✅
PR Metadata
fix(tests): ...) ✅Closes #2767✅ISSUES CLOSED: #2767✅Code Review
Step-to-Scenario Matching: All 11 Gherkin scenarios were verified against the 15 step functions in
coverage_threshold_config_steps.py. Every@givenand@thendecorator string matches its corresponding feature file step text exactly. All 15 step functions are now reachable — zero dead code remains.Threshold Values:
COVERAGE_THRESHOLD = 97constant innoxfile.py✅--coverage-min 85argument innightly-quality.yml✅Scenario Organization: Four logical groups (pyproject.toml config, noxfile session, CI workflow, nightly workflow) with clear Gherkin comments. Well-structured and readable.
Risk Assessment: Minimal — this PR adds only a
.featurefile with no Python code changes. The step implementations were already reviewed in PR #2629.No issues found. Clean, focused PR that resolves a real testing gap.
Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer