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
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
113 lines
5.1 KiB
Gherkin
113 lines
5.1 KiB
Gherkin
@phase1 @subplan @coverage
|
|
Feature: Subplan Service Coverage Boost
|
|
Additional scenarios targeting uncovered code paths in
|
|
SubplanService, SpawnValidationError, and related helpers.
|
|
|
|
# --- SpawnValidationError direct instantiation (lines 129-131) ---
|
|
|
|
@error_object
|
|
Scenario: SpawnValidationError stores validation errors and formats message
|
|
When a SpawnValidationError is created with errors "bad resource" and "missing merge"
|
|
Then the SpawnValidationError validation_errors list should have 2 entries
|
|
And the SpawnValidationError message should contain "bad resource"
|
|
And the SpawnValidationError message should contain "missing merge"
|
|
|
|
# --- decision_service property (line 167) ---
|
|
|
|
@property_access
|
|
Scenario: Accessing the decision_service property returns the injected service
|
|
Given a subplan service constructed with a mock decision service
|
|
When the decision_service property is accessed
|
|
Then the returned decision service should be the injected mock
|
|
|
|
# --- spawn() with config=None (line 207) ---
|
|
|
|
@null_guard @spawn
|
|
Scenario: Spawn raises ValueError when config is None
|
|
Given a subplan service constructed with a mock decision service
|
|
And a parent plan for coverage tests
|
|
When spawn is called with config set to None
|
|
Then a ValueError should be raised with text "config must not be None"
|
|
|
|
# --- spawn() with spawn_entries=None (line 209) ---
|
|
|
|
@null_guard @spawn
|
|
Scenario: Spawn raises ValueError when spawn_entries is None
|
|
Given a subplan service constructed with a mock decision service
|
|
And a parent plan for coverage tests
|
|
And a default subplan config for coverage tests
|
|
When spawn is called with spawn_entries set to None
|
|
Then a ValueError should be raised with text "spawn_entries must not be None"
|
|
|
|
# --- spawn() raising SpawnValidationError (line 220) ---
|
|
|
|
@spawn_validation_error
|
|
Scenario: Spawn raises SpawnValidationError when validation fails
|
|
Given a subplan service constructed with a mock decision service
|
|
And a parent plan for coverage tests
|
|
And a subplan config with merge strategy forcibly set to None
|
|
And a spawn entry with a valid spawn decision for coverage tests
|
|
When spawn is called and validation is expected to fail
|
|
Then a SpawnValidationError should be raised
|
|
And the SpawnValidationError should mention "merge strategy"
|
|
|
|
# --- validate_spawn() with config=None (line 301) ---
|
|
|
|
@null_guard @validate
|
|
Scenario: Validate spawn raises ValueError when config is None
|
|
Given a subplan service constructed with a mock decision service
|
|
And a spawn entry with a valid spawn decision for coverage tests
|
|
When validate_spawn is called with config set to None
|
|
Then a ValueError should be raised with text "config must not be None"
|
|
|
|
# --- validate_spawn() with spawn_entries=None (line 303) ---
|
|
|
|
@null_guard @validate
|
|
Scenario: Validate spawn raises ValueError when spawn_entries is None
|
|
Given a subplan service constructed with a mock decision service
|
|
And a default subplan config for coverage tests
|
|
When validate_spawn is called with spawn_entries set to None
|
|
Then a ValueError should be raised with text "spawn_entries must not be None"
|
|
|
|
# --- Empty action_name validation (lines 334-336) ---
|
|
|
|
@validation @action_name
|
|
Scenario: Validate spawn detects empty action_name on spawn entry
|
|
Given a subplan service constructed with a mock decision service
|
|
And a default subplan config for coverage tests
|
|
And a spawn entry with an empty action_name
|
|
When validate_spawn is called for coverage tests
|
|
Then the validation result should not be valid
|
|
And the validation errors should mention "empty action_name"
|
|
|
|
@validation @action_name
|
|
Scenario: Validate spawn detects whitespace-only action_name on spawn entry
|
|
Given a subplan service constructed with a mock decision service
|
|
And a default subplan config for coverage tests
|
|
And a spawn entry with a whitespace-only action_name
|
|
When validate_spawn is called for coverage tests
|
|
Then the validation result should not be valid
|
|
And the validation errors should mention "empty action_name"
|
|
|
|
# --- get_spawn_decisions() with empty plan_id (line 375) ---
|
|
|
|
@null_guard @get_decisions
|
|
Scenario: Get spawn decisions raises ValueError for empty plan_id
|
|
Given a subplan service constructed with a mock decision service
|
|
When get_spawn_decisions is called with an empty plan_id
|
|
Then a ValueError should be raised with text "plan_id must not be empty"
|
|
|
|
@null_guard @get_decisions
|
|
Scenario: Get spawn decisions raises ValueError for whitespace-only plan_id
|
|
Given a subplan service constructed with a mock decision service
|
|
When get_spawn_decisions is called with a whitespace-only plan_id
|
|
Then a ValueError should be raised with text "plan_id must not be empty"
|
|
|
|
# --- build_spawn_entries() with decisions=None (line 414) ---
|
|
|
|
@null_guard @build_entries
|
|
Scenario: Build spawn entries raises ValueError when decisions is None
|
|
Given a subplan service constructed with a mock decision service
|
|
When build_spawn_entries is called with decisions set to None
|
|
Then a ValueError should be raised with text "decisions must not be None"
|