test(coverage): add Behave BDD tests to improve unit test coverage across 53 source modules
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
This commit was merged in pull request #646.
This commit is contained in:
2026-03-09 04:37:23 +00:00
parent e5c0b10985
commit a808c395f9
171 changed files with 22929 additions and 72 deletions
@@ -0,0 +1,55 @@
@subplan @coverage_boost
Feature: Subplan Execution Service Defensive Code Path Coverage
As a developer maintaining the subplan execution service
I want to exercise the defensive error-handling code paths
So that coverage includes the safety-net branches for parallel, wave, and dependency-ordered execution
# --- Parallel execution: generic Exception from future.result() (lines 298-303) ---
@parallel @defensive
Scenario: Parallel execution catches generic exception from future and marks subplan ERRORED
Given a subplan execution service in parallel mode with 2 subplans
And the internal retry method is patched to raise a RuntimeError for the first subplan
When parallel execution is invoked
Then the first subplan should be marked ERRORED with the RuntimeError message
And the second subplan should complete normally
# --- Parallel execution: safety-net for uncaptured futures (lines 331-334) ---
@parallel @defensive
Scenario: Parallel fail-fast safety net cancels subplans missing from as_completed results
Given a subplan execution service in parallel fail-fast mode with 3 subplans
And as_completed is patched to skip the third future and the first subplan fails
When parallel execution is invoked with patched as_completed
Then the third subplan should be marked CANCELLED by the safety net
And the results should contain all 3 subplans
# --- Dependency-ordered: empty ready list causes break (line 381) ---
@dependency_ordered @defensive
Scenario: Dependency-ordered execution breaks out when no nodes are ready due to unresolvable deps
Given a subplan execution service in dependency-ordered mode with 2 subplans
And topological sort is patched to accept a circular dependency graph
When dependency-ordered execution is invoked with the circular graph
Then execution should complete without raising an error
And the number of completed subplans should be less than 2
# --- Wave execution: CancelledError from future.result() (lines 573-575) ---
@wave @defensive
Scenario: Wave execution catches CancelledError from a future and marks subplan CANCELLED
Given a subplan execution service in dependency-ordered mode with 3 independent subplans
And the internal retry method is patched to raise CancelledError for the second subplan in wave
When dependency-ordered execution is invoked for the wave scenario
Then the second subplan should be marked CANCELLED
And the other subplans in the wave should complete successfully
# --- Wave execution: generic Exception from future.result() (lines 576-578) ---
@wave @defensive
Scenario: Wave execution catches generic Exception from a future and marks subplan ERRORED
Given a subplan execution service in dependency-ordered mode with 3 independent subplans for exception test
And the internal retry method is patched to raise ValueError for the second subplan in wave
When dependency-ordered execution is invoked for the wave exception scenario
Then the second subplan should be marked ERRORED with the ValueError message
And the other wave subplans should still complete