Swalwell was able to contest Stark after the primary due to a new primary system in California, under which the top two vote getters advance to the general election, regardless of party affiliation.
Swalwell was able to contest Stark in the general election because of a new primary system in California. Under that new system, the top two primary vote-getters (Stark and Swalwell, in this case) advance to the general election, regardless of party affiliation.