To answer the question with what I believe happens technically and what I know happens during online sessions I've witnessed and tested myself, I thought I'd chime in here.
What I believe "technically" happens is that since most everything is on the local machine and only input, location and other aspects are sent over, most of the cheats will function. The cheats change variables on the local machine in memory that affect the local user... That's my uneducated take on it.
As for detection, I am sure they can write an algorithm that says "if damage exceeds x" or "if rounds fired exceeds x without reload", etc. but how do you do this when games can be "invaded" and not infringe on a person's privacy rights when they're just playing SP locally?
The times I've "used" the trainer in online mode was when someone hacked me when I was going about my side missions. Didn't friggin help other than when I shot at them getting away I didn't have to reload... LOL.
The CH trainer gives "unlimited health", but Godmode in the pure sense of the term, I don't think it is. Damage still registers whereas other Godmode cheats in other games often turn the player into superman and thus could be easier to detect? This is speculation.
As for unlimited ammo, items, etc. I'm not sure Ubi cares enough to write code specifically for online play that scans to see if their ammo count is moving or if that is something that is even part of the transmission to the cloud.
In other words, I don't think they can "detect" something online while you're playing like an alert going off, but rather they can have your computer monitor for certain situations and kick you off.
Now, it could be that if they do this that a message is sent back for moderators to scrutinize, but they'd have to be really careful with the implementation as this falls within the realm of data collection specific to the source and might call for a new EULA. It might be in there right now... Who reads that? LOL.
As far as everything working, I was interested to know what certain things "look" like from the other side because I too have seen people scurry by like Flash Gordon thinking "WTF?" The CH trainer doesn't have a super-speed thing, so who knows what that's about.
However, since they implemented the "hack a friend" thing, I was curious as to what certain mods look like rather than what the "cheats" looked like. Sure if you shoot someone in the face with a grenade launcher and he doesn't die, he's a cheater. Maybe they should just do a trainer-scan for when people initiate or join sessions? Who knows...
However, even if they find a way to somehow detect a trainer loaded in memory changing client-side variables, unless they made the whole game cloud-based, they'd have a tough time with mods that right now are just starting out.
I run a lot of graphic mods and sometimes get a kick out of playing as one of the NPCs in SP, but wanted to make sure someone didn't see that and go cry to the admins. However, when testing car AND WEAPON modifications just recently I was not very surprised they worked just fine and basically reaffirms my belief that most everything is client-based and cant "really" be stopped including the cheats. Anyone who mods this game will tell you, there is TOO MUCH crap to try and detect.
When friends and I goof around and want to test things, pick on each other with something stupid we made, it isn't like we can spawn our own server like we did back in the CS days, but none of us really care about the MP anyway.
Recently someone found the place where they store the skins the other side sees during MP as well. These object variables can be swapped out for the hash that suddenly makes you look like Clara, Bedbug or that naked chick I think... LOL. As long as the item is stored on the other client, that's what they'll see.
I still remember modifying a flight sim so that my plane used the skin of an office building and the sidewinder missile skin I replaced with a car and a moose of all things. So I was a Borg cube at Mach 2 firing woodland animals at my friend.
The point is, because the building item is not "new" from a reference standpoint, the other side can "see" it unless reference checks are involved which creates overhead and so on.
To test the extremes, I created a Robocop gun out of the D50... I make it fire 10 rounds with a 0.02 firing delay whereas the MP5 would have a 0.067, so you get that burst, rapid fire effect. I also made the bullets as strong as the M107 sniper rifle and just as accurate with clips that hold 999 rounds.
This is fun for SP, but I thought it would instantly crash an online session... Nope, this isn't like the old days where if you have a file the other side doesn't, the game crashes... What you generate is simply sent over the wire.
I sure as hell would never use that gun online outside a private session as it would be like waving a flag saying "hacker", but if someone found the variables for armor classes like how the toughness factor of cars can be cranked up, trainers will not be the cheater's choice anymore.
I think Ubi knows they can only do so much and players should cut them some slack, report the guy and just move onto the vast majority of players who don't use cheats or don't even know they exist.