"""Estado de un runner de simulacion o pipeline de larga duracion."""

from enum import Enum


class RunnerStatus(str, Enum):
    """Maquina de estados para un runner de simulacion o pipeline de larga duracion.

    Transiciones validas:
        IDLE -> STARTING -> RUNNING
        RUNNING -> PAUSED -> RUNNING  (resume)
        RUNNING -> STOPPING -> STOPPED
        RUNNING -> COMPLETED
        RUNNING -> FAILED
        STARTING -> FAILED
    """

    IDLE = "idle"
    STARTING = "starting"
    RUNNING = "running"
    PAUSED = "paused"
    STOPPING = "stopping"
    STOPPED = "stopped"
    COMPLETED = "completed"
    FAILED = "failed"
