קינוי וסתירה [Kinuy U'Stira] Warning a wife not to be alone with someone, and then her being alone. If in fact after the warning and she is alone with that person, then she needs to go to the Temple and drink the "bitter waters". That is water that is mixed with the ink on which the paragraph on this subject is written in the book of Numbers, and a bit of the dust on the Temple. That is to prove her innocence. She can refuse to drink. The only reason for this is to give her a chance to show she is innocent and can continue to live with her husband.
Yet the Rambam says that if he sees her then he must divorce her and give her her Ketubah.
Rav Shach answers this question in this way. He says the Rambam means the husband is forbidden to stay with her because שוויה עליו חתיכה דאיסורא
I am having trouble understanding Rav Shach here because his seeing her being alone is not the same thing as seeing her actually committing the crime. So while קינוי וסתירה would make her forbidden to him until she would drink the "bitter waters" in the Temple, but here there was never fulfilled the conditions that would forbid keeping her.