I'll chime in on this one to say that whenever I OK a batch of upgrades suggested by the adviser it seems to upgrade my spaceports to large spaceports while it's at it.

This is handled by the policies. You can change how much population you need to build medium or large spaceports. Just set the settings for large spaceports ridiculous high and it should take care of that problem.

But I shouldn't need to. If the retrofit adviser is saying I need to update my medium spaceport because I have improved components, it should do just that, upgrade my medium spaceport to the new medium spaceport model. It should not upgrade to a large spaceport without my say so.

I'm not sure there is any retrofitting being done. I know I spend money sometimes, but I'm not sure that all (or even any) of the ships (which ones exactly? not clear) are being retrofitted when. (Do I spend the money and then accidently cancel some or all retrofitting if I should accidentaly click a ship (which one?) which may have been given a retrofit command?)