So truck wont IDLE right or failing smog? Cause you mention both and I'm confused.
Did anything happened while trailing? You mention "I took it out on some local tails and the next time i drove it it wouldn't idea." How long in between from trail run to being driven the next time? Same day/1 week later?
Did the tech print out the readings? If so, whats your number at? If you have high nitrogen oxides, than that will refer to your EGR.
My opinion you failed is because of your cat are not working or you didn't heat it up enough.