I was trying to figure out if overspeading in social and military project gets refunded. That is, if a planet spends more production capacity than needed to finish the current item, will the extra production cost refunded? Due to this game misbehavior, I have yet to find the answer.
Military-no, it's wasted.
Social-no, but it counts towards the next project you build on that tile-all social production used towards building it does, so long as it actually costs something to upgrade to the new building. That is, upgrading a discovery sphere (250) to an industrial sector (400) nets you a discount based on what you've already built (but then that 250 is already given credit for and if you were to overbuild with something else it would need to be >400 to get a discount, which would be 400-250 or 150), however if you for instance build a starport over anything, you don't get a discount on it and it is set to an upgrade cost of 50 production-which is incidentally more than a starport costs to build on an empty tile.
The reason for the disparity is that the game calculate the expense (and maybe income) incorrectly.
Instead of summing up the cost for one turn, then build everything, the game first builds everything, then uses the updated production queue to calculate production cost. When you finish one building and the queue is empty, you are not actually charged the building cost.
I noticed this, but wasn't ready to post it yet. Right now I'm trying to determine (not that my perspective has anything to do with it) just exactly how large of a bug it is-and I think it's smaller than I originally thought.