Preheat the oven to 200°C and grease an 18cm springform cake tin.
Fry leeks, rosemary, and thyme in oil for 5 minutes, then add garlic for 1 minute.
Cook mushrooms and sage for 3 minutes, then cool, reserving 2 tablespoons for gravy.
Toast nuts in the oven for 8–10 minutes until lightly browned.
Pulse nuts in a food processor, then mix with the leek mixture, cheese, and seasoning.
Stir in three eggs until the filling is well combined.
Boil water and 80g butter in a saucepan until the butter melts.
Mix flours, salt, and egg, then combine with the hot butter mixture and chill for 5 minutes.
Roll out four-fifths of the pastry on a floured surface to a 5mm thickness.
Line the prepared tin with the pastry, easing it into the corners.
Trim the pastry edges, leaving a 1cm border.
Layer half the filling, then dried cranberries, then the remaining filling into the tin.
Brush the exposed pastry edges with beaten egg.
Roll the remaining pastry into a lid and cut to fit with a 1cm border.
Seal the lid onto the pie, cut a steam vent, and bake for 20–25 minutes.
Remove the tin, glaze the sides with egg, and bake for 15 more minutes until golden.
Glaze the top again, add frozen cranberries, and bake for a final 5–10 minutes.
For gravy, melt butter and cook the reserved mushroom mixture and tomato purée for 2 minutes.
Stir in yeast extract, flour, rosemary, and gradually add the vegetable stock.
Boil and simmer the gravy for 10–15 minutes until thickened.