Engineering · Performance · Testing

Two different pages, one line on the card

We named three screens the speed board had been merging, and the card showed two rows reading the same word. A tidy label had erased the difference.


Yesterday we wrote about the guest ordering page having no row on our speed board, because it is served at the root of its own address and the board named pages by their path. The fix was to give three surfaces a name of their own: the guest page, the hall page, the staff app. Tests written, green, deployed. Then we did what the tests cannot do and opened the dashboard to look.

Two rows. Both reading /. Both filed under Guest.

The tidying that undid the fix

The owner's card shows the page name without its prefix, because bo:/menu reads better as /menu and the column beside it already says Back office. That is a good rule for the eighty screens it was written for, because stripping the prefix leaves a path that still tells them apart. It is the wrong rule for a page whose path is always /. Strip the prefix from the guest page and the hall page and you are left with one character each, the same character, and two rows that cannot be told apart on the one screen built to tell them apart.

The release before had moved exactly this collision out of the database. Shipped as written, this one would have put it back on the screen.

Why the tests were green

The tests asserted that the three names existed and that the card filed each under the right column. Both true. The card is the one place the names stop being known, because it strips them on purpose, and nothing in the test suite looks at the rendered card. The only instrument that could see the fault was a picture of the real thing.

So the strip list went back to its original four prefixes. The three root-served surfaces now render as themselves, prefix and all, because for a page whose path is always / the prefix is the name. And the test gained the inverse rule: those three must never appear in the strip list, so the tidier-looking version cannot come back when somebody next sees the inconsistency and reaches for it.

For anyone running a floor

Every operation has a label somebody shortened to make a list look neater. The ticket that drops the table number because the printer is narrow. The report that shows the kitchen's nickname instead of its code. The shortening is fine right up until two things shorten to the same word, and then the list is not neater, it is wrong, and it is wrong in the way that is hardest to see: nothing is missing, nothing is red, two lines simply mean one thing.

Look at the printed thing, not the rule that produced it. The rule was sound. The card was not.


Try it on tonight’s service.

Nothing to install, no card. Not better by the weekend? Close the tab.