For the dough: Combine flour, 1/2 teaspoon salt, and baking powder in a bowl and mix well. Add egg, sour cream, water, and canola oil and knead by hand or in a stand mixer fitted with dough hook attachment for 8 to 10 minutes.
For the potato filling: Mix together the potatoes, goat cheese, red onion, chives, salt, and pepper, to taste. Add the heavy cream as needed to adjust the consistency.
For the caramelized onions: Cook the onions with 3 tablespoons butter very slowly over low heat. Season the onions with salt, freshly ground black pepper, and chopped thyme.
For the truffe creme fraiche: Roll dough into 1/8-inch sheets and then cut 2-inch circles out of that. Place heaping tablespoon of filling onto each circle and fold into half-moon shape. Seal with beaten egg.
To serve, gently saute pierogies in olive oil, top with onions and creme fraiche.
The potatoes should have the feel of stiff mashed potatoes.