>I arrived in the final stages of a big rewrite of the core architecture that was already late. The code was a tangled mess of mindless duplication, half-implemented features and misleading comments. Of the few automated tests that existed, most didn't even run anymore.
I feel for you. But with your experience, this shouldn't be a surprise for you??
The focus in Startups is to get the code out and get a (paying) customer and the priority is not always on the quality of the code/tests. In the Enterprise world you have some more time to do more tests, code review et. al and may be you got used to it.