Files
cleveragents-core/features/acp_facade_coverage_boost.feature
freemo a808c395f9 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

85 lines
4.9 KiB
Gherkin

Feature: ACP local facade coverage boost — uncovered validation paths
As a developer maintaining the ACP local facade
I want all error-handling and validation paths exercised
So that edge-case regressions are caught early
# ---------------------------------------------------------------
# Constructor validation (line 82)
# ---------------------------------------------------------------
Scenario: Constructing AcpLocalFacade with a non-dict raises TypeError
When I try to create an AcpLocalFacade with a non-dict services argument
Then a TypeError should be raised with message "services must be a dict or None"
# ---------------------------------------------------------------
# plan.execute — empty plan_id with service wired (line 256)
# ---------------------------------------------------------------
Scenario: plan.execute with empty plan_id and wired service returns error
Given a coverage-boost facade with a mock PlanLifecycleService
When I dispatch coverage-boost operation "plan.execute" with params {"plan_id": ""}
Then the coverage-boost response status should be "error"
And the coverage-boost response error code should be "INTERNAL_ERROR"
And the coverage-boost response error message should contain "plan_id is required"
Scenario: plan.execute with missing plan_id param and wired service returns error
Given a coverage-boost facade with a mock PlanLifecycleService
When I dispatch coverage-boost operation "plan.execute" with params {}
Then the coverage-boost response status should be "error"
And the coverage-boost response error code should be "INTERNAL_ERROR"
And the coverage-boost response error message should contain "plan_id is required"
# ---------------------------------------------------------------
# plan.status — empty plan_id with service wired (line 266)
# ---------------------------------------------------------------
Scenario: plan.status with empty plan_id and wired service returns error
Given a coverage-boost facade with a mock PlanLifecycleService
When I dispatch coverage-boost operation "plan.status" with params {"plan_id": ""}
Then the coverage-boost response status should be "error"
And the coverage-boost response error code should be "INTERNAL_ERROR"
And the coverage-boost response error message should contain "plan_id is required"
Scenario: plan.status with missing plan_id param and wired service returns error
Given a coverage-boost facade with a mock PlanLifecycleService
When I dispatch coverage-boost operation "plan.status" with params {}
Then the coverage-boost response status should be "error"
And the coverage-boost response error code should be "INTERNAL_ERROR"
And the coverage-boost response error message should contain "plan_id is required"
# ---------------------------------------------------------------
# plan.diff — empty plan_id with service wired (line 281)
# ---------------------------------------------------------------
Scenario: plan.diff with empty plan_id and wired service returns error
Given a coverage-boost facade with a mock PlanLifecycleService
When I dispatch coverage-boost operation "plan.diff" with params {"plan_id": ""}
Then the coverage-boost response status should be "error"
And the coverage-boost response error code should be "INTERNAL_ERROR"
And the coverage-boost response error message should contain "plan_id is required"
Scenario: plan.diff with missing plan_id param and wired service returns error
Given a coverage-boost facade with a mock PlanLifecycleService
When I dispatch coverage-boost operation "plan.diff" with params {}
Then the coverage-boost response status should be "error"
And the coverage-boost response error code should be "INTERNAL_ERROR"
And the coverage-boost response error message should contain "plan_id is required"
# ---------------------------------------------------------------
# plan.apply — empty plan_id with service wired (line 295)
# ---------------------------------------------------------------
Scenario: plan.apply with empty plan_id and wired service returns error
Given a coverage-boost facade with a mock PlanLifecycleService
When I dispatch coverage-boost operation "plan.apply" with params {"plan_id": ""}
Then the coverage-boost response status should be "error"
And the coverage-boost response error code should be "INTERNAL_ERROR"
And the coverage-boost response error message should contain "plan_id is required"
Scenario: plan.apply with missing plan_id param and wired service returns error
Given a coverage-boost facade with a mock PlanLifecycleService
When I dispatch coverage-boost operation "plan.apply" with params {}
Then the coverage-boost response status should be "error"
And the coverage-boost response error code should be "INTERNAL_ERROR"
And the coverage-boost response error message should contain "plan_id is required"