The answers you require are likely found within your purchase agreement. Any contract should have outlined conditions that illustrate the guidelines for inspections, repair & repair limits, and voiding an agreement.
This is a conversation you should be having with your personal real estate representative. They should be able to answer your specific questions and guide you through this situation.
Regardless of the type of agreement used, there should be terms within it that protect all parties from being trapped in an experience that they don't want to and shouldn't be in.