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
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:
@@ -0,0 +1,98 @@
|
||||
Feature: Sandbox protocol coverage boost
|
||||
Exercise uncovered lines in infrastructure/sandbox/protocol.py including
|
||||
SandboxStatus.assert_transition error path and Sandbox Protocol default stubs.
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# SandboxStatus.assert_transition – invalid transition raises error
|
||||
# Covers lines 121-123
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
Scenario: assert_transition raises SandboxStateError for invalid transition
|
||||
Given spcb sandbox status "cleaned_up" and target status "active"
|
||||
When spcb assert_transition is called with those statuses
|
||||
Then spcb a SandboxStateError should be raised
|
||||
And spcb the error message should contain "cleaned_up -> active"
|
||||
|
||||
Scenario: assert_transition raises SandboxStateError for pending to committed
|
||||
Given spcb sandbox status "pending" and target status "committed"
|
||||
When spcb assert_transition is called with those statuses
|
||||
Then spcb a SandboxStateError should be raised
|
||||
And spcb the error message should contain "pending -> committed"
|
||||
|
||||
Scenario: assert_transition raises SandboxStateError for committed to active
|
||||
Given spcb sandbox status "committed" and target status "active"
|
||||
When spcb assert_transition is called with those statuses
|
||||
Then spcb a SandboxStateError should be raised
|
||||
And spcb the error message should contain "committed -> active"
|
||||
|
||||
Scenario: assert_transition succeeds for valid pending to created transition
|
||||
Given spcb sandbox status "pending" and target status "created"
|
||||
When spcb assert_transition is called with those statuses
|
||||
Then spcb no exception should be raised
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Sandbox Protocol default property/method stubs
|
||||
# Covers lines 223, 228, 233, 248, 263, 278, 290, 301
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
Scenario: Protocol sandbox_id default stub returns None
|
||||
Given spcb a bare Sandbox protocol subclass instance
|
||||
When spcb the sandbox_id property is accessed
|
||||
Then spcb the result should be None
|
||||
|
||||
Scenario: Protocol status default stub returns None
|
||||
Given spcb a bare Sandbox protocol subclass instance
|
||||
When spcb the status property is accessed
|
||||
Then spcb the result should be None
|
||||
|
||||
Scenario: Protocol context default stub returns None
|
||||
Given spcb a bare Sandbox protocol subclass instance
|
||||
When spcb the context property is accessed
|
||||
Then spcb the result should be None
|
||||
|
||||
Scenario: Protocol create default stub returns None
|
||||
Given spcb a bare Sandbox protocol subclass instance
|
||||
When spcb the create method is called with plan_id "test-plan"
|
||||
Then spcb the result should be None
|
||||
|
||||
Scenario: Protocol get_path default stub returns None
|
||||
Given spcb a bare Sandbox protocol subclass instance
|
||||
When spcb the get_path method is called with path "src/main.py"
|
||||
Then spcb the result should be None
|
||||
|
||||
Scenario: Protocol commit default stub returns None
|
||||
Given spcb a bare Sandbox protocol subclass instance
|
||||
When spcb the commit method is called with message "test commit"
|
||||
Then spcb the result should be None
|
||||
|
||||
Scenario: Protocol rollback default stub returns None
|
||||
Given spcb a bare Sandbox protocol subclass instance
|
||||
When spcb the rollback method is called
|
||||
Then spcb the result should be None
|
||||
|
||||
Scenario: Protocol cleanup default stub returns None
|
||||
Given spcb a bare Sandbox protocol subclass instance
|
||||
When spcb the cleanup method is called
|
||||
Then spcb the result should be None
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# Additional assert_transition edge cases for branch coverage
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
Scenario: assert_transition raises for every terminal-state outbound attempt
|
||||
Given spcb sandbox status "cleaned_up" and target status "pending"
|
||||
When spcb assert_transition is called with those statuses
|
||||
Then spcb a SandboxStateError should be raised
|
||||
And spcb the error message should contain "cleaned_up -> pending"
|
||||
|
||||
Scenario: assert_transition raises for errored to active
|
||||
Given spcb sandbox status "errored" and target status "active"
|
||||
When spcb assert_transition is called with those statuses
|
||||
Then spcb a SandboxStateError should be raised
|
||||
And spcb the error message should contain "errored -> active"
|
||||
|
||||
Scenario: assert_transition raises for rolled_back to committed
|
||||
Given spcb sandbox status "rolled_back" and target status "committed"
|
||||
When spcb assert_transition is called with those statuses
|
||||
Then spcb a SandboxStateError should be raised
|
||||
And spcb the error message should contain "rolled_back -> committed"
|
||||
Reference in New Issue
Block a user