OhMyBug

documentation/contracts

Hardcoded Number In User-Facing Text

#44rare19 sightingsfirst seen September 2026

What goes wrong

Text shown to users states a value — a wait estimate, an item count, a delivery lead time — as a literal copied from one component or from a setting that was constant when the text was written. When the setting, list or system changes, the text contradicts the behaviour it sits next to.

Example

The checkout says 'delivery within 3 business days' as a fixed string, while the actual lead time comes from a setting that was changed to 5.

Not to be confused with

Shipped user-facing copy; not a code comment (Stale Cardinality Literal), not a test expectation (Obsolete Expected Literal), and the code beside it behaves correctly — compare False Behavioral Guarantee.

Discovered by

Field notes · 5