Files
cleveragents-core/features/plan_resume_service_coverage_boost.feature
T
freemo a808c395f9
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 35s
CI / security (pull_request) Successful in 50s
CI / unit_tests (pull_request) Successful in 2m46s
CI / integration_tests (pull_request) Successful in 3m16s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 5m6s
CI / lint (push) Successful in 13s
CI / quality (push) Successful in 16s
CI / build (push) Successful in 18s
CI / security (push) Successful in 32s
CI / typecheck (push) Successful in 35s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m52s
CI / integration_tests (push) Successful in 3m8s
CI / docker (push) Successful in 39s
CI / coverage (push) Successful in 5m53s
CI / benchmark-publish (push) Successful in 16m55s
CI / benchmark-regression (pull_request) Successful in 33m0s
test(coverage): add Behave BDD tests to improve unit test coverage across 53 source modules
Add 53 new .feature files and corresponding step definition files targeting
uncovered lines identified in build/coverage.xml. Fix AmbiguousStep conflicts
in 7 pre-existing step files by disambiguating step text.

New tests cover: ACP clients/facade, actor CLI/config, application container,
ACMS service/strategies, async worker, automation profile CLI, autonomy
guardrail, bridge, change model, config CLI/service, context service,
cross-plan correction, database models, decision service, decomposition
clustering/service, discovery handler, langchain chat provider, langgraph
nodes, materializers, multi-project service, plan apply/CLI/lifecycle/model/
preflight/resume/service, PostgreSQL analyzer, project CLI/context CLI,
provider registry, reactive application/route, repositories, resolver handler,
resource registry service, resume model, retry patterns, sandbox protocol,
server CLI, skill CLI/service, skills registry, subplan execution/service,
system CLI, UKO loader, UoW, and YAML template engine.

Closes #645
2026-03-09 13:01:58 -04:00

65 lines
3.3 KiB
Gherkin

Feature: Plan Resume Service - Coverage Boost
As a developer
I want to ensure all validation error branches in PlanResumeService are tested
So that edge-case error handling is verified
# --- __init__ validation (line 75) ---
Scenario: Creating PlanResumeService with None lifecycle_service raises ValidationError
When I try to create a PlanResumeService with None lifecycle_service
Then a coverage-boost ValidationError should be raised with message "lifecycle_service must not be None"
# --- get_resume_metadata validation (line 93) ---
Scenario: Getting resume metadata with empty plan_id raises ValidationError
Given I have a coverage-boost PlanResumeService
When I try to get resume metadata with empty plan_id
Then a coverage-boost ValidationError should be raised with message "plan_id must not be empty"
# --- build_resume_summary validation (line 186) ---
Scenario: Building resume summary with empty plan_id raises ValidationError
Given I have a coverage-boost PlanResumeService
When I try to build resume summary with empty plan_id
Then a coverage-boost ValidationError should be raised with message "plan_id must not be empty"
# --- record_step_checkpoint validation (lines 303, 305, 307, 309) ---
Scenario: Recording step checkpoint with empty plan_id raises ValidationError
Given I have a coverage-boost PlanResumeService
When I try to record a step checkpoint with empty plan_id
Then a coverage-boost ValidationError should be raised with message "plan_id must not be empty"
Scenario: Recording step checkpoint with negative step_index raises ValidationError
Given I have a coverage-boost PlanResumeService
And I have a coverage-boost plan in execute phase
When I try to record a step checkpoint with step_index -1
Then a coverage-boost ValidationError should be raised with message "step_index must be >= 0"
Scenario: Recording step checkpoint with empty decision_id raises ValidationError
Given I have a coverage-boost PlanResumeService
And I have a coverage-boost plan in execute phase
When I try to record a step checkpoint with empty decision_id
Then a coverage-boost ValidationError should be raised with message "decision_id must not be empty"
Scenario: Recording step checkpoint with empty step_text raises ValidationError
Given I have a coverage-boost PlanResumeService
And I have a coverage-boost plan in execute phase
When I try to record a step checkpoint with empty step_text
Then a coverage-boost ValidationError should be raised with message "step_text must not be empty"
# --- record_shutdown validation (line 354) ---
Scenario: Recording shutdown with empty plan_id raises ValidationError
Given I have a coverage-boost PlanResumeService
When I try to record shutdown with empty plan_id
Then a coverage-boost ValidationError should be raised with message "plan_id must not be empty"
# --- set_total_steps validation (line 384) ---
Scenario: Setting total steps with negative value raises ValidationError
Given I have a coverage-boost PlanResumeService
And I have a coverage-boost plan in execute phase
When I try to set total steps to -1
Then a coverage-boost ValidationError should be raised with message "total must be >= 0"