1
1 Comment

The bug my tests could not see: a history field that read live settings

I added a field that tells a user what settings a generated post was created under. The code looked up the plan's current topics and returned them. Plans are editable. So the moment someone edits their topics, every post they made last month reports the new topics as its origin. No error, no log line. The product starts misremembering.

Tests were all green. Each one created a plan, created a post, and checked the field, all in a few lines. Nothing changed in between, so reading live and reading a stored value looked identical.

I had fixed the same bug in the neighbouring field that morning and still shipped this one to review.

What I do now:

  • If a user can see a value that was chosen at creation time, it gets its own column, written once.
  • If we never stored it, the field says "not recorded". An honest blank beats a confident guess.
  • The test edits the settings after the record exists and asserts nothing moved.

Has anyone else found one of these in their own product? Where was it hiding?

on September 21, 2026
  1. 1

    Interesting. How are you measuring whether it is working?