Is there a maximum allowed time for a house to be built?
In the U.S., each state “adopts” a Code. The Code requires a Building Permit” for construction. If you look in the “definitions section”, you’ll see that a “Permit” is for a “specific activity.”  

I’d check the original Permit Application and see what was included (and not included). In the U.S. there is a “disclosure law” that requires the seller to disclose POTENTIAL problems that could affect the value of the property being sold. If it wasn’t disclosed that the construction (“specific activity”) wasn’t completed, they are liable for the repairs. 

I’ve testified that the seller “should have known about dryrot, settling foundation, etc.”  If your house is not habitable, you have a great case.