Solution (source code)

= Solution

Choose counterclockwise traversal viewed from $+z$, and span the curve by the disk $z=1$, $x^2+y^2\leq2$ with upward normal. Here
$$
\nabla\phi=(2xy,x^2,0),\qquad \nabla\psi=(z,0,x),\qquad \nabla\phi\times\nabla\psi=(x^3,-2x^2y,-x^2z).
$$
The surface side is therefore $-\iint_Dx^2dxdy$. In polar coordinates it is
$$
-\int_0^{2\pi}\int_0^{\sqrt2}r^3\cos^2\theta\,dr\,d\theta=-\pi.
$$
For the direct boundary integral, $dz=0$ gives $\nabla\psi\cdot d\mathbf l=dx$ on $z=1$. Set $x=\sqrt2\cos\theta$, $y=\sqrt2\sin\theta$, so
$$
\boxed{\oint x^2y\,dx=-4\int_0^{2\pi}\cos^2\theta\sin^2\theta\,d\theta=-\pi.}
$$
The two independent evaluations agree. Clockwise traversal and downward normal give $+\pi$ on both sides.