"""Create recovery_planner
Generated by Phi-Octopus Eden
2025-11-05 22:54:18.755853
"""

```python
from typing import List, Dict


class RecoveryPlanner:
    """
    A class for creating a limited error recovery planner that manages tasks and their recovery actions.
    """

    def __init__(self):
        self.tasks = []
        self.recovery_actions = []

    def add_task(self, task_name: str) -> None:
        """
        Add a new task to the recovery planner.

        :param task_name: Name of the task
        """
        self.tasks.append(task_name)

    def set_recovery_action(self, task_name: str, recovery_action: callable) -> None:
        """
        Set a specific recovery action for a task.

        :param task_name: Name of the task to set the recovery action for.
        :param recovery_action: Callable function that will be called in case of an error during the task execution.
        """
        self.recovery_actions.append((task_name, recovery_action))

    def execute_task(self, task_name: str) -> None:
        """
        Execute a task. If an exception occurs, attempt to use a stored recovery action.

        :param task_name: Name of the task to execute.
        """
        try:
            print(f"Executing {task_name}...")
        except Exception as e:
            self.handle_error(task_name, e)
        else:
            print(f"{task_name} executed successfully.")

    def handle_error(self, task_name: str, error: Exception) -> None:
        """
        Handle the execution of a recovery action if one is available for the given task.

        :param task_name: Name of the task that encountered an error.
        :param error: The exception object raised during task execution.
        """
        print(f"Error occurred in {task_name}: {error}")
        if (task_name, self.get_recovery_action(task_name)) in self.recovery_actions:
            recovery_action = [action for name, action in self.recovery_actions if name == task_name][0]
            print("Executing recovery action...")
            try:
                recovery_action(error)
            except Exception as re:
                print(f"Recovery attempt failed: {re}")
        else:
            print("No recovery action available.")

    def get_recovery_action(self, task_name: str) -> callable:
        """
        Get the recovery action for a specific task.

        :param task_name: Name of the task to retrieve the recovery action for.
        :return: The recovery action callable or None if not found.
        """
        return next((action for name, action in self.recovery_actions if name == task_name), None)


# Example usage
def critical_task() -> None:
    raise ValueError("Something went wrong during task execution.")

def recovery_action(error: Exception) -> None:
    print(f"Recovery executed due to {type(error).__name__} error.")

recovery_planner = RecoveryPlanner()
recovery_planner.add_task("critical_task")
recovery_planner.set_recovery_action("critical_task", recovery_action)

try:
    recovery_planner.execute_task("critical_task")
except Exception as e:
    print(f"Top-level exception: {e}")
```

This code defines a `RecoveryPlanner` class with methods to manage tasks and their associated recovery actions. It demonstrates how to set up the planner, add tasks, specify recovery actions for those tasks, and handle errors during task execution.