Two colleagues discuss a document at a desk.
A strong review comment helps another person act without guessing.

Core time: about 5 minutes. Write in your own notes; do not paste outside code or secrets into this course.

Choose the right classification

LabelUse it when…Typical merge effect
Blockinga requirement, invariant, security boundary, or necessary evidence is not satisfied;resolve before merge
Questionimportant context is missing and the excerpt does not establish the answer;clarify before deciding
Suggestionan improvement is worthwhile but current behavior can still satisfy the contract;non-blocking unless team policy says otherwise
Nita minor consistency or presentation issue has negligible risk;clearly non-blocking

The six-part comment frame

  1. Classification: blocking, question, suggestion, or nit.
  2. Location: line, branch, or requirement.
  3. Observation: what the proposed code does, without guessing intent.
  4. Evidence: requirement, test, or reproducible condition.
  5. Impact: what could fail, leak, or remain ambiguous.
  6. Request: the smallest control and proof that would resolve the concern.

Solved example — sensitive logging

Blocking — request log: The new log statement writes the full email and Authorization header, which conflicts with R6 and may persist a bearer token. Please remove the authorization value entirely, use the approved non-identifying event fields, and add a test or captured-log assertion showing that neither credentials nor the full email are emitted.

Notice that the comment names the location, observed data, requirement, credible impact, requested control, and evidence. It does not repeat a real token.

Your task — capacity branch

Write one comment that addresses both the <= boundary and the concurrent-request risk. Keep it specific enough that the author knows what “done” means.

Weak version: “This has a race condition. Please fix.”

Open the model comment after you draft yours

Blocking — capacity branch: When registration_count == capacity, the <= condition still enters the insert path. The read/increment/save sequence is also not atomic, so two requests can both observe one remaining place and exceed R3. Please enforce the capacity check and registration write in one database-protected operation, then add full-capacity and simultaneous-request tests that fail if the final count exceeds capacity.

Self-check

  1. I classified the finding and named its location.
  2. I described observed behavior rather than the author’s intention.
  3. I linked the finding to R3 or an equivalent explicit invariant.
  4. I explained both the boundary error and concurrency risk.
  5. I requested a control and observable tests, not merely “fix it.”
  6. I included no real credential, customer record, or external code.

Interpretation: 5–6 points is actionable; 3–4 needs another pass; 0–2 should be rewritten around evidence and an explicit request. This is practice feedback, not a credential.