12fc9e089f
CI / lint (pull_request) Successful in 1m8s
CI / quality (pull_request) Successful in 1m7s
CI / typecheck (pull_request) Successful in 1m31s
CI / security (pull_request) Successful in 1m39s
CI / helm (pull_request) Successful in 28s
CI / push-validation (pull_request) Successful in 24s
CI / build (pull_request) Successful in 36s
CI / integration_tests (pull_request) Successful in 4m21s
CI / unit_tests (pull_request) Successful in 4m45s
CI / e2e_tests (pull_request) Successful in 4m8s
CI / docker (pull_request) Successful in 1m29s
CI / benchmark-publish (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 11m24s
CI / status-check (pull_request) Successful in 4s
CI / benchmark-regression (pull_request) Successful in 1h10m52s
Two recovery paths for execute/errored plans using the domain model's classify_error() for canonical error classification: 1. Transient failures (§28530/§35958): rate limit, timeout, connection errors — reset to execute/queued and re-execute with the same strategy. Preserves strategy_decisions_json for decision hierarchy reconstruction. 2. Non-transient failures (§18323-18329): strategy constraint, authentication, unknown — delegate to service.try_auto_revert_from_execute() which enforces MAX_REVERSIONS loop guard, increments reversion_count, records a reversion decision, and respects the delete_content automation threshold. Error findings are redacted via redact_error_details() and stored as JSON for the strategy actor (§18329). Error classification uses the domain model's classify_error() and ErrorCategory enum — single source of truth, no parallel frozenset. AuthenticationError correctly classified as non-transient per domain model. ISSUES CLOSED: #10843
90 lines
5.0 KiB
Gherkin
90 lines
5.0 KiB
Gherkin
@execute-error-recovery
|
|
Feature: Execute phase error recovery (#10843)
|
|
Per spec §28530/§35958 and §18323, errored plans recover via two
|
|
paths: transient failures (classified by domain model's
|
|
classify_error()) retry with the same strategy, non-transient
|
|
failures revert to Strategize via service.try_auto_revert_from_execute().
|
|
|
|
Scenario: Transient error resets plan to queued and re-executes for eer
|
|
Given a mocked plan in execute/errored with exception_type "RateLimitError" for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the plan should have been reset to execute/queued for eer
|
|
And run_execute should have been called for eer
|
|
And the CLI output should contain "transient" for eer
|
|
|
|
Scenario: Timeout error is treated as transient for eer
|
|
Given a mocked plan in execute/errored with exception_type "TimeoutError" for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the plan should have been reset to execute/queued for eer
|
|
And run_execute should have been called for eer
|
|
|
|
Scenario: Strategy constraint error reverts via service API then re-executes for eer
|
|
Given a mocked plan in execute/errored with exception_type "ValueError" for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the plan should have been reverted to strategize for eer
|
|
And run_strategize should have been called for eer
|
|
And run_execute should have been called for eer
|
|
And the CLI output should contain "Reverting to Strategize" for eer
|
|
|
|
Scenario: Authentication error is non-transient per domain model for eer
|
|
Given a mocked plan in execute/errored with exception_type "AuthenticationError" for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the plan should have been reverted to strategize for eer
|
|
And run_strategize should have been called for eer
|
|
|
|
Scenario: Error findings are preserved and redacted for strategy actor for eer
|
|
Given a mocked plan in execute/errored with exception_type "ValueError" for eer
|
|
And the mock error_details include sensitive data "bearer_token" for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the committed plan should have reversion_reason in error_details for eer
|
|
And the committed prior_error_details should not contain "SECRET_VALUE_12345" for eer
|
|
|
|
Scenario: Strategy decisions preserved on transient retry for eer
|
|
Given a mocked plan in execute/errored with exception_type "RateLimitError" for eer
|
|
And the mock error_details include strategy_decisions_json for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the plan should have been reset to execute/queued for eer
|
|
And the committed error_details should contain strategy_decisions_json for eer
|
|
|
|
Scenario: Strategy revision failure aborts with non-zero exit for eer
|
|
Given a mocked plan in execute/errored with exception_type "ValueError" for eer
|
|
And the strategy revision will fail for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the CLI output should contain "Strategy revision failed" for eer
|
|
And the CLI exit code should be non-zero for eer
|
|
|
|
Scenario: Plan not found after strategize aborts with non-zero exit for eer
|
|
Given a mocked plan in execute/errored with exception_type "ValueError" for eer
|
|
And the plan disappears after strategize for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the CLI output should contain "not found" for eer
|
|
And the CLI exit code should be non-zero for eer
|
|
|
|
Scenario: Plan not found after transient recovery aborts for eer
|
|
Given a mocked plan in execute/errored with exception_type "RateLimitError" for eer
|
|
And the plan disappears after transient recovery for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the CLI output should contain "not found" for eer
|
|
And the CLI exit code should be non-zero for eer
|
|
|
|
Scenario: Empty exception_type triggers strategy reversion for eer
|
|
Given a mocked plan in execute/errored with no exception_type for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the plan should have been reverted to strategize for eer
|
|
And run_strategize should have been called for eer
|
|
And run_execute should have been called for eer
|
|
|
|
Scenario: Auto_progress moves plan directly to Execute after strategize for eer
|
|
Given a mocked plan in execute/errored with exception_type "ValueError" for eer
|
|
And the auto_progress moves the plan to Execute after strategize for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the plan should have been reverted to strategize for eer
|
|
And run_execute should have been called for eer
|
|
|
|
Scenario: MAX_REVERSIONS exceeded aborts with clear message for eer
|
|
Given a mocked plan in execute/errored with exception_type "ValueError" for eer
|
|
And revert_plan raises PlanError for max reversions for eer
|
|
When I invoke plan execute on the errored plan for eer
|
|
Then the CLI output should contain "Strategy reversion failed" for eer
|
|
And the CLI exit code should be non-zero for eer
|