@executor-error-details
Feature: Executor preserves strategy_decisions_json and reports actual actor mode (#10874)
  Verifies that _run_execute_with_actor merges error_details instead of
  replacing them, preserving strategy_decisions_json stored by
  run_strategize.  Also verifies the mode field reflects the actual
  execute actor type rather than a hardcoded "stub" string.

  Scenario: Execute success preserves strategy_decisions_json in error_details for eed
    Given a eed mock lifecycle service with strategy_decisions_json in error_details
    And a eed PlanExecutor with a succeeding execute actor
    When I eed run execute on the plan
    Then the eed committed error_details should contain strategy_decisions_json
    And the eed committed error_details should contain tool_calls_count
    And the eed committed error_details should contain sandbox_refs_count

  Scenario: Execute success reports actual actor type in mode for eed
    Given a eed mock lifecycle service with strategy_decisions_json in error_details
    And a eed PlanExecutor with a succeeding execute actor
    When I eed run execute on the plan
    Then the eed committed error_details mode should be the execute actor class name

  Scenario: Execute failure preserves strategy_decisions_json in error_details for eed
    Given a eed mock lifecycle service with strategy_decisions_json in error_details
    And a eed PlanExecutor with a failing execute actor
    When I eed run execute expecting failure on the plan
    Then the eed committed error_details should contain strategy_decisions_json
    And the eed committed error_details should contain exception_type
    And the eed committed error_details should contain traceback

  Scenario: Execute failure reports actual actor type in mode for eed
    Given a eed mock lifecycle service with strategy_decisions_json in error_details
    And a eed PlanExecutor with a failing execute actor
    When I eed run execute expecting failure on the plan
    Then the eed committed error_details mode should be the execute actor class name
