What people must understand is what was signed was a "defence pack". That term will be used the same way the Article 5 of NATO works. If Saudia Arabia decides to go and attack Somalia ( for whatever reason ), then the pact will not apply, even for Somalia's military response back to Saudia Arabia.
However, if one day, out of the blue, Saudia Araba is attacked by Somalia, then the pact will apply.
Additionally, what this pact does, is remove the nuclear sabre rattling from Israel in any military show down that may constrain Saudia Arabia's military response to any aggression. It frees Saudia Arabia and its freedom of movement and decision making.
Alot of people are trying to suggest this means that Saudia Arabia "decides" when Pakistan goes to war, and that is not the case. It is a "defensive pact".