CA can be a real pain. Obviously if you have a smog shop that follows the law, any mods , spacers, changes will lead to a fail - even if it passes all the sniffer tests.
The only work arounds are:
Go to a smog shop that is not so anal about the visual check - then a spacer may pass the sniffer. You will need to clear any codes and then drive a lot so the sensors reset and show "ready" on the smog machine.
I had luck years ago with running almost pure ethyl alcohol in the tank when I had trouble passing my audi 2.7t. Got it from lowes, poured in a gallon on an almost empty tank and warmed everything up - burned SUPER clean. Then went straight to the pump and filled up.
I also have my cars registered at my cabin up in the mountains. That county does not require a smog check every two years. SO unless I need to sell the car, I could (if I wanted to) do whatever mods I wanted after the purchase smog.
Of course, yesterday I came across a pop-up rolling smog check station on the road. The CHP and Smog techs were flagging random cars and doing smog checks right on the road side. Didn't know CA did that. Scary.