WASHINGTON — The worst of the federal cuts to a major infant nutrition program would be reversed. Embassy security and construction could be spared in the wake of the consulate attack in Benghazi, Libya. And child care subsidies, once seen as critical to the success of welfare reform, would take a haircut, not the hammer blow that President Obama once loudly warned was coming.

With the expected Senate passage this week of broad legislation to finance the federal government through Sept. 30, a lucky few programs will be spared the brunt of the automatic spending cuts now coursing through the federal government. Also, managers in some departments, especially the Defense Department, will gain more flexibility to carry out cuts.

The overall size of the cuts will remain the same, as will the short-term impact on the economy, because total spending outside of entitlement programs like Medicare and Social Security must remain beneath a hard cap of $984 billion. One program’s gain in the spending bill will mean another’s loss, caution the Democratic and Republican authors of the bill, which the House seems poised to pass as well.

The bill is a mixed blessing for President Obama and others, especially Democrats, who hope Congress will eventually reverse the recent cuts. The changes make the cuts less arbitrary and damaging in the eyes of many independent experts. They reduce the effect on programs that touch national security, child health and welfare, but they inhibit long-term economic growth, through science funding and other areas.