Goal
Review the code below as a careful senior engineer would, and report only findings that matter.
Inputs
- Language and framework: [e.g. Python 3.12 with FastAPI]
- What the code is meant to do: [one or two sentences]
- Context: [where it runs, who calls it, expected input size]
- Code: [paste the code here]
Review areas
- Correctness: logic errors, off-by-one, wrong conditions, unhandled cases.
- Security: injection, unsafe input handling, secrets in code, weak authorisation checks.
- Error handling: swallowed exceptions, missing timeouts, unclear failure states.
- Performance: repeated work, needless queries in loops, memory growth.
- Readability: naming, function length, duplication, missing types.
Output format
- Summary: three sentences on overall quality and the biggest risk.
- Findings table:
| Severity | Line or area | Issue | Why it matters | Suggested fix |
Severity is one of critical, high, medium, low. Sort critical first.
- Corrected code for every critical and high finding, showing only the changed functions.
- What is done well: two or three short points.
Check before answering
- Every finding points to a specific line or function.
- No finding is a matter of taste presented as a bug.
- Fixes keep the same behaviour except where behaviour is the bug.
- Security findings explain how the issue could be exploited.
- Corrected code follows the language's standard style.
- If nothing is critical, say so plainly.






