OhMyBug

documentation/contracts

Comment lists fewer members than exist

rare15 sightingsfirst seen September 2026

What goes wrong

A comment or document enumerates the members of a set and presents the enumeration as the whole of it, while the code holds more. The reader treats the written list as the inventory and reasons, tests, or changes only the members named, never learning that others exist.

Example

A class comment lists the three places that read a record without a guard; a fourth was added later, so anyone weighing the cost of removing the guard counts three and misses one.

Not to be confused with

Not a documented guarantee the code fails to keep, where prose states a behaviour and the behaviour differs; here the prose states membership and the set has outgrown it.

Discovered by

Field notes · 13