At some level you have to trust a sustained strong majority of elected officials.
You could imagine requiring a referendum if the war goes past N years or something.