Feel free to file a pull request to dolfinx rectifying this. It would simply be adding _residual0 = 0.0; at:
which would then consistently give you inf for iteration 0 using “residual” method.
You would have to ask the original author (@garth?). As i have already stated it is easy to implement your own Newton solver if you are not satisfied with the convergence criteria or logic.