If you plant a seed shortly before the end of shabbat (zoraya) and then un-bury it after shabbat, or you put an uncooked food into an oven and then take it out within seconds without it having baked (ofeh). Have you transgressed a melacha or not?
One of the principles enumerated by the Tif'eres Yisra'el in Kalkeles Shabbas to be liable is that the mal'achah done has to endure; if it doesn't endure, he is not liable for it (though it is still forbidden). However, he says that for some mel'achos, among them planting, one is liable for them even if it doesn't endure. (I did read in the name of the Aruch that a person is liable for planting even only if it endures; however, I can't remember where I read that and I can't find a reference to that Aruch.)