The visitor pattern in the StateBuilder means that it is easy to miss type changes in the dataclass definition.