waiterbot_state_manager: adds logic and type fix