Munchable adds an eighth condition, exposing how hardcoded counts drifted out of sync
Munchable, a tool that checks packaged food against digestive-condition rule sets, expanded from seven conditions to eight. A single commit touched 63 files, and a dozen of the changes were one-line edits replacing the spelled-out word "seven" in copy across the app, docs, and shared packages. The author notes the number had been scattered through the codebase as literal text rather than derived from the data. A test checking the phrase also hardcoded "seven", so it kept passing despite the copy becoming wrong. The fix was to compute the count from the condition registry and have the tests import the same constant the pages render.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in