Roof stresses are often linked directly to foundation problems. When a foundation drops or begins to sag, the weight-bearing properties of the house are changed and the roof is often the portion of the building that begins to suffer from the awkward tilts and drops that result. This turns into roof leaks and buckling, connecting foundation damage and roof damage with very similar symptoms.
Because of the link between foundation and roof damage, a foundation repair should not cause a roof to buckle -- it should actually solve further buckling problems. If you notice your roof buckling after fixing your foundation, the problem probably occurred because of the foundation issues, and although the roof also needs repairs, with both sides of the issue dealt with the problem should be permanently fixed. A sound roof that starts to buckle after repairs indicates a different type of trouble.
Foundation repairs often include not only replacing sagging walls but also adding new posts and beams to provide your house with extra support. When this works well, the foundation problems are fixed and future problems are prevented. But adding new support changes how the house deals with weight stresses, and poor design choices may cause extra pressure on the roof, which can lead to problems such as buckling.
When a foundation sags, plumbing and vents that lead up to the roof will fall with it. When a foundation is repaired, the pipe flashing does not always follow the roof back into a proper state. The result is new openings in your roof that can cause leaks. These leaks can lead to rot and other moisture problems that can cause your roof to buckle.