# Soft-delete flag ignored: pre-release checklist

Source: https://releasefailures.com/incidents/soft-delete-flag-ignored/
Content version: 1.0.0
Verified on: 2026-10-21
Licence: CC BY 4.0

Definition: A new code path ignores a soft-delete flag and exposes or modifies deleted records.
- [ ] PR-01 Seed one soft-deleted row in a test database and confirm that the relationship query, getQuery() and toBase() paths all exclude it. (test class: Integration tests)
- [ ] PR-02 After a framework upgrade, dump the SQL of every relationship query built with toBase() and confirm each contains the deleted_at IS NULL condition. (test class: Integration tests)
- [ ] PR-03 Diff the generated SQL for every soft-deleted model between the old and new framework versions and fail on any dropped scope condition. (test class: Integration tests)
- [ ] PR-04 Before enabling a new batch job in production, run it in dry-run mode against a copy of production data and confirm it would change zero accounts with deactivated status. (test class: Integration tests)
- [ ] PR-05 Write a unit test that passes an already deactivated account to the trial expiration escalation job and asserts its status stays deactivated. (test class: Unit tests)
- [ ] PR-06 Write a unit test that asserts the account state machine has no transition from deactivated to pending deletion. (test class: Unit tests)
- [ ] PR-07 Write a unit test that confirms the notification step skips every account whose status is deactivated. (test class: Unit tests)
