mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
The sweep that retires an appointment reminder no visit claims had no test of its own. Two now, because the rule has two halves and only one of them is obvious. It reaps a live row nothing points at, and it must leave a row whose only claimant is a soft-deleted visit. That second half is the subtle one: the sweep matches on the relation and does not read the visit's tombstone, so a deleted visit still owns its nudge and restoring the visit finds it intact. A future change that "tidied" the predicate by also excluding tombstoned visits would destroy that on the next unrelated write, and nothing else would notice. The visit is tombstoned directly rather than through the delete route, which retires the reminder deliberately and would have proven nothing.