This is a common situation on many 29er frames (and other frames that are very small) – the toptube has to be mitered to both the head tube *and* the downtube. This is known as a compound miter, or compound joint.
Of course, almost all frames have at least one compound miter – at the bottom bracket shell, where the downtube and seat tube usually (though not always) overlap as well. There are two ways to make a joint like this:
-Join (weld or braze) one tube completely, then miter the second tube to fit and weld it. This is how most high end frames are made. Generally the seat tube is completely welded to the BB shell, then the downtube is mitered to the seat tube. At the head tube end, the downtube is completely joined to the headtube, and the toptube is then mitered to fit. You can see the portion of the weld that I’ve completed (the top of the DT/HT joint) sticking out under the toptube in the photo.
-Miter everything, lay the tubes into place, and then tack/weld around all the exposed portions of the joint. This is common on cheaper bikes, because it’s quick (the second tube doesn’t have to be mitered to take into account the weld bead from the first part of the joint), but it’s also weaker and can end up causing weird problems like odd noises from the unjoined but contacting surfaces of the tubes rubbing together.