At long last, after much painful debate, we have a budget agreement, only a half step in the right direction. The nation still faces a deficit of about $254 billion this fiscal year -- up $34 billion from last year, despite a $41 billion reduction from what it otherwise would have been.

It's like taking on almost two buckets of water in a leaky boat for every bucket desperately bailed out.

The final budget deficit count of $220.4 billion for last year is more than double the $91 billion originally forecast by President Bush, who indulged in his notorious "no new taxes" deception, pretending that the deficit could be kept under the Gramm-Rudman-Hollings $100 billion target. A weak economy coupled with rising S&L bailout costs laid to rest Republican mythology that the nation could "grow its way" out of the deficit.

Moreover, each and every one of the above deficit results or projections is understated by about $100 billion. That's the amount of the annual cover-up derived by tapping Social Security and other government trust funds. Thus, the prospective deficit for fiscal 1991, "reduced" to $254 billion, is really over $350 billion.

The new legislation promises about the same gross reductions in the deficit -- $1.4 billion more in the first year, $8 billion less over the five years -- contained in the defeated package Oct. 5.

But whether or not the deficit-reduction targets are met for later years remains to be seen. One imponderable is a little-noticed shift of power for enforcing the targets from Congress to the White House. When Congress wakes up to what it has agreed to, it is likely to howl that its prerogative to decide whether spending has exceeded a ceiling was stolen in the dark of night.

Meanwhile, the defense budget remains bloated despite the end of the Cold War. And Congress still meekly bows to powerful lobbies, as witness $2.5 billion in new tax breaks Sen. Lloyd Bentsen (D-Tex.) won for independent oil and gas drillers.

Overall, the Omnibus Budget Reconciliation Bill passed Oct. 27 is modestly improved over the one approved by the budget "summit" leaders but wisely voted down by the House Oct. 5. Democratic leaders, stung by the criticism from rank-and-file members, showed they could place more of the burden for reducing the deficit where it rightfully belongs: on taxpayers of means. They didn't succeed fully in that goal because Bush made clear he would not sign a tougher bill.

The danger always existed that the Oct. 5 deal would prove to be the best available. But those who called for defeat of the first package can take some satisfaction from the changes forced by congressional Democrats. As the Brookings Institution's Charles Schultze -- who held his nose and backed the summit compromise -- now concedes, the bill sent to President Bush is "a better package because it is more progressive."

Significantly, the new legislation doesn't open up vast new tax loopholes. The original package deserved to be defeated because it created an entire new category of tax shelters that would have cost the Treasury at least $12 billion, benefiting only top-bracket taxpayers. Meanwhile, middle-income families were threatened with the triple whammy of higher Medicare costs, boosted Medicare payroll taxes and regressive excise taxes.

On balance, the tax structure will be more fair. For example, the 1.45 percent Medicare tax will cover wages up to $125,000, a boost from the present ceiling of $51,300. That is more equitable than the proposal in the defeated package, which would have capped the tax at $73,000 in wages.

Still, there are disappointments: it would have made more sense to raise the top marginal rate to 33 percent, instead of providing a new bonanza for accountants by cluttering up the tax code with the pretense that the top rate is 31 percent, except for new limits on deductions and personal exemptions. And a differential for capital gains -- a 28 percent rate -- has been reintroduced, which could make it easier for future Congresses to extend this benefit and re-create the tax-shelter industry.

Where the first package was too tough on Medicare recipients, this one is probably too lenient. Senior citizens should bear a larger share of the total entitlements burden, preferably by paying a full tax load on their Social Security income (over some threshold, to ensure that the elderly poor aren't hit). That will require greater political courage than either party has yet demonstrated.

The sour taste over petty wrangling between the White House and Congress remains. While American voters may exact a high political price from some incumbent congressmen next week -- and ultimately from Bush -- the main cost to the country can be measured in a down-rating of America by its allies and investors abroad.