Make node-selection functions testable and tested
This won't be that hard.
(Famous last words.)
We "just" need to make the part of the code that constructs the probability distribution for the known nodes separable from the part that chooses a node based on that probability distribution. Then, we need to write unit tests with an example nodelist to make sure that the correct properties are obeyed. As a part of that, we might want to make sure that every rule in the code is tested, and every rule in the code is in path-spec.