A federal jury ruled on Monday that Elon Musk waited too long to sue OpenAI and its co-founders, delivering a decisive victory to the ChatGPT startup and ending one of Silicon Valley’s most closely watched courtroom battles.