Swalwell had the good fortune that there was no Republican in the primary race. Besides Stark, the only other candidate was Chris Pareja, who had no party preference. Pareja, who spent no money, got 21.7% of the vote, while Swalwell got 36.2% and finished top two. Since Pareja wasn't a Republican, he likely didn't get as high a percentage of the Republican vote that a registered Republican would have. There are some Republicans who'll only vote for a Republican, but if there's no Republican they might go with the Democrat over an NPP.
Stanford anesthesiologist Vanila Singh has entered the CA-17 race as a Republican. In the 2012 primary, Republican Evelyn Li got 27.6% of the vote, while Charles Richardson, an NPP, got 5.7%. There were only three candidates, a Republican, Democrat, and NPP. So we don't know if the Li and Richardson vote was purely right leaning independents and Republicans or if there were anti-Honda Democrats in there.
Li's percentage in the general election actually declined to 26.5%. Honda's percentage jumped from 66.7% in the primary to 73.5% in the general. At first glance, this might mean that Richardson's votes will go to a Democrat. I'm not so sure. California primary electorates are notoriously more Republican than general electorates. Li and Richardson had 30,079 votes to get their 33.3% in the primary. Li got 57,336 votes to get 26.5% in the general. The general just had more Democratic voters and that pushed Li's percentage so low. If Singh matches Li's percentage, Khanna may have a rough time finishing top two. He'll have to get a substantial percentage of Democrats. That'll be difficult to do against a long time incumbent who has endorsements from the entire Democratic establishment. If Singh gets the 33.3% that Li and Richardson got, Khanna will have to actually beat both Singh AND Honda in the primary to advance. Swalwell didn't beat Stark in the primary. I see that scenario as unlikely.
Khanna's best hope is that there's at least one more Republican on the ballot. If you look at similar districts in 2012, like CA-27 or CA-38, you'll see that "some dude" Republicans will split the vote. I'm not advocating anything underhanded here but if Khanna wants to assure making top two, someone from his camp could call one of his big money tech executive supporters and that tech executive could find a registered Republican and get him on the ballot. Okay, I am suggesting something underhanded, but it's not like anyone from Khanna's camp reads this blog, is it?