Roughly this happened to me once. Got a horrible review after doing what I felt was a heros effort. I'll skip the details but the cherry on top was "you did all this work but it didnt build on the cloud server so we're not going to count it for anything" - the "cloud server" (of the live project) was the ctos laptop and it could only build his local stuff (you could even see the local paths in the web output). As if that wasn't enough, literally all he had to do was git pull and it would have all the new work on it.
Cto was eventually fired for trying to steal the company IP and he went on to fail upward making a security camera company infra famously insecure and got a ton of very valuable stock for it.
Life is weird!