I just updated the auto-replicate script to add in the zfs holds function so that snapshots that have been used to replicate a file system have a hold positioned on them so they can’t be deleted.
It manages the holds so that once you’ve sent a new replication stream to a destination it will remove the old hold and add one to the latest snapshot.
This should obviate the need to deal with missing source snapshots.
Note: you can still break the system by taking snapshots on the destination volume or manually deleting snapshots on the destination. But you shouldn’t be doing that kind of thing anyway…