Ref T13195. See PHI842. Alternative to D19638.
Instead of doing all the stuff in D19638, just remove the rebuild_summaries.php script. This script is outdated, copy/pastes the rebuild logic, and doesn't understand unreachable commits.
If we had some use for it it should move to bin/repository rebuild-summary ... or similar, but it's not clear there's any use for it. The incremental summary rebuilds seem to work fine as-is.