All writing

Post-mortem18 February · 9 min

We got tide modelling wrong for four months

A one-hour offset in a single timezone, four yards affected, and the review process that should have caught it in week one.

Ilya Renner

For four months, Waylight read tide windows an hour early in one timezone. Four yards were affected. Nobody missed a berth because of it, which is luck rather than design, and the reason it took four months to find is that the error was small enough to look like weather.

What actually happened

Tide tables arrive in local time. We convert to UTC on ingest. The converter used the offset in force on the day the table was published rather than the day each tide occurs — which is correct for about ten months of the year and wrong across a daylight-saving boundary.

The yards that noticed were the two with the narrowest windows. The other two had enough slack that an hour did not change a plan, so the error sat there producing boards that were subtly wrong and entirely plausible.

Plausible and wrong is worse than obviously broken, because nobody reports it.
The line we have written on the review template since

Why the review missed it

  • Our fixtures were all generated in a single timezone with no DST boundary in range.
  • The integration test asserted the shape of a converted tide, not its value.
  • Nobody who reviewed the converter had worked a yard where an hour matters.

The third is the real one. The first two are the kind of gap any team can close with a fixture and an assertion, and we have. The third is why we now send every engineer to a yard in their first month, at six in the morning, in whatever weather there is.