There's no supposed. I believe the developers themselves confirmed it a while ago, and even then its a simple check to perform. It's not set up before the mission, however, far as I've seen. I wouldn't have nearly the kind of knowledge though to make a solid claim on it.
There really isn't any other way to manage or prevent save-scumming though, aside from making the game auto-save on a single file (same as your normal save) every action. It can be manipulated slightly though, as the chances are locked to your actions. If you move five spaces to half-cover, and fire at an alien with a 90% chance to hit and miss, for instance, if you repeat that same action you will miss again and again. However, if you move six spaces to half cover (right next to it) and fire at the same alien with the same 90% to hit, you'll likely hit. Hell, enemy behavior pretty much falls into this as well, considering often times they'll repeat the same exact things if you do.
It seems to go off a list, that alters itself based on actions taken by the player. It can't predict everything the player will do right before the mission, so it sets all the actions possible for the next turn or two in stone, as the mission goes on.