Yeah, I meant the cleanup code here. You should at least log an error if the jobSet is empty but the stage is still in pendingTasks, waiting, etc. Otherwise, this will make it harder to catch such bugs.