After digging through the code for a long while now I have a reasonably good grasp of how the upgrade code works. The short of it is that it works whether something is one-handed or two-handed and then what type of damage. To upgrade to the highest total damage for a unit the game engine looks for whatever weapons that falls into those two specifics then compares to the rest with the addition of any additional damage sources. Such that if you have an axe and a burning axe it should upgrade to the burning axe even though they have the same base damage, this works some times. I have found that if you don't change the base damage by a little above the previous one it doesn't always work.
Alright now with that out of the way, my question is such; With this understanding of how the upgrade code currently works, how is this going to work for LH with weapon damage types being removed? There is already the problem of staves not upgrading properly and axes not having thier own independent upgrade path, unless you make a separate damage type for them (which is a pain). There is also the problem of adding secondaries as well as mount to units that is currently impossible after training. This is a small annoyance that has bugged me and a few others I know as people would like not just their hero units to be effective for longer.