Thanks! Castles II: Siege & Conquest? I never heard of this one. I'm going to have to go look that one up!
Regarding treaty with another kingdom, they should not be attacking any of your lands while the treaty is still active.
Are you sure the treaty didn't expire, or that a different computer attacked and then your ally attacked the computer? Just double-checking the conditions. I will look into it though and push out an update if I can replicate it.