Json or some other indicator of status. If statements and flat files you can easily delete to reset state. You have the right notion as to how to do it. Some sort of indicator that something has run. Possibly consider having an over arching concept of a run so you clearly status like run1.json or /run1/state.statefile
FWIW, not having side-effects from being ran twice is called “idempotency”
deleted by creator
Json or some other indicator of status. If statements and flat files you can easily delete to reset state. You have the right notion as to how to do it. Some sort of indicator that something has run. Possibly consider having an over arching concept of a run so you clearly status like run1.json or /run1/state.statefile