Every election year brings a few wild surprises, and the biggest this year so far happened Tuesday night in the Bronx-Queens congressional district that had happily sent Rep. Joe Crowley off to the House of Representatives with no complaints for two decades.

In the 2014 midterm election, Crowley won 50,000 votes. On Tuesday night, he received fewer than 12,000 and lost in a 58-42 blowout to Alexandria Ocasio-Cortez. She was a Ted Kennedy intern and later Bernie Sanders organizer, member of the far-left Democratic Socialists of America and (most impressive) second-place finisher nationwide in microbiology at the Intel Science Fair back in high school.

Party leaders in Albany concocted the cockamamie idea of running a mid-June primary for national races while saving the statewide races for the usual September primary. This decision to create a deliberately small voter pool is an old-time cynical ploy designed to give incumbents like Crowley an insuperable advantage — because low turnout almost always favors candidates who have institutional support.

Almost always. But not always. In this case, Ocasio-Cortez quietly played a series of cards against Crowley — Hispanic vs. white, leftist vs. liberal, young vs. old, female vs. male — that built her a 15,000-voter following apparently invisible to him and his team.

That was enough to finish him off. I suspect that had he been paying sufficient attention, Crowley could have ginned up another 4,000 voters from the Democratic Party’s database in a district where he received 150,000 votes in November 2016.

The tiny size of the electorate, Crowley’s incompetence and Ocasio-Cortez’s charming personability should be enough to ensure we show caution about assigning too much meaning to this one outlier result.

But there are aspects to Ocasio-Cortez’s ideological approach that do offer us a crystal-ball view into the Democratic Party’s future.

The issues she ran on include single-payer health care, an end to the use of fossil fuels, a guaranteed income, the abolition of the national immigration enforcement bureau, and free higher education.

Columnist Noah Rothman points out that there is no way to pay for all this and so her platform is dead on arrival. And that is true. Crowley, the congressman she defeated, is a member of the House leadership that refused to support a “Medicare-for-all” bill Bernie Sanders had proposed last year.

But the question is: Which of these proposals would Crowley or other party leaders be willing outright to say is wrong or misguided? By this point, you would be hard-pressed to find any leading Democrat who would not support single-payer in theory, at the very least, and I imagine the same would be true for the entire issue set.

There are so-called “red-state Democrats,” like Sen. Joe Manchin, for whom much of this would be anathema, but he represents the party’s past, not its future. Ocasio-Cortez is its future, and the future is some form of socialism.

She is also its future because she is the embodiment of what Democrats want their party to be: identitarian, diverse, socially but not ideologically inclusive, fourth-wave feminist and possessing an element of radical dismay at current economic and social conditions and the belief that active measures of some sort need to be taken to overthrow the present and radically redirect the country’s course in very short order.

The technical specifics of her victory may not be duplicable. But Alexandria Ocasio-Cortez is now the vanguard of the Democratic Party.