To make the dough, combine the flour, sugar and kosher salt in a stand mixer fitted with a paddle. Add the cubed butter, distributing it all over the top of the dry ingredients, and then dollop in the cream cheese (1-inch dollops should do it, but it doesn't need to be perfect). Turn the mixer on low and stir until the mixture is mostly mealy and there are still some larger clumps of butter and cream cheese intact. Continue mixing and add the yolks, vanilla and almond extract if using. Continue mixing until the dough comes together. Divide the dough in half and shape into discs. Wrap tightly in plastic wrap and refrigerate for at least 1 hour or up to 2 days.
Melt the chocolate in a double boiler while stirring or in a microwaveable bowl in 30-second increments, stirring after each. Set aside to cool briefly while you roll out the dough.
To form the rugelach, working with one dough disc at a time, roll it out on a lightly floured surface, dusting with flour as needed to prevent it from sticking, until it is a wide rectangle, 18-by-9-inches. Use an offset spatula to spread on half of the chocolate in a thin even layer, leaving a 1-inch border along the long edge that's furthest from you (try to work quickly so the chocolate doesn't harden). Sprinkle on the halva. Brush the 1-inch border with a thin layer of egg wash and then start on the end closest to you and roll the dough into a long tight log, placing it seam-side down. Transfer to a cutting board or baking sheet and refrigerate for at least an hour or up to 2 days (depending on fridge space, you might want to cut the log in half so you're dealing with 4 shorter logs as opposed to 2 really long ones). If you're only refrigerating for an hour or 2, no need to cover the logs. If longer than that, cover with plastic wrap.
To bake, preheat the oven to 375 degrees F. Line 2 baking sheets with parchment paper.
Brush the logs with a thin layer of egg wash, sprinkle with a few pinches of flaky salt and a ton of sprinkles or colored sugar if desired. Cut into 1 1/2-inch slices and transfer to the baking sheets 1-inch apart. Bake until golden brown on top; begin checking for doneness at 24 minutes. (You might notice that the cookies seem to sweat and leak out some fat while in the oven, this is completely normal). Let cool on the pans for 5 minutes and then transfer to a wire rack to cool completely. Or enjoy them warm! Leftovers can be stored at room temp for several days.