Quality & Team

Code Review

Foundational

Code review builds quality, security, and shared understanding into the team. It is not a gate to argue past. Done well, it catches bugs early, spreads knowledge, and raises everyone's standard. Done badly, it is either a rubber stamp or a fight. Review the code, not the person. Review as if you will maintain it yourself.

A review has two equally important jobs: improve the change, and improve the team. The reviewer is a second pair of eyes on correctness, security, and design. The reviewer is also a teacher who explains the why, so the lesson sticks. The author helps by sending small, clear, self-explained changes. The goal is shared ownership of quality. Once code is merged, it belongs to all of us.

Review is also a real security control. It is where a missing tenant filter, an unparameterised query, a fail-open path, or a leaked secret gets caught before production. So security-relevant changes need careful, specific attention, not a quick LGTM. Keep the tone kind and collaborative. Reviews that feel like attacks make people defensive and hide problems.

Review well

The rubber stamp Reviewer: "LGTM 👍" (1,200-line PR, mixed refactor + new feature,
a new query with no tenant filter buried in the middle)

The change is too big to review properly, so it is approved without real checking. A cross-tenant data leak ships because nobody read the query. The review added no protection.

Specific, teaching, blocking where it matters "blocking: this query is missing the TenantId predicate — as written
it returns other tenants' customers. We enforce tenant scope server-side
(see Multi-Tenancy). Suggest routing through TenantRepository."
"nit: name could be clearer, non-blocking."

The serious issue is clearly blocked and explained, with the why and a fix. The small issue is marked optional. The author learns, and the leak never ships.

Make your change reviewable

Self-review checklist

Why it matters: Review is one of the cheapest places to catch expensive mistakes. A security flaw found in a PR costs a comment; the same flaw in production costs an incident. Review is also how standards and knowledge spread across the team. Careful, kind, real review builds quality over time. A culture of rubber stamps quietly lets defects through.