Per T87871#2464320, it's no longer practical to expose partial html snippets for <head>. Anything related to module loading should be loaded as a whole because we want to manage state across it. And this breaks if callers call them in the wrong order or if not all of them are called.
In order to ensure dependencies are not loaded twice, we also need to know which style modules are loaded before loading script modules, as such, there is basically no way to expose a partial like buildCssLinks. I want to deprecate and remove these methods. None of the four partials are called anywhere, except buildCssLinks and getScriptsForBottomQueue, these have one external caller: Flow.
$html = $wgOut->buildCssLinks() . $wgOut->getScriptsForBottomQueue( true ) . $html;
Can someone figure out whether this is still used, whether it still works, and how it can be done instead? It's seems unlikely to me that this is working properly. Where does this HTML end up being sent to? How can the client render that partial in a meaningful way?