With the Jerry Whitworth trial, the four known members of the John Walker spy ring -- and the dozen Americans accused of espionage in the so-called year of the spy -- have all been convicted. For these people, at least, justice was swift and sure. It was not always thus. Into the 1970s, most Americans caught spying were not brought to trial -- only two were indicted in the decade beginning in 1965. Instead, suspects were left in place and observed, used or ''turned'' against the Russians or otherwise neutered. The intelligence people preferred to go this quiet way, and the diplomats figured it beat making waves. With Jimmy Carter and then Ronald Reagan, however, the counterintelligence style changed. The priority became to prosecute -- and let the diplomatic chips fall where they may. Some 40 suspects have been convicted in the decade begining in 1975.

*Is this the right policy? The Walker ring is regularly described as the most damaging espionage conspiracy in decades. No doubt the losses were severe, though there is some consolation in that they seem to have fallen in the category of adding to the cost of business, not in the category of producing a defeat in the field. What needs to be measured in any broader judgment, however, is not just what was lost as a result of the crime but what will not be lost as a result of the prosecution. One large purpose of punishing criminals is to deter others. The intelligence people can make a case for dealing in their fashion with caught spies, rather than sending them to jail, but it is not a very persuasive case and it should not be applied as a general rule.

There is another calculation to be made. In the ''year of the spy,'' the United States lost secrets and some of its ''assets'' or spies in the Soviet Union. With the rolling up of the Walker ring and other cases, however, the Soviet Union suffered its own losses. Amid a general stirring and insecurity in the world of international espionage, moreover, Moscow saw some of its own agents defect. It must also cope with the measures of heightened vigilance an aroused West has begun taking.

*The most relevant lesson to come out of the last year's spy miseries is the importance of looking very closely at the kind of Americans who choose to spy for the Soviets. They tend to be, if you will, losers, nerds, people with money problems, personal problems, small people. Even the most intrusive counterintelligence effort aimed at political or ideological deviances would not likely pick them up. Alert and not unconscionably intrusive personnel screening could have a chance. It is unpleasant to acknowledge that there are Americans ready so casually to sell out their country, but it is necessary to confront that unpleasant fact.