Yep, current stable Windows build.
The issues with the damage not updating correctly is a known bug that I think someone Mantised already -- it tends to not update the current damage of the AT once loaded until you quit back to the main menu and reload the save. The class that does most of the stat setting, which this code is from, ForegroundUnitTypeImmutable appears to run once at game load when it sets up all the ships/structures that your combo of expansions and settings have permitted.
It's definitely not based on the DPS of the ships inside, I remember seeing a post from Keith a while ago that mentioned people doing silly things like sticking dozens of Science stations in them (I see Bognor's post pulls up the patch notes that covered that), or Hacking modules when those were transportable (he patched that last one, that was a flat out exploit since they are free). I haven't tracked down exactly what value it's pulling there -- the class all this stuff is in is almost 60,000 lines of C# so navigation is somewhat challenging.
I haven't found where the GetEffectiveNumberOfSecondaryShots function gets called after startup either, IF it gets called after startup -- it's a unique name so it should turn right up when searching across the whole assembly if something specifically fires it. As far as I can tell, nothing outside of its host class does. But there does seem to be some updating that happens without having to reload a save, albeit buggy, so I suspect there are certain points where the game may retrigger the whole damn class. Likely candidates would be from a class I saw that handles monitoring the population of ships on each planet as that runs periodically.
Tracking down the specific reference may take me a while, most of these core classes are... somewhat north of "enormous" in size, and the FUTI class is heavily used by just about everything, so searching for refs to it turns up a number of hits that's not practical to walk through. I need to see if I can get my decompiler to spit out a list or something so I can try to do some tricks to filter out the obvious crap.
Frankly I may be better off trying to trace it in the ~1M line Assembly language dump I have -- sometimes I find it easier to work with, weirdly enough.
We'll see, the hunt continues.
Interesting that the damage/volley that you're seeing is nearly perfectly double the expected amount, that almost sounds like it's taking the base value from that formula and then feeding it back in again. That's probably not supposed to happen...
Can you describe exactly when you're noticing the ATs updating their damage and when they're not? What happens if you load your game, move an empty one to an enemy planet, load it up there, then shoot something WITHOUT moving through a wormhole? Does it do damage that's more in line with the expected amount? Less? More? What happens when you move it through a wormhole and shoot something on the new planet? Does the damage suddenly double?