The farewells began well before the hearings ended. The tone was set Friday with Sen. Paul S. Sarbanes' questioning of Defense Secretary Caspar W. Weinberger, the last witness.

"There was," Sarbanes said, "a junta in the White House . . . . A coup, in effect, had occurred."

Weinberger, who hardly ever agrees with the Maryland Democrat, was happy to concur. Exactly, he said, and expanded on "people with their own agenda." Both sides of the exchange overlooked the fact that the person who sets the agenda is none other than Weinberger's old friend, the president.

Sarbanes' observation was a welcome echo of what the president has been saying since the black day of Nov. 4, an election that brought a margin of 10 Democrats in the Senate and a spiteful story in a little Middle Eastern periodical about his sale of arms to the ayatollah.

The idea of Reagan as victim has been assiduously peddled by "RR," as he was often designated in documents that escaped the White House shredder. The biggest boost for the theory came from John M. Poindexter, his national security adviser, an admiral whom it is all but impossible to imagine at sea, or even in a rowboat.

When the official valedictories by the four leaders of the committees investigating the scandal were spoken, the "junta" and "coup" strains sounded throughout, providing music to the ears of "RR," who was, it seems, taken in by disinformation from aides, who are nonetheless lovable, dedicated, well- intentioned patriots and, according to Attorney General Edwin Meese III, should not be punished.

The first speaker, Dick Cheney (R-Wyo.), led off with a perhaps predictable paean to the president for his exemplary cooperation with the committees. Cheney, by far the brightest of the Republicans chosen for the committee, seemed hobbled by his past as a White House chief of staff (under Gerald R. Ford) and his desired future as leader of House Republicans. House Democrats recruited committee chairmen to investigate the scandal. Republicans preferred dim-witted ideologues, all notable room-emptiers except for Henry J. Hyde of Illinois, a gifted and shameless demagogue, who was occasionally entertaining.

Cheney said "mistakes were made," but not just at the White House. To hear him, it seemed as if Rep. Edward P. Boland (D-Mass.), the quiet, respectable author of the Boland Amendment banning contra aid, had precipitated what some mistakenly thought was a "grave constitutional crisis."

If Congress cuts down the number of people the president has to inform about covert action, it will never happen again, Cheney said.

Sen. Warren B. Rudman (R-N.H.), whose breezy pugnacity made him a favorite with the listening audience, praised the president, too, cleared him of any guilty knowledge about the diversion of arms profits to the contras and absolved Meese of any taint of a cover-up.

The Tower board, through no fault of its own, Rudman said, missed one element: "the extent to which power was abused by a very small group of individuals."

House Chairman Lee H. Hamilton (D-Ind.), who gave stern and often enlightening summaries after every major witness, seemed somewhat burned out at the end. He carefully reviewed the principles of policymaking and accountability. It was all very abstract, with no mention of liars and con men.

Senate committee Chairman Daniel K. Inouye (D-Hawaii), the most restrained and self-effacing chairman in the history of the art, was at least specific. He named names, but he went the "junta" route, too. And he conceded defeat: "We may never know with precision and truth why it ever happened."

The message from Congress to Reagan was, "Come home, all is forgiven."

Congress has been lied to, berated, patronized, needled, baited and, in the case of Lt. Col. Oliver L. North, mugged by witnesses.

But because the president has thrown two rascals out and replaced them with rational men, Congress is ready to start over. It is grateful to Reagan for not making them impeach him.

Congress, like a battered wife, will take back the abusive husband. He fell among evil companions, that's all. She will give him another chance. Divorce, like impeachment, can be so messy.

The upshot could be an increase, among citizens less concerned with Reagan's peace of mind than with their government, in cynicism. And a better chance for contra aid. Indictments? "RR" said the other day he couldn't see that any laws were broken.

It was the way it always is when the legislative and the executive go to the mat, an uneven and unfair contest between the single-minded and the anxious. The people will have to decide what it was all about.