Solution (source code)

= Solution

Since the <derivative> of $|z-k|$ is $\operatorname{sgn}(z-k)$ away from $k$, choose the <Kruzhkov entropy flux>
$$
\boxed{\psi_k(z)=\operatorname{sgn}(z-k)\bigl(f(z)-f(k)\bigr),\qquad\psi_k(k)=0.}
$$
On either side of $k$ its <derivative> is $f'(z)\eta_k'(z)$. The factor $f(z)-f(k)$ vanishes at the change of sign, so the function is continuous and there is no extra delta contribution to its weak <derivative>. Adding a constant to the flux changes none of the test integrals. Substitution into the entropy inequality pairs $|u-k|$ with this flux, not with an arbitrary antiderivative unrelated to the chosen entropy.