Heat the olive oil in a wide skillet over medium heat. Add the onion and pine nuts and cook, stirring, until the onion softens and the nuts turn golden, about 5 minutes.
Stir in the beef and cook, breaking it apart with a wooden spoon, until browned, about 5 minutes.
Mix in the spices and salt and cook 3 to 4 minutes more, until fragrant and crumbly. Transfer to a bowl and let cool.
Heat the oven to 375°F/190°C (convection).
On a lightly floured surface, roll the puff pastry into a rectangle. Spread the meat mixture along the bottom third of the pastry. Roll the pastry over the filling to the midpoint. Cut long slits in the remaining pastry, then fold it over the filling and tuck in the ends.
Transfer to a parchment-lined baking sheet, brush with the egg yolk mixture, and sprinkle with sesame seeds.
Bake until puffed and golden, 30 to 40 minutes. Let rest for 10 minutes before slicing.
Warm the olive oil in a skillet over medium-high heat. Add the onion and cook until lightly golden, about 4 minutes.
Stir in the mushrooms and cook until well browned and most liquid has evaporated, 8 to 10 minutes.
Add the turmeric, salt, and pepper, then stir in the flour mixture and 1½ cups water. Simmer until slightly thickened, 6 to 8 minutes.
Remove from heat and stir in the parsley.
Slice the bourekas and serve warm with the mushroom sauce alongside.