Tenancy Archive Retention Expiry Sweep
Tenancy Archive Retention Expiry Sweep
Overview
The Retention Expiry Sweep is a scheduled background workflow that identifies tenancy archives that have reached the end of their 6-year statutory retention period. When an expired archive is found, the platform notifies the relevant organisation's admins so they can take deliberate action — the platform never deletes data automatically.
Schedule
The sweep runs every day at 05:00 UTC via a cron trigger:
0 5 * * *
No manual intervention is required to start or maintain the sweep.
How It Works
1. Identify Expired Archives
The workflow queries the tenancy_archives table for records that meet both of the following conditions:
retainUntil < today— the retention deadline has passedstatus = 'complete'— the tenancy lifecycle is fully closed
Archives that are still active, in-progress, or in dispute are excluded.
2. Notify Org Admins
For each qualifying archive, all administrators of the owning organisation receive a notification informing them that:
- The archive has reached its 6-year retention limit.
- The data can now be lawfully purged.
- No action has been taken automatically.
Notifications are delivered through the platform's standard notifications system and are visible in the admin dashboard.
3. Agent-Confirmed Deletion Only
The sweep does not delete any data. Deletion requires an explicit confirmation action from an authorised agent or admin inside the platform. This two-step approach ensures:
- No accidental loss of records that may still be referenced.
- A clear audit trail of who approved the deletion and when.
- Full compliance with data minimisation obligations without sacrificing control.
Entities Involved
| Entity | Role |
|---|---|
tenancy_archives | Source of truth for retention deadlines and status |
organizations | Identifies the owning org for each archive |
org_members | Used to resolve which members hold the admin role |
notifications | Delivers the expiry alert to org admins |
Compliance Context
UK tenancy deposit legislation (and associated Renters' Rights Act obligations) requires records to be retained for 6 years from the end of a tenancy. Once that period has elapsed:
- Retaining the data beyond necessity increases GDPR exposure.
- Organisations are permitted — and in some cases encouraged — to purge records they are no longer legally required to hold.
The sweep surfaces this threshold at the right moment, leaving the final decision with the humans who are accountable for it.
FAQ
Will the platform delete my archive automatically? No. You will receive a notification, but no data is removed until you confirm deletion manually.
What if I want to keep an archive beyond 6 years? You can dismiss the notification. The sweep will not notify you again for archives you have already acknowledged, and no deletion will occur without your action.
Who receives the notification? All members of the organisation who hold the admin role at the time the sweep runs.
What time does the sweep run? Every day at 05:00 UTC.
What does retainUntil represent?
retainUntil is the computed date 6 years after the tenancy end date, stored on each tenancy_archive record at the point the archive is marked complete.