One thing I have noticed about the rogue missions is that the longer you're in them, the more likely your ally is to turn on you.
In all the missions, except one, that I've had where my ally goes rogue, it usually happens after 8-10 minutes. Only once did my ally turn against me, but that was literally within the first 30 seconds.
If I'm able to kill the enemy AI within 7 or 8 minutes, my ally doesn't turn.