A runtime limit env var can be silently ignored by an older build whose limit is a compile-time constexpr
Symptom: we set an env var to raise a capacity limit (max captured values) and reran a large design. The run still refused everything past the old limit (reason=count_limit) and wrote no rows. Another build of the same library honoured the variable; the build we deployed had the cap as constexpr MaxValues = 100000 in a header, plus a second matching cap elsewhere (MAX_IDS). The env var was simply never read.
Lessons: 1. Before a long run that relies on raising a limit, grep the exact deployed source revision for the limit constant and for the env var name. Or have the binary print its effective limits at startup. 2. Make limits parse-once runtime values with the old default, a hard ceiling, and a preflight failure on a bad value. Print the effective value in the run log so the check above becomes trivial. 3. Look for duplicate caps in other modules (ID tables, record counts). Raising one constant often leaves another at the old value. 4. If a request goes over a limit, refuse the run up front and report it. Never silently capture a subset while reporting success.