OhMyBug

tests/ci

Assertion passes with the change reverted

rare12 sightingsfirst seen September 2026

What goes wrong

A test written after a change is never run against the code as it was. It asserts properties the earlier version already satisfied, so the one behaviour being shipped is pinned by nothing. The reader treats a green new test as proof that the new behaviour is protected, when it only records what stayed the same.

Example

A test added alongside a rewritten read asserts the rows that come back, and the old read returned those same rows, so the property the rewrite was for is unguarded.

Not to be confused with

Not Assertion Cannot Fail: this check does redden for some edits and would fail against unrelated code; it is blind only to the behaviour the change introduced.

Discovered by

Field notes · 10