Notes

TestingDebuggingKnowledge

A check that can’t fail tells you nothing

Tests pass, the job says success, the report adds up, and the bug is still there. Usually the check shares something with the thing it’s checking.

Applies to
Anything that produces money, permissions or numbers people report on.
Verified with
About ten write-ups from unrelated parts of one product, grouped together by a knowledge graph, August 2026.

I didn't find this one through an incident. I found it by graphing a team knowledge base. One cluster held about ten write-ups from completely different parts of the product, and the only thing they had in common was how they failed: something got verified, the verification passed, and the bug was still there. Every time, the check shared something with the thing it was checking.

What a check can share

A check inherits the blind spots of whatever it's testing when it shares any of these:

If it shares one of those, a green result tells you nothing. That's worse than no check at all, because it makes you confident.

The check shares something
  • the same machine or timezone
  • the same query or helper
  • a role that can do everything
  • the same tables or report

Passes whether the bug is there or not

The check is independent
  • runs in production's environment
  • reads where the user looks
  • uses the least-privileged role
  • compares against another source

Can actually go red

Same subject, two kinds of check. Only the one on the right tells you anything.

What it looks like

Some shapes I've seen it take:

In the end, a person usually caught these by comparing against something independent: the vendor's own portal, the real invoice, a report review.

What I do now

For anything involving money, permissions or reported numbers, I name the independent check before shipping and write it down next to the code.

  1. Ask what the check shares with the thing it checks. If it shares nothing, it's a real check. If it shares something, keep it as a smoke test, but don't trust it.
  2. Check where the user looks. The rendered PDF, not the row. The file in the destination bucket, not the upload's exit code.
  3. Test as the least-privileged role that matters, with at least one assertion that depends on an explicit grant.
  4. Copy production's environment locally. Set TZ=UTC in every .env if production runs in UTC, and do the same for anything else production pins.
  5. When two systems hold the same number, compare them on a schedule.
  6. Treat silence as a failure until proven otherwise. Assert the count you expect, not just that nothing errored.

Before trusting a green check, I ask what would have made it red. If I can't think of a realistic answer, it isn't checking anything.