maintner: repair unindexed Gerrit commits

We previously tried to have the invariant that a Gerrit ref mutation
never was recorded in the log until all its reachable commits were
already recorded in the log.

But due to unknown bug(s) in the past, that wasn't the case.

This adds a fix-up step to the beginning of sync. The new maintnerd
--config=devgo config type has made testing this both possible and
easy: devgo clones the live config and then starts running locally
from that point. Then the existing --sync-and-quit flag now also adds
a Check step at the end. Everything checks fine now, so I think the
invariant violation has since been fixed. At least if it recurs, we'll
catch it now.

Change-Id: Ia6cfd4ff8d793904472f4f07d6eef9cb4eb3afb8
Reviewed-by: Brad Fitzpatrick <>
3 files changed