Hi,
if you have two edges with hp-refinement which are connected, you also have to add a hpref at the crosspoint. In your case at all points of the geometry.
Code:
p1 = geo.AppendPoint (0,0,hpref=1)
p2 = geo.AppendPoint (1,0,hpref=1)
p3 = geo.AppendPoint (1,1,hpref=1)
p4 = geo.AppendPoint (0,1,hpref=1)
My errors are now [5.708775518541384e-13, 4.975185600311657e-13].
Best,
Christoph