merge.py is using multiple discrete sets of 1 and 2 letter constants
to define types and behavior. To the uninitiated, the code is very
difficult to reason about. I didn't even realize there were multiple
sets of constants in play initially!
We begin our sanity injection with merge state records. The record
types (which are serialized to disk) are now defined in RECORD_*
constants.
Perhaps we should move that documentation to here so we don't have two lists of the same values that can end up getting out of sync? That would also make it easier to review this patch because the descriptions would be right next to the names you picked.