I was told by Sunrun that vent pipes (aka stinkholes) have to stick 6 inches above the roof plane if you do not have snow, but 12 inches if you do get snow.
I sent them this link, which indicates that the 6" can be reduced to 2" if solar panels are mounted above the stinkhole to prevent anything from getting into said hole from above.
Code-expert Glenn Mathewson details the commonly encountered issues with the nonelectrical code provisions for rooftop solar. Learn more, here.
www.finehomebuilding.com
They were already mounting my panels on 6" stand-offs instead of tile hooks, so I thought this meant they could cover the ever living hell out of my roof instead of working around the stinkholes.
But Sunrun's design team said they wouldn't research this stinkhole code thing on existing homes with Contra Costa County. And the County permitting department never called me back after I left a few voicemails with them. Sad.
Apparently it would break Sunrun's policy to shorten stinkhole vent stacks, and mount panels over the top of them (with some air gap). Not that it'd matter anyway, PG&E wouldn't let me get more panels because PG&E sucks.
Regarding the main panel upgrade... I had a ton of nonsense because my gas riser was within 36 inches of the main service panel. I think whether you have this gas riser problem or not, it may actually be cheaper to break up your project into two chunks. You can find one electrician to submit the permit and do all the work on the main service panel replacement with a solar-ready 200A (with 225A busbar). This way PG&E has no doubt in their mind your work on this part of the project is only for a main panel.
Once you have your fancy new main panel, get back in touch with Tesla and they'll be like - cool. When I was getting bids; Tesla wanted to charge way more for this main panel work than what a stand-alone electrician would have charged (this was before I learned my gas riser was too close to the MSP).