Looks like calling wg.Add(1) from a goroutine can cause a race condition with wg.Wait() - can be easily avoided by calling Add() before the subroutine is created.
References https://todo.sr.ht/~michalr/hswro-alarm-bot/10