Thinly slice the onion and roughly chop the mushrooms.
Heat the oil in a frying pan, add the onion and gently sauté for 5 minutes. Add the giblets, thyme and the mushroom, cook for a couple of minutes until the giblets change colour.
Add the port, cranberries and enough water or stock to cover the giblets. Season with salt & pepper.
Put a lid on and gently cook for 25-30 minutes, until soft. Turn the heat up, take the lid off and add the cranberry sauce. Reduce the sauce to a thick, chutney-like consistency. Let it cool. Chill or freeze until needed.
Preheat the oven to 180°C.
Roll out the pastry and cut it into rectangles/squares or stamp out circular shapes.
Using smaller, similar shapes gently stamp a line into the tartlets creating an approx. 10mm border (these will puff up).
Put the tartlets onto a lined baking tray.
Spoon some of the duck mixture in the middle of each tartlet, then spread out to the border line. If you want a crusty edge brush it with the egg.
Bake for 25-20 minutes or until golden brown.
Serve warm or at room temperature.