your example
you have three 3 degree of freedom $u_1,u_2,u_3$ (not generalized coordinate) and 1 constraint equation $g(u_1,u_2)=0$ so you have 2 generalized coordinate .
I see two cases:
I) form the constraint equation $g(u_1,u_2)=0$ you can obtain explicit for example $u_2=u_2(u_1)$ so your position vector is:
$$\vec{r}=\vec{r}(u_1,u_3)$$ $$\vec{v}=\vec{\dot{r}}=\frac{\partial \vec{r}}{\partial u_1}\dot{u}_1+\frac{\partial \vec{r}}{\partial u_3}\dot{u}_3$$
$\Rightarrow$
$$T=T(u_1,\dot{u}_1,u_2\,\dot{u}_2)=m\,\frac{1}{2}\,\vec{v}^T\,\vec{v}$$
$$U=U(u_1,u_3)$$
so:
$$\frac{d}{dt}(T+U)=0$$
The kinetic energy plus potential energy is conserved
II) If you can't eliminate one of the degree of freedom from the constraint equation then:
from: $$g(u_1,u_2)=0\quad \Rightarrow\quad \frac{\partial g}{\partial u_1}\dot{u}_1+\frac{\partial g}{\partial u}_2\dot{u}_2=0$$
so $$\dot{u}_2=\dot{u}_2(u_1,u_2,\dot{u}_1)\quad u_2=\int \dot{u}_2\,dt$$
so again like case I the kinetic energy plus potential energy is conserved