Company's CEO introduces generated code and I'm not sure what to do

Posted by vvwccgz4lh@reddit | ExperiencedDevs | View on Reddit | 90 comments

Hi. I don't use AI agent tools too much, but recently our CEO of the company (he codes too) started to introduce generated code into our already needlessly large codebase (200k+ loc of Java). He's extremely excited -- yesterday he wrote about 30 messages into company's Slack regarding how this AI thing works so well for him. He generates code and tests during lunch whereas normally he doesn't have much time for so much Slack activity and previously regarded my unit tests as mostly time wasting.

Some time ago I introduced unit testing config into the project. And now he started to casually use this "new fast unit testing" to run his huge generated mocks (still fast but containing a lot of code with lousy assertions inside for loops and lousy setup+act+assert+mutate+assert flows) whereas our other slow automated tests were connecting to an actual database to run transactions and do these same types of long assertion flows.

Yesterday I found that there was a "unit test" that connected to the DB. I fixed it. And I made a "unit test" that takes changed files in last 10 commits and checks that if they're unit tests they don't call the DB. Implementation details are not the point -- it's a band-aid anyway.

And at the same time the JIRA tasks that I'd be supposed to do are half-baked up until the point where I have to manually approach my CEO to clarify all requirements because the specifications don't match. And even after approaching I sometimes don't get proper answers (e.g. a 1h meeting about grand plan none of which was mentioned in the task (less JIRA is good but this is not productive)).

Could anyone point into some resources/ideas on how would one approach this situation?