In a victory for the Bush administration and a significant setback for congressional oversight of White House goings-on, a federal judge ruled yesterday that the investigative arm of Congress does not have legal standing to sue Vice President Dick Cheney for refusing to turn over documents related to the development of the national energy policy. The ruling goes beyond the Cheney matter to state that the General Accounting Office, which investigates hundreds of government-affairs issues every year, has no right to bring almost any lawsuit — an interpretation that could make it very difficult for the GAO to enforce requests for information from any federal agency. The White House hailed the decision as a turning point in what it called a generation of ever-increasing congressional encroachment into executive-branch territory, but critics said the ruling could dramatically weaken the GAO and render the president all but immune from oversight unless the opposition party controls Congress. The ruling is also a blow to environmentalists, and represents the second time in a week that courts have refused to grant access to the records of Cheney’s National Energy Policy Development Group. Enviros and others believe that the vice president met almost exclusively with commercial interests in developing the nation’s energy policy. The GAO has not yet decided whether it will appeal the ruling.