In general, Waymo keeps track of all nearby vehicles and pedestrians and shows them on the car's nav system. I've been in one before when it detected a cyclist coming from behind, and it gave clear warnings both audibly and visually, although I don't know whether it actually locked the door.