They have to modernize the code while keeping all weird edge case behaviour. I think this can be done. And I suspect that is probably the request.
The issue is deciding what is weird edge case behavior and what are bugs. It can be a fine line.
Also, extensive commenting inside codebases is useful documentation, incl. these kinds of incidents. Good code documents the how, but not why. Comments shall also include the "why" where applicable.
Testing is still the long pull, even if you have an engineer with good expertise.
good thing they have unlimited token, now they would have 5 different model reviewing the work