In the two years and four months since she arrived in Downing Street, Theresa May has become adept at kicking the Brexit can down the road – postponing the inevitable confrontation with the Tory right wing, and her intransigent DUP bedfellows.

She can delay no longer. Key cabinet ministers were summoned to No 10 on Tuesday night and a reading room was set up for them to pore over what May’s deputy, David Lidington, last week called the “product”.

For some weeks now, Brussels has been signalling the key obstacle to finalising a text of the withdrawal agreement – the divorce deal between the UK and the EU – lay not in EU27 capitals, but in Westminster.

The prime minister will learn on Wednesday around the cabinet table whether she has secured the backing of her ministers for the painstakingly drafted text and, most crucially, the Irish backstop.

Leave-minded ministers, not least the Brexit secretary, Dominic Raab, are known to have significant concerns about whether, and how, the UK will be able to extricate itself from what is meant to be a temporary, insurance arrangement but many fear risks becoming Britain’s de facto long-term trading relationship with the EU.

After weeks of increasingly bloodcurdling rumours about resignations and pizza plots, Downing Street is braced for resignations. May could probably withstand losing a minister or two, as she did when David Davis and Boris Johnson walked out after Chequers.

But any departures would make a fresh dent in the prime minister’s already fragile authority, and the storm of protest from Brexiters on Tuesday night, even before the full details had emerged, was partly aimed at influencing those who might be on the brink.

Even if the cabinet hurdle is surmounted without a hitch, though, May’s toughest challenges may still lie ahead.

She expects the EU to convene a summit in late November to sign off on the deal and then, most likely in early December, the drama moves back to Westminster, where every MP must decide whether they can support the deal.

Downing Street is betting that with a final deal in touching distance, a “new dynamic,” as Lidington put it last week, will seize aloft those MPs who might be contemplating disloyalty and carry them into the government lobbies.

“It will no longer be a question of some hypothetical outcome, to which anybody might wish to add or subtract their own political preferences, but a pair of documents that will have been agreed and endorsed by the government of the United Kingdom, and by the 27 other governments of the member states of the EU, led by politicians of left, right and centre,” Lidington said last week, in the Isle of Man. “There will be a product on the table”.

The chief whip, Julian Smith, who has been poring over the numbers in parliament for months, told reporters in a dimly-lit Downing Street he was “confident” of winning support for the deal.

Yet two crucial bundles of votes – the Democratic Unionist party’s 10, and those of the European Research Group (ERG), anything up to 40, already appeared to have slipped beyond Smith’s reach.

Steve Baker, the ERG’s ruthless tactician, was marshalling his troops in parliament’s central lobby, with Jacob Rees-Mogg and others pouring scorn on a deal they have not yet seen – and even appearing to question May’s honesty.

It was particularly unfortunate timing for Smith that the government was forced to concede in the Commons on Tuesday over the publication of Brexit legal advice after the ERG and the DUP joined forces to back Labour. It may have been a taste of things to come.

Much of the wrangling over the backstop in recent weeks has been with the aim of placating the DUP. If the government has failed, Smith will be forced to try to win over an even bigger group of Labour defectors to get the deal through.

And Jo Johnson’s resignation last Friday was a stark reminder for the government that it is not just Brexiters who are unconvinced about her strategy, but some remainers, too, concerned that sliding into the backstop by default is a betrayal of the mandate May has relentlessly promised to uphold.

Dire warnings from the whips about the risks of no deal may yet help cajole some, or even many, of the waverers. But as the Brexiters dominated the airwaves on Tuesday night, the parliamentary arithmetic looked shaky, to say the least.

And if the prime minister loses that meaningful vote – which now looks to be in early December – what happens next is anyone’s guess.

Labour would table a vote of no confidence – which she might well win, given the ERG have insisted they would back her, despite their loathing for her deal.

And then the outcome depends on who you ask. Brexiters say she will be forced back to Brussels to ask for Johnson’s super-Canada deal; remainers insist she can be bullied by parliament into holding a second referendum; George Osborne’s former righthand man and veteran of the financial crisis Rupert Harrison thinks the backdrop of plunging markets could change enough minds to get a modestly tweaked deal over the line at the second time of asking.

And some senior Tories maintain No 10 would go for one final, dramatic roll of the dice – and call a snap general election.