Pokemon spawn's CP is non-random and determined by trainer level
tl;dr Two trainers capturing the same pokemon spawn at the same level get pokemon of the same CP. So, while it might be random between spawns, any single spawn is the same for everyone of the same level.
My wife and I play Pokemon Go together a lot. Yesterday we spent quite a bit of time capturing the same pokemon spawns. Our levels overlapped for the majority of it; I'm pretty sure that the Venonat is the point at which I caught up in level (see the gallery for context).
The CP for every pokemon we caught from the same spawn when we were the same level is identical. So, each individual spawn is assigned a value, which is determined by a function of the Pokemon trainer level without any extra randomness added in for individual trainers.
Just thought that piece of information with proof might be helpful in some way.
Posted Jul 14, 2016, 2:06 AM UTC · edited
There's definitely a piece of code that is executed which works something like this.
Pokemon spawns, a list is created. Value 1 in the list is random(0-1). Value 2 is random between 0-2 and etc all the way up to 0-max trainer level. You then encounter a pokemon and an equation runs on your phone which is something like this. Pokemon cp = 10 + (pokemon global variable) * [trainer level](spawn list).
If you're level 13 it would grab the 13th value in the spawn list, generated random(0-13) when that pokemon spawned. A higher level does not guarantee a higher CP, but the random value in the spawn list had a higher potential max. And they will all be the same for the same level.