I am a software engineer and one of my coworkers is going off the deep end - I can identify pattern obsession tendencies, misapplication of programming models (async-await for a list needed on the back-end), and other terrible implementations of relatively simple stuff that now makes it incredibly complicated.
Full disclosure: I was pulled off the project publicly earlier in the process after my boss did a code review (we don't really do code reviews, and I'll admit the code was not good because I was being lazy) and because he thought I wasn't 'getting it'. I was pissed and embarrassed by it, and when I watched the commits afterward I saw this coworker doing the exact thing that I did, only they weren't being watched and humiliated. This might be because this coworker has more experience than I do so my boss didn't check their commits. Both myself and 2 other developers (not the one who wrote it) have spoken about the code and the decisions being made and all are in agreement that it sucks.
I have now been put back on the project, and am dealing with the overhead of all the junk code. I don't want this responsibility, and it's hard to do really anything on it.
I've spoken directly to the coworker, voiced my concerns, and they've gone ahead and done it their way anyway. This is an office that very strictly follows TDD and SOLID principles, but this coworker is not doing any of it.
I don't want to shoulder the responsibility for maintenance on this project, but I don't want the other coworker to be humiliated like I was. What can I do?