This logic currently lives in `WorkflowRunner`, but should probably be moved to a separate service to make fixing and extending safer and easier.