Recover rows on non-transactional overwrites and retain original objects during promotion.
cleanup
cleanup(session: Session, name: str) -> None
Cleanup cannot turn a committed replacement into a failed action.
promote(session: Session, candidate: str, *, existing: bool) -> None
Keep the original object until promotion succeeds; restore its definition on failure.
recover_overwrite
recover_overwrite(session: Session) -> Iterator[None]
Keep a durable row copy; restore into the untouched definition when a later write fails.