Pretty sure it's regional and might be different from county to county. Probably controlled by the air resources board. In my area they usually require to pull the dog house and often charge if they have to do it. On my last test, I told them to be careful with the computer mounted on dog house and they skipped it. I asked what they were looking for and the kid said some people make mods like delete the EGR or install aftermarket turbos. Turbos...really? That was a new one on me. They didn't say anything about the aftermarket cold air box.
Also if you use a engine tune and remove it you, it will still throw a code until a drive cycle is completed. Takes a bit of time and it's kind of a PITA. Good old California.
2006 Ford 6.0PSD EB-50/E-PH SMB 4X4 Rock Crawler Trailer
Sportsmobile 4X4 Adventures
..........On and off road adventures