Yes, she would be exempt. However, if you file a joint return, with her claiming residency, then she is treated as a resident for the entire year. If she is treated as a resident for the whole year, then she would be subject to residency rules.
In order to get the penalty removed, you will need to request an exemption.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"