(CNN) The Senate last week passed an appropriations package that includes a resolution to continue current funding the federal government through December 7, which, if signed, would avert a government shutdown at the end of this month just weeks before the midterm elections.

The chamber passed the bill 93-7.

The House is scheduled to vote on that package Wednesday. The House is expected to pass the bill by a large margin as well. It will then be up to President Donald Trump to sign the bill -- or veto it and force his own government shutdown over his frustration by the lack of funding for a border wall.

This spending package is not just the continuing resolution. It is also the defense appropriation bill -- i.e. the funding (at a significant increase) for the Pentagon. It also includes the Labor, Health and Human Services and Education funding bills, which Democrats desperately want passed. Attaching these things together -- in total an $855 billion funding bill package -- was done intentionally by congressional negotiators. First, it makes it extremely difficult to vote against for both parties. Second, and most importantly, if the President wants to veto this continuing resolution, he'll also be vetoing funding for the Pentagon -- funding his defense secretary has made clear the department desperately needs after a decade of continuing resolutions.

What will be funded by the continuing resolution: The President has already signed into law a $147 billion "minibus" package of bills that included military construction and Veterans Affairs; the legislative branch; and energy and water appropriations bills.

The outstanding bills, beyond Defense, Education, Labor and Health and Human Services, would need to be addressed in October and November. Those include Interior and Environment; Financial Services; Housing and Urban Development; and Agriculture -- which have already been passed as a "minibus" in the Senate, but it hasn't been completed in the House. The continuing resolution would also include Homeland Security; Commerce, Justice and Science; and State and Foreign Operations measures, where negotiators are significantly further apart, aides say.

The timing

The bill will likely reach the White House on Thursday. which is shaping up to be a very busy day due to the follow-up hearing scheduled with Trump's Supreme Court nominee Brett Kavanaugh and Christine Blasey Ford, the woman who accuses Kavanaugh of sexual assault in the 1980s when both were teenagers. (Kavanaugh has denied the allegations.)

The deadline: The government runs out of money at 11:59 p.m. ET on Sunday, September 30. The President will have until Sunday night to sign the package. But with House GOP leaders considering leaving town this week until after the election, there will be an emphasis on the President signing the bill by Friday, aides say.

The wall

The continuing resolution maintains the administration's request for wall money -- $1.6 billion, which Democrats have agreed to in the negotiations.

There was a blowup earlier this year, according to several sources with direct knowledge, in the Oval Office when the President found out that was his administration's request actually was -- he thought it should be much higher and suggested at least $5 billion. That's a non-starter in the Senate, where Democratic votes are needed. So Republican negotiators brushed him off -- and made clear they were technically complying with the administration's request. The full appropriations bill that would include wall funding has not been agreed to by negotiators, so it would make up a central piece of the continuing resolution.

The politics

House Speaker Paul Ryan and Senate Majority Leader Mitch McConnell have repeatedly made clear that the appropriations process the past few months has been stunningly successful -- lawmakers are further along in the process before the September 30 deadline than they have been in years.

The driving force for that is Trump's threat to veto any omnibus that comes his way. Intentionally or not, that threat has driven a sense of bipartisanship that has led to real, tangible results. Still, with the funding bill that addresses the wall (under the Department of Homeland Security) not completed, the top congressional Republicans have made clear that the political fallout of a shutdown, even a small one, would be potentially devastating a little more than a month before the midterm elections.

Trump has referenced this argument from these Republicans repeatedly in recent weeks, and has mostly said that while he doesn't necessarily believe it, he plans to go along with it.

The dynamics

There is a small group inside the White House -- congressional aides and administration sources say it is spearheaded by policy adviser Stephen Miller -- who make the case that this may be the last time the President has any significant leverage on a spending bill. The House may flip in November, and with Democrats in control, or about to take control, there would be no chance of future wall funding. The thinking, as it has been described, is that makes it worth having the fight (i.e. a shutdown) now.

Supporters of this argument disagree with congressional Republicans' assessment of the politics and believe the wall, and immigration in general, is an animating issue for the base voters they need in a midterm election. Put those two things together, and their calculation is now is the time to fight. Trump has referenced this argument -- and noted that he, in many ways, subscribes to it -- in public remarks and tweets.

But there are more senior White House officials who have made clear they believe it's the wrong path at a moment where any chaos -- perceived or otherwise -- would be devastating given the midterm numbers they are currently seeing. Those advisers agree with GOP leaders that it's a fight that should be pushed off until after the election.

Will there be a shutdown?

Aides -- and lawmakers -- are almost resigned to the fact there will be a shutdown in December. There's a reason the continuing resolution goes to December 7, instead of later in the month -- negotiators wanted to build in a few weeks before the Christmas holidays in case they have to continue working, aides say. Granted, it won't be the scale of past shutdowns -- by that point as many as nine appropriations bills will have been passed and signed into law. So the shutdown impact will be limited -- if lawmakers can agree on the third minibus, more than 90% of the government would be funded through the fiscal year. But with the measure including the Department of Homeland Security far from completion, most acknowledge if the President is going to force a fight, there's not much they can do about it.

What if the President decides to veto the spending bill package this week?

It's certainly his prerogative -- one he's toyed with on Twitter and rallies repeatedly in the last few months. White House officials have repeatedly assured their congressional counterparts in recent weeks that Trump will sign the package. Trump himself has assured Ryan and McConnell on several occasions he's on board with their plan, and his focus has moved to frustration with other non-spending measures moving through the chambers right now, sources say. But it's up to him -- and top congressional aides admit that when it all comes down to it, nothing's a sure thing with this White House.

That said: Take a look at the House vote margin when the package is voted on this Wednesday. It will likely be a significant number in both parties in favor of the bill. Conservative members of the House will likely vote against the package on spending grounds -- several outside conservative groups have already registered their frustration with the spending agreements and their increases. But the defense money, coupled with the Democratic priorities in the other bills in the package, mean it should pass easily. Big votes in both chambers send yet another message from Congress that another shutdown is not welcome, just in case the President decides he wants to fight or to change the subject.

A way to look at it: The government funding process -- in recent years the center of high stakes, epic fights in the halls of Congress -- notably has not been that at all the last few months. It has been an arduous, yet significant, if quiet, bipartisan success story of 2018. And the President is an equally significant reason that it has all come together -- something Republican leaders have repeatedly emphasized to him behind closed doors, sources involved in those conversations say.

Think of it like a train

So perhaps the best way to look at it is this: don't view this week as the typical end-of-fiscal-year trainwreck when it comes to actually getting the government funded.

View it as the train is just about to pull into the station after a very lengthy and surprisingly amicable trip. The President, when the bill gets to his desk, has the option of hopping into the conductor's seat to ease it into its final destination. Or he can run it off the tracks, into a ditch filled with explosives he set, then personally detonate them on himself and his party. He would have his reasons, as laid out above and as he's referenced multiple time sin recent weeks. But they are reasons most of his top allies on Capitol Hill -- who have mostly been in lockstep with him on everything - vehemently disagree are valid at this point in the campaign cycle.