Expire and purge eligibility, responsibility and attention data
What It Does
Daily partition maintenance at 03:17 UTC removes expired months, and workspace deletion invokes module purge participants.
The Flow
Create the current and next two months and detach and drop months beyond thirteen completed months, without archiving. Remove attention supporting rows whose occurrence no longer exists and clear stale open-key references. Use the implemented expiry helpers for ninety-day runs and thirty-day simulations. Purge eight ordinary eligibility tables and use the restricted deletion function for decisions; job storage follows its separate lifecycle. Purge responsibility cover, holdings and gaps, plus attention reminder, response, audience, item, key, setting, preference, run and sweep records.
When Something Fails
Maintenance failure and silence alarms alert operators; the next daily invocation tries again. A missing writable partition rejects inserts until creation succeeds; deployment creation reduces the risk. Workspace errors are logged and retried on the next sweep. Supporting orphans can remain between successful sweeps. No deployed schedule invokes these helpers. Run results, subjects, exports and simulations can outlive intended retention. A failed participant step is retried by the deletion job. Deletion can remain incomplete until subsequent steps succeed. Lifecycle execution retries failed participant steps. The deleting workspace can retain partial storage during recovery.
Open Design Questions
Shared registries are not workspace rows and are retained. An open occurrence removed with its month reappears only if its provider republishes; generation numbering depends on whether the key remains.