Ok, it looks like it is an intentional transformation then. Maybe the variable names should be changed to clarify scale_posterior vs scale_energy.
So, it looks like QuadPotentialDiag() should be called with the (guess-)estimated variances of the posterior. There is also some inconsistency when setting this up via the step classes. Since scaling in HamiltonianMC() seems to refer to the variances whereas scaling in Metropolis() seems to refer to the standard deviation. This has a lot of potential to mess people up.