I can't find this bug. If you fire on an NPR, they will declare you hostile immediately. There may be a situation, as I suspect happened in the original report, where an NPR turns hostile but won't fire on a population without STOs. Some NPRs will avoid planetary bombardment in favour of ground attack.
If you have time, attach it to your post above - your save in the middle of the battle.
The enemy fleet was over my planet and did nothing. I shot him with rockets, and there was no reaction to this. Generally. No attempt to fly away, no attempt to get close to attack.
I can list a number of other things that may not be bugs, but this is definitely what is a flaw in the AI logic:
1. It seemed to me that the template of the main ships of the enemy for 30 years has not changed. These are all the same ships, with the same tonnage, speed, and weak railgun armament. But the enemy built several dozen more of just such ships.
2. Being armed with railguns, this type of ships did not try to use it against missiles.
In principle, this can be explained logically - if they do not have sensors that can see my missiles ... But this is rather stupid.
If there are no such sensors on this ship, what prevents the AI from adding to the fleet consisting of such ships - several ships capable of detecting incoming missiles?
3. The civilization with which I am at war does not have any missiles at all. Neither anti-ship nor anti-missile. This allows me to destroy their ships from a distance just by shooting at targets. The only "difficulty" I face is to calculate the number of missiles so as not to waste extra ones.
If only they used their railguns for defensive fire against my missiles ... but that doesn't happen either.
4. Well, with the logic of the division of the AI fleets, something needs to be done ... Perhaps I could not have destroyed their entire fleet together (I would have run out of missiles and my slow rocket platforms would not have escaped), but I could easily deal with several parts of their fleet.