If we do what I propose on the worker-side of the house and make this, ensureSync the only real entry point to logic here, I think the pairing of ensureSync/addAlarm could potentially be simplified.  One of them will have to become slightly smarter, but the other one can then get dumber.