I never said gunpowder weaponry ended cavalry. I said knights. That's a significant difference, in the same way that there's a difference between a castle and a bomb-proof bunker. There's superficial similarities, but conceptual and tactical differences.
See previous post vis a vis simplification and no one single cause.
Oh yes, I agree. If you had mages from the beginning of human history, you wouldn't have a society that's anywhere close to medieval Europe.
In the alternate history community it's called "butterflies" (as in butterfly effect) and dealing with it is an issue that authors deal with in different ways. Some authors want to throw in Richard Nixon as a used car-salesman, even if it doesn't make completely realistic sense. Likewise, I want to have medieval feudal culture with fighting golems and basically wanted to explain as "Okay, we're starting at normal fantasy. Here's how we're getting over to golem armor."
If we're going with "mages since the beginning", the basic formation would probably be closer to "mage plus bodyguards" - combined arms out of necessity since there's a limited number of mages and they're very lightly armored. I still think there would be a need for some sort of shock unit, even if heavy cavalry was never developed. A few 2 ton golems would probably serve well, though golems might be regulated to a support role (similar to tanks in WWI).