In this game Sindria declared an expedition with a saturation bombardment over fuel export market shares (is that even a vanilla thing? I've never had that happen before) at a starting rep of around +40. Because I was offended by that I parked in orbit of Sindria with the intention of annihilating as many of their fleets in the skirmish as possible. I fought the two fleets of the expedition separately since they trundled in there one by one. After the second fleet plus a lot of other guards were defeated the remains (like 1-2 ships) of the expedition fleet engaged me again, I wiped the floor with them and everybody they ever loved again but after the battle and the pursuit I get the rep penalty as if I had declared war. Even though the start of the battle told me there would be no rep penalty and it didn't ask me about declaring war either.
Personal theory: There were no ships of the actual expedition force left by the time the pursuit happened so the pursuit counted as a battle against the regular forces?
While this game is modded I think this was a result of the base game's mechanics.
The log doesn't seem to contain anything useful.