I was wondering more what happens if you choose to keep the car and no repair ever enables it to pass smog.

California has provisions for cars that fail. They involve making multiple attempts to repair the car until a dollar limit is reached, then you have to go to a referee. And you are dealing with the DMV sloths the whole time, who will take your fees and not provide a tag until your car passes, or gets the exemption.
_________________________
Glenn