I haven't heard of residual uncertainty in the context of robotics, but I would imagine what you're getting at is the fact that odometry data has an inherent amount of uncertainty because of minor variations in things like friction, wheel diameters, chassis weight distribution, variations in motor fabrication, etc.
The best that you could probably do would be to run some baseline tests to determine first how accurate your odometry estimates are. You should wind up with something like the KITTI odometry scores, where visual odometry and/or SLAM algorithms are scored on a percent error for translation and for rotation. The rotation scores are given there as error in degrees per meter.
Once you can quantify the performance of your odometry estimates, then you can begin to build a cone of uncertainty around your position estimate, just like weather forecasters do with hurricane projections.
For example, say your robot has a rotational error of one degree per meter and a translational error of 5 percent. At the end of one meter of travel, your robot could be anywhere between 0.95 to 1.05 m, and the heading could be anywhere from -1 to +1 deg. When you advance a second meter, you compound the estimates. You could have been at 0.95 meters, with a heading of -1 deg, and traveled another 0.95 meters. Or you could have been at 1.05 meters, with a heading of +1 deg, and traveled another 1.05 meters.
Depending on how detailed you want to get, you could analyze your odometry versus truth testing and find the standard deviation of your error, and then you could do 1, 2, and 3 $\sigma$ estimates for your cone of uncertainty.
Then, once any portion of your cone of uncertainty overlaps the start position, you must assume that you have completed a lap.