In Hostar Marine Transport Systems, Inc. v. U.S. Department of Internal Revenue Service, No. 08-2535 (Jan. 7, 2010), http://www.ca1.uscourts.gov/, the First Circuit held that the IRS's duty to treat all similarly situated taxpayers similarly is "aspirational.": "Despite the goal of consistency in treatment, the IRS is not prohibited from treating such taxpayers disparately. Rather than being a strict, definitive requirement, the principle of achieving parity in taxing similarly situated taxpayers is merely aspirational." (slip op. at 19).
The case involved a refund claim that focused solely on a due process, not equal protection argument. I would assume that if the basis for the IRS's disparate treatment were improper, as opposed to mere arbitrariness, e.g. the decision was based on the taxpayer's membership in a suspect class, that the Constitution would under those circumstances preclude such conduct and provide a remedy. Otherwise, however, while you can always argue that a tax was wrong under the applicable regulations, you can't defend yourself on the basis that the IRS chose only to apply the tax to you, and not all the other taxpayers exactly like you.
I understand the practical logic behind this rule – given the task the IRS has, there has to be some leeway in its decision-making. The conclusion, however – that the IRS can be entirely arbitrary – seems, at a minimum, a little … sad.
A somewhat similar issue of when arbitrary decision-making becomes a constitutional violation arises in the administrative context relating to local land use decisions. If a planning board denies you a permit because you are Muslim, that's actionable. If a planning board denies you a permit because it's misapplied the applicable ordinance, you can generally appeal – and that right to appeal and fix a random mistake means that there has been no procedural due process violation (remedy the old prison tool kit case?) But if a planning board has given everyone in the same situation as you a permit, and doesn't give you one, with no rational explanation as to why others were treated differently, are you out of luck? Generally speaking, if an administrative body changes its interpretation of a rule, it can do so, but it must (a) recognize that it is doing so; and (b) articulate a basis for it. So my blogosphere gut tells me that the board would at least need to articulate some rational explanation for its deviation. Often courts avoid drilling into this issue by simply finding that the other approved applicants weren't similarly situated.
In theory, the rational basis test requires rationality, yes? The problem, of course, is that no federal court wants to federalize local land use decisions by finding a constitutional claim. Usually the administrative test for review is arbitrariness and capriciousness (which sounds to me like it requires a rational explanation). But not all arbitrary conduct can be deemed unconstitutional in this murky world of substantive due process.
The result? The outcome is fairly straightforward – your chances of prevailing on a constitutional claim are slim - while the reasoning why … is not so clearly articulated.