A developer used AI to refactor a legacy permissions module that has been in production for years. The original code is left as a comment at the bottom. The PR description says:
“Cleaned up the permissions module with AI. Same logic, just more readable. The old code is left as a comment for reference - we can delete it after merge.”
What you're being evaluated on
3 hints available (using hints reduces your score)
An AI refactored a 5-year-old permissions module and the PR claims improved readability with no behavior changes. Comparing old and new shows null checks removed, every field made optional, admin checks reordered, and errors silently swallowed instead of thrown. Practice auditing AI refactors for hidden behavior changes in security-critical code.
Play the full scenario above for free. More AI Code Review scenarios · Create a free account to save your progress.