For Mr. Schumer and his fellow Democrats, it allows them to claim big increases in spending on social programs, health research and education initiatives. Republicans can celebrate a big boost in Pentagon spending and a military pay raise. Both sides want a surge of pre-election spending to combat opioid abuse. Passing the bills allows Mr. McConnell to declare that the Senate can be productive under his guidance, while also providing embattled Democrats in red states a chance to secure some victories. Everybody wins.

“This is a rare moment when it may be in the interest of both parties to get something done, and it shows,” said Mr. Schumer, who called the appropriations harmony the “mirror image” of the court fight.

By banding together, lawmakers can also fend off complaints from the administration that they are overspending by exceeding the White House requests in many areas under a two-year budget agreement struck in early February.

The key element was a leadership deal to fight off killer “poison pill” amendments that have scuttled appropriations bills in recent years. Senate leaders have a deep aversion to forcing politically vulnerable members of their party to take difficult votes. The result has been that the spending bills were essentially drafted in leadership suites at the last minute, drawing complaints from the majority of members who were cut out of the deliberations.

“We need cooperation from both sides to process amendments while resisting the temptation to turn the appropriations process into a free-for-all on all manner of policy issues,” Mr. McConnell said last week. “But this year, that’s exactly what we are doing.”

The Senate has already passed seven of the 12 annual spending bills and faces a major test this week with two more. The health and labor measure has always been a magnet for polarizing votes on abortion and is likely to be the same this year, leaving the leadership challenged to move the measure forward. If the Senate can pass that bill and an attached Pentagon measure, it will have, by Mr. McConnell’s account, tentatively approved funding for 87 percent of the government — a real achievement for the Senate these days.

Notably left out of the collection of measures being considered by the Senate is the bill that funds the Department of Homeland Security, which would contain money for President Trump’s border wall. Spending levels are sure to be a sticking point in talks with both the House and the White House. The House has already called for $5 billion for the wall, while the Senate has moved to allocate $1.6 billion — the amount, senators note, sought by the White House.