bi-14 step 02 — Rung 2–3: a real fix with a regression test

Goal

Fix a behaviour bug in a subsystem you have already studied, with a test that fails first.

Tasks

  1. From your bi-13 candidate list, pick the smallest defensible item.
  2. Check the directory is not being actively rewritten:
    git log --since=90.days --oneline -- <directory> | wc -l
    
  3. Reproduce it minimally. Write the failing test before the fix; confirm it fails on unpatched source.
  4. Identify the correct layer. State why the fix belongs there and not at a call site — pre-empt the most likely objection in your CL description.
  5. Fix. Run surrounding tests, not just yours.
  6. Upload; handle review. If a reviewer proposes a design change you disagree with, ask what failure mode they are protecting against before arguing.
  7. If the change is web-visible, expect a compatibility conversation and be ready to discuss usage data.

Done when

  • Test fails before the fix, passes after
  • Layer choice defended in the description
  • Reviewer feedback recorded verbatim in your contribution record