- Whether the accused or co-actor was legally separated; and
- Whether the adulterous misconduct involves an ongoing or recent relationship or is remote in time.
What all of this means is that many incidents of "adultery" may not be considered a punishable "crime" in the military, unless the commanding officer determines that there is some kind of direct negative impact on the military itself. In other cases, the matter is best resolved in civil (divorce) court, just as it is for civilians.
In the civilian-world, it's easy to find DAs who are "harder" on prosecuting certain types of crimes in one jurisdiction than in another. For example, DAs in Nebraska are likely to treat possession of marijuana with a harder view than DAs in California. In the Military, commanding officers in different commands also often differ when considering the above conditions. Some commanders may give the conditions a more liberal view than others. Additionally, many people in the Military (including many commanding officers), feel that, as adultery is not a criminal offense in civilian life (it's handled by divorce courts, not criminal courts), so it should be in the Military.
In my experience, adultery is almost never charged as a "stand alone" criminal offense in Article 15 or Court-Martial actions. It is generally added on to the list of charges, only if the member is already going to be prosecuted for one or more other criminal offenses. For example, if the commander decided to prosecute a married Military member for the crime of writing bad checks, and investigation disclosed that the member wrote the checks in order to pay for a hotel room to have an affair with someone, the commander may decide to "tack on" a charge of adultery to the list of bad check charges.
This does not mean, however, that military members are free to shack up with whomever they please. Commanders have a lot of discretion when it comes to administrative procedures, and administrative actions (such as reprimands, denial of promotions, performance report remarks, etc.) are not governed by the relatively strict legal requirements of the UCMJ or Manual for Courts-Martial.
When the matter is resolved using procedures under Article 15 or administrative sanctions, the actions are protected under the Privacy Act of 1974. It's only a matter of public record if the member is punished by Courts-Martial. Under the Privacy Act, commanding officers are prohibited, by Federal Law, to disclose any Article 15 or administrative action, without the express, written consent of the Military member. Therefore, it's entirely possible that the member will be "punished," for committing adultery, and the complaining spouse will never know of it.