Trevor PaughSystems engineer
Trevor PaughProject Chronicles

Chronicles / Cookbook

Four holes and three hundred lines

Progress

A whole-repo audit of Cookbook found four holes, and the owner asked for all of them fixed. The same audit pointed at code that no longer earned its keep, and about three hundred lines went.

Cookbook had been quiet for a month. The audit was a way to find out what a month of quiet had been hiding, and it was the first work on this project to go through the Factory.

What was closed

The local dev server now answers only on the machine it runs on. A hostile page can no longer hang the recipe importer. Photos uploaded from two devices at once no longer wipe each other. The review of those fixes found one gap left in the photo cleanup, where a recipe could end up pointing at a deleted picture, and a second job closed it.

What was removed

Two helper functions had been copied into three files. One of them guards against cross-site requests, which is not a thing that should be able to drift, so both now live in one place. The one-off data migration tool and its tests were deleted after both tables showed no documents left in the old format.