A senior White House official acknowledged yesterday that David A. Stockman's forthcoming book, "The Triumph of Politics: Why the Reagan Revolution Failed," may cause some political pain when it is published this spring. Others in the executive branch have spoken even more ominously about the potential impact of further revelations from the former director of the Office of Management and Budget. Stockman has indicated that he blames Republicans as much as (and in some cases more than) Democrats for the failure of the original Reagan program to produce the results it promised, particularly a balanced budget.

The senior official also confirmed that in late 1981, when President Reagan took Stockman "to the woodshed" to chastise him for his revelatory chats with journalist William Greider, then-Treasury Secretary Donald T. Regan -- never a Stockman friend -- was among those who urged his ouster.

Regan is unlikely to come off as a hero in the Stockman volume. Ironically, now that he is the chief of staff, it will fall to Regan to devise a White House response to the book when it appears in April.

The Spy Who Came In From the Court. . . Sources reported a big "M" flag, for mootness, flying above the Supreme Court yesterday as U.S. officials gave up Czech citizen Hana Koecher in a swap for Soviet dissident Anatoly Scharansky.

Across Berlin's Glienicke Bridge with Koecher went her husband, convicted spy Karel Koecher, and her Supreme Court case, which was argued last month. The case will be dismissed as moot because the Justice Department will advise the court that it is no longer seeking her testimony against her husband, who was imprisoned in 1984 on charges of espionage.

Justice had appealed a lower court ruling that said Hana Koecher could not be compelled to testify against her husband. The department argued that Hana Koecher's alleged involvement in the spying created an exception to the common law privilege.

Mixed blessing . . . The impending departure of Defense Secretary Caspar W. Weinberger's military assistant, Army Maj. Gen. Colin L. Powell, has touched off a talent hunt for a replacement among high-ranking officers. A leading candidate for the job is Vice Adm. Donald S. Jones, deputy chief of Naval operations for plans, policy and operations. Jones' selection would put a Navy leader in a key spot, but the Navy would be losing a coveted three-star billet to a civilian office.