A couple of quick thoughts: Will two feet of extension allow you enough access to the back of your deepest component? My AVR is about 17 inches deep, I believe. Two feet of extension would not be enough for me to see the closely-spaced connections, much less manipulate them, unless the shelf also rotated.
Wood-on-wood sliding connections like you describe work better on paper than they do in practice. In the real world, if the shelf does not stay exactly square to the sides as you push it in, it will bind. You could probably adapt some drawer slides to provide the sliding function, though.
If you could turn the rack 180-degrees in place, would you need it to pull out? To rotate without pulling out, you would have to build the closet to be wider than the rack. Since this is new construction, that might be a good alternative.