On Thursday, a federal judge invalidated a policy designed to help undocumented spouses of U.S. citizens gain legal status, marking…