Next week's congressional election is coming none too soon for the sake of national security. Another week or two of Ronald Reagan's domestic political efforts to win the hearts of angry Midwest grain farmers and idle workers at the Caterpillar tractor plant in Peoria might have erased the last vestige of coherence in his geopolitical efforts to stick it to the Soviets.

Not that there's all that much coherence left. Not only has the president promised to lavish more surplus American grain on the Soviets than the Soviets can possibly swallow. Not only did he open up another burst of outrage from European allies over the glaring contradictions between his grain trade policy and his campaign to throttle the Europe-to-Siberia natural gas pipeline. He even managed to give away the plot of a promising but delicate diplomatic effort to resolve that contradiction.

The game now afoot would trade off the future for the past. The idea is to work out a common allied policy on sanctions or constraints on credit terms for technologically sensitive equipment, and energy. With the future thus assured to Reagan's satisfaction, the United States would ease off on what it sees as past transgressions: pipeline contracts already signed by the Europeans, including U.S. subsidiaries and licensees.

But the whole point was not to put it so baldly. The French, in particular, insist that they should not be asked to make future concessions in order to stop being punished for doing, by their lights, nothing wrong. Yet that's pretty much how Reagan put it in Peoria, when he said he would "enthusiastically consider" a pure and simple tradeoff of the anti-pipeline campaign in exchange for agreement on other ways of squeezing the Soviets without squeezing the allies.

The damage is not irreparable. The diplomats will probably be able to work out a concerted allied policy that can still get the Reagan administration off its pipeline kick. U.S. policy would then have a certain logic: American agriculture is so stunningly bountiful that it is ruining the domestic market; Soviet agriculture is so abysmally inefficient that the Soviets badly need to import grain; the obvious solution is for the Soviets to buy surplus American grain. With what? With the foreign exchange earned from Soviet sales of natural gas to Europe.

There's only one hitch: if that's how it works out, there will be little left of the philosophical and ideological underpinnings of Reagan's approach to dealing with Russia.

To see why, put yourself in the Kremlin. You see a U.S. administration that believes the Soviet system is on its last legs, hard-pressed to sustain a massive arms buildup -- but no less dangerous and expansionist-minded on that account. So the Reagan policy, as you see it from the Kremlim, is to match Soviet rearmament, while applying political and economic pressure to turn the Soviets away from foreign adventures and inward to deal with their own economic and systemic failures.

If there is some incongruity in the lifting of Jimmy Carter's partial grain embargo, one explanation you hear is that it had no real effect. You know better. Not only did the Carter embargo seriously disrupt familiar grain trade patterns, but your country could have used even more grain than it was able to scrounge up elsewhere.

Neither are you impressed by the Reagan argument that paying cash on the line for grain is all that painful. You know how much more it would cost to reform your agriculture economy to make it self-sufficient.

And you are also confident that, one way or another, the Siberian natural gas pipeline is going to be completed pretty close to schedule. So you will have that extra foreign exchange for making up grain-food shortages in the years to come.

So where (from the Kremlin) do you see the "linkage" that President Reagan said he was going to insist on? Even as your Polish puppets are tightening the screws, you behold the American president extolling America's amber fields of grain and inviting you to partake beyond your capacity to pay -- while looking for a way to free up construction of a pipeline that will improve your capacity to pay. Perhaps the "linkage" will be found in allied agreement to follow Reagan's lead in future dealings with Russia: to condition credit terms, technology transfers and energy policy on Soviet behavior.

But you know all too well to what extent that runs counter to the deeply held convictions of American allies on the desirability of trade connections with Russia and the inefficacy of economic sanctions.

Looking at all this from the Kremlin, you might be baffled. But you would hardly be bowled over.