Shabbat 102 - Building
If one threw an object on Shabbat but, while the object was still in the air, remembered that it was in fact Shabbat, and the dog ate it in mid-flight, he does not bring a sacrifice - because the sacrifice is only brought when the violation is done while forgetting about Shabbat, from the beginning to the end.
This rule seems to have two cases mixed up! - Rav Ashi explained that indeed, there is a missing part in this ruling, and in the corrected version there are three cases: throwing the object that a dog ate (no sacrifice), remembering about Shabbat in midair (no sacrifice), and immediately forgetting about Shabbat (there is a sacrifice and it helps).
If so, why still teach the old ruling and not the corrected one? That is because each such ruling has a spiritual secret in it, and it also has a practical application. The spiritual secret is the more important one, so when they come into conflict, the ruling is taught according to it, at the expense of the practical application, which has then to be amended.
How much does one have to build on Shabbat to be liable? - Any amount. How can any amount of building be useful? - A poor may build a small hole to keep is money in it. Corresponding to this, they would store needles in the Temple's curtain. - No, that's a bad example, because we have a Temple rule: "There is no show of poverty in the place of opulence." Rather, a poor may want to fix a very small hole. And what would be a similar labor in the Temple? - They would fix a small hole in a beam that a worm has eaten - because all prohibited Shabbat work has its source in the building of the Temple.
Art: Winslow Homer - Dog on a Log