4. Given the function $f(x)=a x+b, g(x)=\left\{\begin{array}{l}f(x), 0 \leq x \leq a \\ f(f(x)), x>a\end{array}\right.$, if for any positive number $a$, the function $g(x)$ is strictly monotonically increasing on $(0,+\infty)$, then the minimum value of the constant $b$ is