What makes you think cops can't be in plain clothes?
That might be a defense on the charge of not stopping or perhaps resisting someone you didn't know was a cop, but it doesn't make anything that transpired as you described here invalid. The same with him "identifying" himself.
The most likely don't need your statements about eating the blunt. THey have the residue. They witnessed you doing it.
You can discover the evidence against you (best to let your lawyer handle this) prior to the trial.
If you want to beat this, it will take a lawyer (and a good one). Nothing apparently improper here.
Notice that depending on what sort of "government job" even a PBJ will adversely impact you.
You are severely deluded if you believe the cop has to jump through hoops to allow you time to eat the evidence.