4. Given the function
$$
f(x)=a x+b, \quad g(x)=\left\{\begin{array}{ll}
f(x), & 0 \leqslant x \leqslant a, \\
f(f(x)), & x>a .
\end{array}\right.
$$

If for any positive number $a$, the function $g(x)$ is strictly increasing on $[0,+\infty)$, then the minimum value of the constant $b$ is
(Liu Kaifeng)