I’m digging out from some deadlines and still a little behind, but on first impression it certainly looks like the White House and the McCain/Warner/Graham faction have done an admirable job of working out their differences.

Early predictions that the President was getting rolled seem to have been greatly exaggerated. And the McCain bloc got its principles validated without disabling the CIA program, which they have always maintained was not their intention. (On that score, it should be noted here, for example, that during the December 2005 debate over the Detainee Treatment Act, Senator Graham took the lead among those who protested that the Supreme Court’s disastrous Rasul v. Bush decision was allowing defense lawyers to undermine effective interrogation of detainees.)

“Grave breaches,” the kinds of heinous abuses that should be prosecuted if they are visited on detainees during questioning or otherwise, will be spelled out in the war crimes act. The president, whose interpretation of treaty obligations is supreme in our system, will also issue orders outlining lesser forms of abuse that, while they will not result in prosecution, are to be avoided. Our interrogators will know what the rules are, and variations from them will be the subject of internal discipline. The check will be congressional oversight — al Qaeda will not be permitted to sue the CIA civilly for alleged abuses.

On military commissions, it’s still a moving target as Sen. Graham and Chairman Duncan Hunter of the House Armed Services Committee hash out what remains of their disagreement about the use of classified evidence at commission trials. But the good news is that 95 percent of the problem has been resolved: there will be military commissions and intelligence methods and sources will be rigorously protected.

We should all stay tuned for the fine print and through the continuing debate, but it sure looks like the President stood his ground.