Tell me about a time you had to work with a legacy codebase. How did you navigate the code and ensure your changes did not introduce regressions?