Feature: PlanApplyService branch coverage for handle_merge_failure logger path
  As a developer
  I want to cover the missed branch at line 426→432 in plan_apply_service.py
  So that branch-rate reaches 1.0

  # The missed branch is the exception-propagation path from the
  # self._logger.error() call inside handle_merge_failure (line 426).
  # When the logger raises, execution skips the ``return plan`` on line 431
  # and exits the function via the exception (line 432).

  Scenario: handle_merge_failure propagates exception when logger.error raises
    Given pas_branch a service whose logger.error will raise RuntimeError
    When pas_branch I call handle_merge_failure and capture any exception
    Then pas_branch a RuntimeError should have been raised
    And pas_branch the plan error_details should still contain merge_conflict
    And pas_branch lifecycle _commit_plan should have been invoked before the error
    And pas_branch lifecycle fail_apply should have been invoked before the error

  Scenario: handle_merge_failure returns plan when logger.error succeeds
    Given pas_branch a service whose logger.error will succeed normally
    When pas_branch I call handle_merge_failure normally
    Then pas_branch the returned plan should not be None
    And pas_branch the service logger.error should have been called with merge failure details
