Fix bugs

Debug, fix, and verify a defect. Root-cause first, then a targeted fix — never patch symptoms.

Overview

  • **Goal**: a bug fixed at the root cause, verified by tests.
  • **Time**: 15–60 minutes.
  • **Skills used**: debug, test, code-review.

Prerequisites

  • A reproducible failure (error message, failing test, or repro steps).
  • Access to logs / CI output if the bug surfaced there.

Step 1: Debug to the root cause

Run the debugger on the failing area. It analyzes logs, runs targeted tests, and reports the likely root cause — read its report before touching code.

/vk:eng:debug "<symptom or failing test>"

Step 2: Apply the targeted fix

Fix the root cause (use /vk:eng:fix for an automated root-cause-first fix, or edit directly). Add or update a test that locks the fix.

/vk:eng:fix "<root cause description>"

Step 3: Test

Confirm the fix and that nothing regressed.

/vk:eng:test

Step 4: Code review

Make sure the fix introduces no new failure modes.

/vk:eng:code-review

Next steps