d0f265ef62
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / lint (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 29s
CI / security (pull_request) Successful in 23s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 5m3s
CI / build (pull_request) Successful in 15s
CI / unit_tests (pull_request) Successful in 16m30s
CI / coverage (pull_request) Successful in 8m20s
CI / docker (pull_request) Successful in 41s
73 lines
3.7 KiB
Gherkin
73 lines
3.7 KiB
Gherkin
Feature: Plan Lifecycle Service coverage boost
|
|
As a developer
|
|
I want to exercise uncovered branches in PlanLifecycleService
|
|
So that code coverage improves for the specific gaps identified
|
|
|
|
Background:
|
|
Given I have a fresh plan lifecycle service for coverage boost
|
|
|
|
# ---------------------------------------------------------------
|
|
# Line 284: get_action_by_name linear scan fallback
|
|
# Branch 283:284 — the dict key doesn't match but the action's
|
|
# namespaced_name string representation does.
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: get_action_by_name falls back to linear scan when dict key does not match directly
|
|
Given an action stored under a mismatched dict key
|
|
When I look up the action by its namespaced name via get_action_by_name
|
|
Then the action should be found via linear scan fallback
|
|
|
|
# ---------------------------------------------------------------
|
|
# Line 420: use_action appends PlanInvariant from action.invariants
|
|
# Branch 419:420 — the loop body over action.invariants
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: use_action copies action invariants as PlanInvariants onto the new plan
|
|
Given an action with invariants "no-breaking-changes" and "preserve-api-compat"
|
|
When I use that action to create a plan
|
|
Then the plan should contain 2 action-sourced invariants
|
|
And the invariant texts should include "no-breaking-changes"
|
|
And the invariant texts should include "preserve-api-compat"
|
|
|
|
# ---------------------------------------------------------------
|
|
# Line 643: execute_plan raises InvalidPhaseTransitionError
|
|
# Branch 642:643 — can_transition returns False
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: execute_plan raises InvalidPhaseTransitionError when plan is in Execute phase
|
|
Given a plan that is already in execute phase
|
|
When I try to execute the plan from execute phase
|
|
Then an InvalidPhaseTransitionError should be raised for the coverage boost
|
|
|
|
Scenario: execute_plan raises InvalidPhaseTransitionError when plan is in Apply phase
|
|
Given a plan that is already in apply phase
|
|
When I try to execute the plan from apply phase
|
|
Then an InvalidPhaseTransitionError should be raised for the coverage boost
|
|
|
|
# ---------------------------------------------------------------
|
|
# Lines 829-846: constrain_apply method — happy path and wrong phase
|
|
# Branches 831:832,836
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: constrain_apply marks an Apply-phase plan as constrained
|
|
Given a plan in apply phase with processing state for coverage boost
|
|
When I constrain the apply with reason "invariant violated" for coverage boost
|
|
Then the plan processing state should be "constrained" for coverage boost
|
|
And the plan error message should be "invariant violated" for coverage boost
|
|
|
|
Scenario: constrain_apply raises PlanError when plan is not in Apply phase
|
|
Given a plan in strategize phase for coverage boost
|
|
When I try to constrain the apply with reason "should fail"
|
|
Then a PlanError should be raised for coverage boost
|
|
|
|
# ---------------------------------------------------------------
|
|
# Line 959: auto_progress final return — plan doesn't match either
|
|
# auto-progress condition.
|
|
# Branch 948:959 — the else/fallback in auto_progress
|
|
# ---------------------------------------------------------------
|
|
|
|
Scenario: auto_progress returns plan unchanged when neither auto-progress condition matches
|
|
Given a plan in strategize queued state with full automation for coverage boost
|
|
When I call auto_progress on the plan for coverage boost
|
|
Then the plan should be returned unchanged in strategize queued state
|