A day of reckoning on trade legislation -- designed by Congress to deal with our massive trade deficit by attacking our partners' unfair practices -- is nearing.

As is, according to key administration officials, bills produced by both the Senate and House are unacceptable, and the inclusion of the worst parts of either would make a presidential veto certain.

But in September, after the late-summer recess, a Senate-House conference committee will try to rewrite the legislation, backing off the highly protectionist House bill and the somewhat less obnoxious Senate bill that, nevertheless, departs from traditional American free-trade principles.

As Commerce Secretary Malcolm Baldrige said the other day, "For 40 years, this country took the leadership for free trade. If we start to go the other way toward protectionism, the political will all over the world {to resist protectionism} would inevitably lessen. We'd see the whole world go backwards, and we would be hurt the worst. That's a difficult point to get across.

"When you live with trade as I have for the past 6 or 7 years, you feel it and see it so strongly that you can almost taste it. We have to get a bill out {of Congress} if we're going to sign anything that doesn't start us on the road back."

For all of the rhetoric contained in the legislation, the Overseas Development Council notes, the House bill "does not create mechanisms to effectively change the unfair trading practices of America's main trading partners. Arguably, no single piece of legislation could achieve this objective."

Even the leading protectionist in the House of Representatives, Democratic presidential candidate Richard Gephardt (D-Mo.), admits that "about 80 percent of the $160 billion trade deficit is our own fault" -- that is, not attributable to unfair trade practices of some other government."

In other words, if Gephardt's provision or other punitive measures in the prospective legislation work the way they are intended, they would deal with only 20 percent of the problem. But how effective would the Gephardt amendment be?

Most experts in business and trade believe that the Gephardt threat won't work: To meet his requirement that offending nations cut their surpluses 10 percent a year for four years, the affected countries would not buy more American goods -- as Gephardt predicts -- but would cut their own exports. Japan, for example, would be happy to set up export quotas, like the one limiting auto shipments here: Cartels are a great way to maintain high prices and profits.

The effect of the Gephardt measure would be to give inflation here a new lease on life, while other foreign suppliers not zapped by Gephardt would take up some of the supply gap. That's precisely what happened when the United States established quotas on color television sets from Japan: American companies didn't get the business -- but Korean, Taiwanese and other Asian exporters did.

"The trouble with the Gephardt amendment," says U.S. Trade Ambassador Clayton Yeutter, "is that it attempts to solve a macroeconomic problem with a microeconomic approach."

Incidentally, it has become fashionable for those who tout "fair trade" or "reciprocity" to sneer openly at free trade and free-traders as lamebrained at worst and outdated at best.

Thus, although the record shows that the United States enjoyed its most productive years under a free-trade banner, and while there is plenty of proof that protectionist retaliation never works, Gephardt didn't hesitate to say in a New York Times op-ed piece:

"Critics of the {Gephardt amendment}, as well as President Reagan, may choose to worship at the altar of a false and rigid free-trade ideology at the expense of American workers, farmers and businessmen. But count me out."

Prodded by Sen. John Danforth (R-Mo.) and Sen. Donald Riegle (D-Mich.), the Senate has tried to defang the Gephardt amendment. They have introduced language to maintain its harsh intent by mandating presidential action against countries with "a consistent pattern of import barriers," but retaining considerable presidential discretion.

By an 87-7 vote, this second cousin of Gephardt would allow the president to decide whether to retaliate, unlike the Missouri congressman's requirement for dollar-for-dollar retaliation against unfair trade practices.

The Danforth-Riegle proposal is nonetheless welcomed by Gephardt because it almost assures that some provision dictating presidential action against countries accused of persistent unfair trade practices will survive the Senate-House conference.

Privately, administration officials seem ready to swallow the Danforth-Riegle proposal -- although still threatening a veto if other objectionable features stay in the bill.

The precise degree of protectionism that the conferees will risk injecting into the bill -- as they try to avoid a veto by Reagan -- may be determined by the monthly trade figures. Hopes of a steady improvement in the global trade picture have been dashed by the May U.S. deficit of $14.4 billion, reversing two months of decline, despite the edge that was supposed to accrue to the United States from the rising yen.

Experts are still convinced that the underlying trend is favorable, especially for U.S. exports of manufactured goods. Census data show that estimated exports in the second quarter are up 17.7 percent in value from the third quarter last year.

A good record for the next two months might help squeeze some punitive language out of the bill. A bad record could toughen language -- tilting things toward minimal presidential discretion -- thus accentuating chances for a veto. At best, the legislation is going to require some retaliation that will stir antagonism among our trading partners. At this stage, free traders can do little but keep their fingers crossed, hoping that the disaster won't be complete.