Vibecoding 17: plant a bug and watch the test fail
Flip one sign in a rule, run a weak test and a boundary test, and see which one turns red. Lesson 17 of the vibecoding course.
The rule, as the agent wrote it
age > 18
- greenweak test: age 30 is an adult
- greenweak test: age 5 is not an adult
- redboundary test: age 18 is an adult
Both weak tests are green with the bug planted: they never look at the edge.
The boundary test turns red: it is the one that can tell.
The rule, as the agent wrote it
age >= 18
- greenweak test: age 30 is an adult
- greenweak test: age 5 is not an adult
- greenboundary test: age 18 is an adult
Bugs live at edges: 18, 0, the last item of a list. Put a test there.