Overall, in my experience the AI handles Spies fairly well.
I've personally found that the AI hasn't focussed on victory stopping actions, like targeting your Spaceport, as often as I feel it should if it was focussed on being a proper "speed bump" to the player. It will do these missions, but not consistently. And not, that I can detect, more frequently when you lead in the space race, which is when a player would be more likely to do them. But that's the side effect of an RNG dictated mission system. Plus some players would complain if the AI was more focussed on stopping the leader, and so far there's been no distinguishing AI behaviour between Deity and King.
The partisans action I notice because it's a combination of jarring and useless. A couple of heavily armed rebel units that spawn in my otherwise well managed and happy empire, and that either get killed on sight or rampage a couple of improvements or buildings. If you don't know they're coming, they could actually knock out your Spaceport themselves, since it has no buildings and so the district can be pillaged on the turn they pop up before you react. But if you do know that's a possibility, it's easy to render it a non-threat. So like all well-managed empires, I camp my military on the edge of my Neighbourhoods and station airplanes overhead. Which itself looks jarring and reminds me while playing of the possible raise partisans missions.
It's some combination of having to guard the suburbs, while knowing that the urban core would never rebel, being able to avoid the whole situation by just not building Neighbourhoods in the first place, and wondering why the AI is wasting time sending it's Spies on this mission when there are so many other more useful things it could be doing that makes the Raise Partisans mission stick out for me in what is otherwise a fairly well functioning system.