When doing a refactor I always wanted to make sure I didn't introduce any behavioral changes. Tests are great, but they sometimes don't cover all the cases you're looking for.
Shadow Traffic sets up a Cloudflare worker that mirrors production traffic to a staging deployment and checks if the responses are identical. This requires minimal changes in your infrastructure, just point traffic to your production and staging environments.