I have no idea why you think you can't test a distributed system. Hopefully you are not in the business of software development. You certainly wouldnt be working at my company.
Secondly, people are not just blindly having AI write code with no idea how it works. The AI is acting as a senior consultant helping the developer to design and build the systems and generating parts of the code as they work together.
I'm very confused by this. I have in no way seen AI that can act as a senior consultant to any professional software engineer. I work with AI all the time and am not doubting that it is very useful, but this seems like dreaming to me. It frequently gets confused and doesn't understand the bigger picture, particularly when large contexts are involved. Solving small problems it is often helpful but I can't imagine how anyone could believe it is in any way a replacement for a senior engineer in its current form.
Secondly, people are not just blindly having AI write code with no idea how it works. The AI is acting as a senior consultant helping the developer to design and build the systems and generating parts of the code as they work together.