Use field(default_factory=...) instead of a mutable-default-class instance, which Python 3.11+ dataclasses reject at import time.
Import the pre-repair source tree as the history baseline. Runtime data (data/), virtualenvs, bytecode caches and logs are gitignored so local secrets and user state stay out of the repo.