Adding a tool to inspect the serialzied state and repair tools/migration/migrate_state.py.