Files
cleveragents-core/features/actor_cli_coverage_boost.feature
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

66 lines
2.7 KiB
Gherkin

Feature: Actor CLI coverage boost
Cover uncovered lines in src/cleveragents/cli/commands/actor.py
# ---------- _get_services (lines 180-185) ----------
Scenario: _get_services returns actor_service and actor_registry when container has registry
Given a mock container with actor_registry
When I call _get_services
Then I should receive both actor_service and actor_registry
Scenario: _get_services returns actor_service and None when container lacks registry
Given a mock container without actor_registry
When I call _get_services
Then I should receive actor_service and None for registry
# ---------- _actor_spec_dict with graph_descriptor (line 311) ----------
Scenario: _actor_spec_dict includes graph_descriptor when present on actor
Given an actor with a graph_descriptor
When I call _actor_spec_dict on that actor
Then the result dict should contain the graph_descriptor key
Scenario: _actor_spec_dict omits graph_descriptor when None on actor
Given an actor without a graph_descriptor
When I call _actor_spec_dict on that actor
Then the result dict should not contain the graph_descriptor key
# ---------- set_default via service fallback (line 665) ----------
Scenario: set-default falls back to service when registry is None
Given an actor CLI test runner
When I run set-default via the service path
Then the service set_default_actor should be called
And the set-default output should contain the actor name
Scenario: set-default via service aborts on NotFoundError
Given an actor CLI test runner
When I run set-default via service for a missing actor
Then the set-default command should abort with an error
# ---------- _print_actor non-rich format with graph_descriptor ----------
Scenario: _print_actor uses format_output for non-rich format with graph_descriptor
Given an actor with a graph_descriptor
When I print that actor in json format
Then the json output should contain the graph_descriptor
# ---------- list_actors via service fallback ----------
Scenario: list_actors falls back to service when registry is None
Given an actor CLI test runner
When I run actor list via service with actors
Then the actor list output should contain actor names
Scenario: list_actors non-rich format via service
Given an actor CLI test runner
When I run actor list via service in json format
Then the actor list json output should be valid
# ---------- show actor via service fallback ----------
Scenario: show actor falls back to service when registry is None
Given an actor CLI test runner
When I run actor show via service path
Then the show output should contain the actor name