Preheat the oven and a large baking tray to 180°C/350°F/gas 4.
Start by making the pastry. Sift the flour and xanthan gum into a food processor, add the margarine, vegetable shortening and a pinch of sea salt, and pulse until the mixture resembles breadcrumbs. If you don’t have a food processor, place the ingredients in a large mixing bowl and cut together with the flat of a knife.
Add 2 tablespoons of cold water, pulsing as you go (or stirring with a flat-bladed knife, if making the pastry by hand), until the mixture begins to pull together to form a dough.
Tip the pastry into a large bowl (or keep in the same bowl, if making it by hand) and, using your fingertips, pull together into a ball. Knead lightly for about 2 minutes or until smooth and elastic.
Shape the pastry into a ball and place between 2 large sheets of clingfilm, then roll it out into a circle slightly larger than the tart tin and no thinner than 3mm. Peel off the uppermost sheet of clingfilm and carefully flip the pastry into a deep 23cm tart tin. Peel away the remaining clingfilm and gently press the pastry into the sides of the tin, filling in any cracks with pastry and patting it flat with your fingertips. Trim the edges and set aside.
Next, prepare the potatoes. Peel and cut in half, quartering any large ones. Place in a pan of salted water and bring to the boil. The second the water begins to boil, time the potatoes, allowing them to cook for 4 minutes before removing from the heat and draining. Shake the potatoes in the colander a little to chuff up the edges – this helps them crisp up.
Pour 8 tablespoons of the groundnut oil into a large roasting tin, tip in the potatoes and 1 heaped teaspoon of sea salt and firmly shake to coat evenly. Set aside while you make the filling for the tart.
Finely chop the onion, crush the garlic, then finely grate the carrots. Trim the stalks from the chestnut mushrooms and slice into rounds. Halve 240g of the chestnuts (the rest will be used for the topping).
Heat 2 tablespoons of olive oil in a heavy-based frying pan until hot, add the onions and cook gently over a low heat until softened. Add the carrots, garlic, thyme and mushrooms, and fry gently until softened and all of the liquid from the mushrooms has been absorbed – around 10 minutes.
Stir in the cream cheese and halved chestnuts and mix together gently until the cheese has softened and formed a creamy mixture. Season to taste, spoon the filling into the pastry case then level the top.
Place the tart on the baking tray on the top shelf of the oven and the potatoes on the bottom shelf. Bake for 35 to 40 minutes or until the pastry is crisp.
Remove the tart from the oven, cover loosely in foil to retain its heat and set aside. Move the potatoes to the top shelf of the oven and increase the temperature to 220°C/425°F/gas 7. Continue roasting the potatoes for a further 25 to 30 minutes until golden and crisp.
For the gravy, heat the walnut oil and redcurrant jelly in a small saucepan, stirring until melted and smooth. Add the hot stock, bring to a simmer and stir in the cornflour. Simmer gently and stir continuously until you have the desired consistency. Set aside.
Finally, tear the wild mushrooms into pieces, roughly chop the remaining chestnuts and finely chop the parsley. Heat the garlic oil in a heavy-based frying pan until hot, add the mushrooms and fry gently until softened. Stir in the chestnuts, cranberries and parsley, and spoon over the tart to form a decorative layer. Reheat the gravy and serve with the tart and roast potatoes.