Talk to the local AHJ before starting the work. If possible have the inspector come out to the job site before starting todo what you gave a price to do. Then get permit forand do only what you gave a price to do. Let the GC take the hit for any others hack work. After the inspector writes up any other work give the GC a hefty price to fix it. Just make sure that any work you do is not part of any write up.
Most inspectors will work with you if you give them a heads up and let them see the hack work before you touch it. They will also let you know if and what they may require you to fix before passing your work.
Good Lck


ed