9aad085b74
CI / push-validation (pull_request) Successful in 19s
CI / helm (pull_request) Successful in 19s
CI / build (pull_request) Successful in 20s
CI / quality (pull_request) Successful in 41s
CI / lint (pull_request) Successful in 47s
CI / typecheck (pull_request) Successful in 53s
CI / security (pull_request) Successful in 1m27s
CI / e2e_tests (pull_request) Successful in 3m39s
CI / integration_tests (pull_request) Successful in 4m10s
CI / unit_tests (pull_request) Successful in 5m56s
CI / docker (pull_request) Successful in 1m21s
CI / coverage (pull_request) Successful in 10m52s
CI / status-check (pull_request) Successful in 1s
CI / push-validation (push) Successful in 19s
CI / helm (push) Successful in 23s
CI / build (push) Successful in 28s
CI / e2e_tests (push) Successful in 3m13s
CI / lint (push) Successful in 3m17s
CI / quality (push) Successful in 3m38s
CI / typecheck (push) Successful in 3m57s
CI / security (push) Successful in 4m5s
CI / integration_tests (push) Successful in 6m19s
CI / unit_tests (push) Successful in 7m35s
CI / docker (push) Successful in 1m21s
CI / coverage (push) Successful in 10m48s
CI / status-check (push) Successful in 1s
ISSUES CLOSED: #9355
101 lines
4.8 KiB
Gherkin
101 lines
4.8 KiB
Gherkin
Feature: Plan CLI uncovered lines and branches coverage
|
|
As a developer
|
|
I want to exercise the uncovered lines and branches in plan.py
|
|
So that code coverage gaps at lines 80, 818, 827-828, 999, 1017-1035,
|
|
1314-1315, 1391-1392, 1573-1578, 1594-1596, 1700-1701, 1739 are closed
|
|
|
|
# ===================================================================
|
|
# Legacy cd command — full body coverage
|
|
# ===================================================================
|
|
|
|
Scenario: Legacy cd switches to an existing plan
|
|
Given a plan-cov CLI runner
|
|
And a mocked legacy container for plan-cov cd that succeeds
|
|
When I invoke plan-cov legacy cd "my-plan"
|
|
Then the plan-cov command should exit normally
|
|
And the plan-cov output should contain "Switched to plan"
|
|
|
|
Scenario: Legacy cd raises CleverAgentsError
|
|
Given a plan-cov CLI runner
|
|
And a mocked legacy container for plan-cov cd that raises CleverAgentsError
|
|
When I invoke plan-cov legacy cd "bad-plan"
|
|
Then the plan-cov command should abort
|
|
And the plan-cov output should contain "Error"
|
|
|
|
# ===================================================================
|
|
# use command — invariant_actor and invariants
|
|
# ===================================================================
|
|
|
|
Scenario: Use action with estimation-actor and invariant-actor overrides
|
|
Given a plan-cov CLI runner
|
|
And a mocked lifecycle service for plan-cov use action
|
|
When I invoke plan-cov use with estimation-actor "openai/gpt-4" and invariant-actor "openai/gpt-4"
|
|
Then the plan-cov command should exit normally
|
|
And the plan-cov created plan should have estimation_actor set
|
|
|
|
Scenario: Use action with --invariant flags builds plan invariants
|
|
Given a plan-cov CLI runner
|
|
And a mocked lifecycle service for plan-cov use action
|
|
When I invoke plan-cov use with invariant "No new warnings"
|
|
Then the plan-cov command should exit normally
|
|
|
|
# ===================================================================
|
|
# apply — no plan_id auto-discovery branches
|
|
# ===================================================================
|
|
|
|
Scenario: apply without plan_id when no plans are ready
|
|
Given a plan-cov CLI runner
|
|
And a mocked lifecycle service for plan-cov that returns no execute-complete plans
|
|
When I invoke plan-cov apply without plan_id
|
|
Then the plan-cov command should abort
|
|
And the plan-cov output should contain "No plans ready for apply"
|
|
|
|
Scenario: apply without plan_id when multiple plans are ready
|
|
Given a plan-cov CLI runner
|
|
And a mocked lifecycle service for plan-cov that returns multiple execute-complete plans
|
|
When I invoke plan-cov apply without plan_id
|
|
Then the plan-cov command should abort
|
|
And the plan-cov output should contain "Multiple plans ready"
|
|
|
|
Scenario: apply rejects a read-only plan
|
|
Given a plan-cov CLI runner
|
|
And a mocked lifecycle service for plan-cov that returns a read-only plan
|
|
When I invoke plan-cov apply with plan_id "01ARZ3NDEKTSV4RRFFQ69G5FAA"
|
|
Then the plan-cov command should abort
|
|
And the plan-cov output should contain "read-only"
|
|
|
|
# ===================================================================
|
|
# status command — CleverAgentsError handler
|
|
# ===================================================================
|
|
|
|
Scenario: status command raises CleverAgentsError
|
|
Given a plan-cov CLI runner
|
|
And a mocked lifecycle service for plan-cov status that raises CleverAgentsError
|
|
When I invoke plan-cov status "01ARZ3NDEKTSV4RRFFQ69G5FAA"
|
|
Then the plan-cov command should abort
|
|
And the plan-cov output should contain "Error"
|
|
|
|
# ===================================================================
|
|
# errors command — no error_category branch
|
|
# ===================================================================
|
|
|
|
Scenario: errors command on plan with no error recovery data
|
|
Given a plan-cov CLI runner
|
|
And a mocked lifecycle service for plan-cov errors with no error_category
|
|
When I invoke plan-cov errors "01ARZ3NDEKTSV4RRFFQ69G5FAA" with format "json"
|
|
Then the plan-cov command should exit normally
|
|
And the plan-cov output should contain "plan_id"
|
|
|
|
Scenario: errors command on plan with empty error_details in rich format
|
|
Given a plan-cov CLI runner
|
|
And a mocked lifecycle service for plan-cov errors with empty details
|
|
When I invoke plan-cov errors "01ARZ3NDEKTSV4RRFFQ69G5FAA"
|
|
Then the plan-cov command should exit normally
|
|
And the plan-cov output should contain "No error recovery records"
|
|
Scenario: errors command prints OK footer in rich format
|
|
Given a plan-cov CLI runner
|
|
And a mocked lifecycle service for plan-cov errors with empty details
|
|
When I invoke plan-cov errors "01ARZ3NDEKTSV4RRFFQ69G5FAA"
|
|
Then the plan-cov command should exit normally
|
|
And the plan-cov output should contain "✓ OK"
|