If U.S. District Judge Charles R. Richey wants to lay claim to judicial genius, he won't get an argument from me. In his handling of the D.C. Fire Department's affirmative action plan, he (to quote a friend) "out-Solomoned Solomon: sawed the baby in half so deftly that both ends remain alive."

Officially, both Mayor Marion Barry and the Justice Department's William Bradford Reynolds are disappointed. My sneaking suspicion is that both are relieved. I say this because I (naively, no doubt) cannot bring myself to believe that the two combatants truly mean what they seem to say: that test scores and other objective measures don't much matter, that only racial results count (Barry); or that actual results are of no consequence, so long as the rules are theoretically fair (Reynolds).

The plan Richey ruled on called for strict numerical goals for hiring and promoting minority and female firefighters until their numbers, overall and by rank in the department, reflected their incidence in the population. For Barry, who backed the plan, it was a way of redressing the department's racist history. If the hiring and promotion system had been fair all along, the plan assumes, blacks, who constitute two-thirds of the local population, would hold more than 38 percent of the department's jobs. But Barry must, if he thinks about it, doubt the fairness of promoting a predetermined number of blacks to each grade even if the top scorers in the promotional examinations are white.

For Reynolds, who has been urging jurisdictions across America to reopen long-settled affirmative action disputes, the only way to achieve the colorblind ideal is to take no account of race now. Still, he must wonder whether the applicant who scores, say, 89, on an entry- level test has shown himself to be a better prospective firefighter than the one who gets 85. It may be fair to eliminate those applicants who fall below some established cutoff point, but it makes no sense to me to rank the remainder strictly by scores on a written test.

It apparently didn't make much sense to Richey, either. His Solomonesque ruling left standing that part of the D.C. plan that proposed to hire black and white firefighters in the same proportion as they pass the entry test. In other words, the test would only provide a list of qualified applicants on a pass-fail basis; if 40 percent of the qualified applicants were white, 40 percent of the new hires would be white. That part pleased Barry.

But Richey found it unacceptable not to take test scores into account for promotion purposes -- particularly since the city's own administrative law judge had found the promotion test to be "valid, job related, nondiscriminatory, objective." As Richey put it, "The white firefighters have earned the right to expect to be able to reap the rewards of their many years of service and dedication, without having those rewards stripped away solely on the basis of race." That pleased Reynolds.

The ruling also pleases Local 36 of the International Association of Firefighters, which claims disinterest in mere applicants but insists that promotions ought to be based solely on merit.

It may take a while (though perhaps not much longer than the disallowed promotion plan) before the officer ranks reflect the makeup of the community. Is that really a fatal flaw? Does anyone, including architects of the affirmative action plan, really believe justice requires the local department to be 50.2 percent female?

What is wanted is a competent, well-run department with a hiring and promotional system that works to overcome historical racism without punishing whites who were no part of that shameful history. The Richey compromise is an important step in that direction.