Here's what I found:
When you equip a transport with weapons (what I'm using has black hole generators, hyperwarp engines, and 5 advanced troop mods - I haven't tried this in a fresh game yet) and send it to a DEFENDED planet which you're not currently at war with... after the declaration of war you automatically invade the planet without choosing any options for planetary attacks and *completely* bypassing all defenders that planet may have. The behavior (by the look of it) is that the declaration is because you're attacking their units, but once you get past that the game reads that you have a transport attacking a planet, so skips straight to the invasion screen. I've reproduced this attack different people.
I have a save game documenting this as well... though it should be easily reproduced.