Skip to the content.

Code review

Get the change

Read changed files in full where the diff is not enough to understand the context. Never comment on code you have not read.

Review in passes (most important first)

  1. Does it do the right thing? Compare with the description/issue. Missing cases, wrong assumptions, behavior changes that are not mentioned.
  2. Correctness. Logic errors, off-by-one, null/empty handling, error paths, concurrency and ordering, time zones, float money, resource leaks (files, connections, listeners), retries that are not idempotent.
  3. Security. Untrusted input reaching SQL, shell, file paths, HTML, URLs (SSRF), deserialization, regex (ReDoS); missing authorization on new endpoints (authn is not authz); secrets in code or logs; overly broad CORS or permissions.
  4. Tests. Do tests cover the new behavior and the failure modes? Would they fail if the change were reverted? Are they deterministic?
  5. Design. Right layer, right module? New dependencies justified? Public API changes backward compatible? Simpler alternative available?
  6. Readability. Names, function size, comments that explain why. Only after everything above.
  7. Operations. Logging and metrics for new failure modes, migrations safe to run on live data, config documented, feature-flagged if risky.

Report format

Summary: <1-2 sentences: what the change does and overall verdict>

Blocking
1. path/file.py:42 - <problem>. <why it matters>. Suggest: <concrete fix or code>.

Non-blocking
2. path/other.ts:10 - <...>

Nits (optional)
- ...

Questions
- <things you could not determine from the code>

Rules