Files
hermes-agent/apps/shared
Konstantin Khlopkov 1da0c50c98 fix(shared): normalize invalid ensureContrast step values before the ladder loop
ensureContrast's accumulating ladder loop trusted its `step` argument: step=0
never advanced (1,000,001 iterations, still unbounded), negative steps walked
away from the pole forever, NaN skipped the loop body entirely so the original
below-threshold color was returned silently, and Infinity/above-1 steps jumped
straight to a full blend. Normalize instead: a finite step in (0.001, 1] is used
as-is (clamped to 1 above that), everything else falls back to the default 0.2
ladder. The desktop 0.2 and TUI 0.05 float sequences are byte-identical.

Fixes #109955
Salvaged from #109975 by kokhlo
2026-09-27 02:48:48 -05:00
..