Completely Unacceptable and totally avoidable! I would be way beyond furious! Can your DS open the front door locks? how did your ex not know he would wake up and wander outside?
I have to Deadbolt our front door on days when DH is droping our DS at daycare because DS freaks out as i leave

I wake DS up if i have to go anywhere to get stuff for him, he drinks soy milk (has a dairy allergy) and i always try to have a spare on hand but sometimes it is unavoidable, if DH isn't home i take him to supermarket with me.