Files
cleveragents-core/features/plan_lifecycle_service_coverage_r2.feature
aditya 2764fcef5c
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 16s
CI / build (pull_request) Successful in 25s
CI / quality (pull_request) Successful in 34s
CI / typecheck (pull_request) Successful in 39s
CI / security (pull_request) Successful in 52s
CI / unit_tests (pull_request) Successful in 2m51s
CI / integration_tests (pull_request) Successful in 3m41s
CI / docker (pull_request) Successful in 56s
CI / e2e_tests (pull_request) Successful in 3m56s
CI / coverage (pull_request) Successful in 6m28s
CI / benchmark-regression (pull_request) Successful in 38m39s
fix(actor,preflight,tests): resolve PR #975 review findings and stabilize full-suite coverage runs
Address review-driven fixes across actor schema, preflight guardrails, docs/examples,
and Behave/Robot coverage: unify preflight warning behavior with shared role-warning logic,
resolve actor-name to config payloads in production preflight flow, harden response_format
validation/coercion edge cases, extract duplicated helper logic, and expand negative-path
test coverage. Also fix cross-scenario patcher leakage in step modules to eliminate
full-run-only coverage failures.
2026-03-18 06:58:39 +00:00

88 lines
4.8 KiB
Gherkin

Feature: Plan Lifecycle Service coverage round 2
As a developer
I want to exercise remaining uncovered branches in PlanLifecycleService
So that code coverage improves for the specific gaps identified in build/coverage.xml
Background:
Given I have a fresh plan lifecycle service for coverage r2
# ---------------------------------------------------------------
# Lines 226-231: _try_record_decision exception handling
# The except block in _try_record_decision that catches failures
# from decision_service.record_decision and logs a warning.
# ---------------------------------------------------------------
Scenario: Decision recording failure is silently caught during start_strategize
Given a plan lifecycle service with a failing decision service
And an action "local/decision-fail" exists for coverage r2
And a plan created from "local/decision-fail" for coverage r2
When I start strategize and the decision service raises an error
Then the plan should be in processing state without raising an error
# ---------------------------------------------------------------
# Line 643: use_action description fallback to str(namespaced_name)
# Triggered when both long_description and description are falsy.
# ---------------------------------------------------------------
Scenario: use_action falls back to namespaced name string when description fields are blank
Given an action "local/blank-desc" with its description cleared after creation
When I use the blank-description action to create a plan for coverage r2
Then the plan description should equal the action namespaced name string
# ---------------------------------------------------------------
# Line 1437: try_auto_revert_from_apply early return when not Apply
# ---------------------------------------------------------------
Scenario: try_auto_revert_from_apply returns plan unchanged when not in Apply phase
Given a plan in strategize phase for auto-revert test
When I call try_auto_revert_from_apply on the non-apply plan
Then the plan should remain in strategize phase unchanged
# ---------------------------------------------------------------
# Line 1440: try_auto_revert_from_apply early return when not CONSTRAINED
# ---------------------------------------------------------------
Scenario: try_auto_revert_from_apply returns plan unchanged when not constrained
Given a plan in apply phase with queued state for auto-revert test
When I call try_auto_revert_from_apply on the non-constrained plan
Then the plan should remain in apply phase with queued state
# ---------------------------------------------------------------
# Lines 1452-1458: try_auto_revert_from_apply loop guard
# When reversion_count >= MAX_REVERSIONS, auto-reversion is blocked.
# ---------------------------------------------------------------
Scenario: try_auto_revert_from_apply is blocked by reversion loop guard
Given a plan in apply constrained state that has reached max reversions
And the plan uses a profile that permits auto-reversion from apply
When I call try_auto_revert_from_apply on the max-reverted plan
Then the plan should remain in apply constrained state due to loop guard
# ---------------------------------------------------------------
# Line 1488: try_auto_revert_from_execute early return not Execute
# ---------------------------------------------------------------
Scenario: try_auto_revert_from_execute returns plan unchanged when not in Execute phase
Given a plan in strategize phase for execute-revert test
When I call try_auto_revert_from_execute on the non-execute plan
Then the plan should remain in strategize phase for execute-revert test
# ---------------------------------------------------------------
# Lines 1500-1506: try_auto_revert_from_execute loop guard
# When reversion_count >= MAX_REVERSIONS, reversion is blocked.
# ---------------------------------------------------------------
Scenario: try_auto_revert_from_execute is blocked by reversion loop guard
Given a plan in execute phase that has reached max reversions
And the plan uses a profile that permits auto-reversion from execute
When I call try_auto_revert_from_execute on the max-reverted execute plan
Then the plan should remain in execute phase due to loop guard
Scenario: start_strategize resolves estimation actor names to config payloads
Given a persisted plan lifecycle service with actor repository for coverage r2
And a persisted estimation actor config named "local/estimator"
And an action "local/preflight-resolve" with estimation actor "local/estimator" for coverage r2
And a plan created from "local/preflight-resolve" for coverage r2
When I start strategize with preflight capture enabled
Then preflight actor registry should include a resolved estimation actor config payload