Attached patch adds assertions and comments to heap_page_prune_execute() that document my understanding of things. This passes "make check-world" for me.
How do you feel about doing something like this too?
I've applied patch v1, built with assertion checking. Installcheck-world passes on my machine (OSX) too.