Diagnosis separates symptom, cause, and fix
A bugfix becomes safer when the symptom is reproduced, competing hypotheses are tested, and the smallest causal change is identified. A plausible patch is not root-cause evidence.
Keep diagnosis artifacts short and tied to observable behavior.
| Part | Question |
|---|---|
| Symptom | What fails and how is it observed? |
| Reproduction | Can the failure be triggered again? |
| Hypothesis | What cause explains the evidence? |
| Check | What would confirm or reject it? |
| Fix | What smallest change addresses the cause? |
Diagnosis sequence
- Record the exact symptom and context.
- Build a minimal reproduction.
- Trace the relevant code path and data.
- List competing hypotheses.
- Run a targeted check for the leading cause.
- Only then propose the smallest fix.
Diagnosis record
{"symptom":"<observed failure>","reproduction":"<steps>","evidence":["<path:line>"],"hypothesis":"<cause>","check":"<test or command>","status":"documented example"}Canonical lesson source · JavaRush
Open JavaRush material