I have had numerous instances where an AI with allies declares war on me, but their allies do not, and they are still allied after.

Surely this is a bug? If I do not declare war if an ally asks me to, we are no longer allied.