The Supreme Court ruled unanimously Thursday against the federal government in a class-action suit over combat-related special compensation, paving the way for an estimated 9,000 retired service members to receive thousands of dollars in retroactive pay.