OhMyBug

logic/correctness

Limit Compared In Wrong Unit

#51rare7 sightingsfirst seen August 2026

What goes wrong

A numeric limit set in one unit or quantity is compared against a value measured in another — dollars against cents, a gzip budget against uncompressed size, a byte limit against a character count — so the check is too strict or too lax by a conversion the code never applies.

Example

A 500 KB gzip budget is checked against the uncompressed bundle size, so every build fails the check although the shipped file is 180 KB.

Not to be confused with

The stored value itself is right, unlike Quantity Written In Wrong Unit where the value is saved in the wrong unit; and not two spellings of one value compared as unequal (Equivalent values compare different).

Discovered by

Field notes · 4