main
The client acks a frame as soon as it arrives — that is how an online device stops being re-told — and the service recorded that ack in acked_at, the column the drain-to-empty rule counts. Measured on an Android 15 emulator: the owner's trigger reached the subscriber at .562 and the alert was destroyed 27 ms later, mid-siren, so the owner's disarm answered ERR_ALERT_NOT_FOUND. alarm_deliveries now carries two timestamps. delivered_at is the receipt (the WS ack frame and the offline check-in): it retires re-delivery and nothing else. acked_at is the human dismissal (ackAlarm): only that ends the alert, once every subscription's row is dismissed. Migration 011 adds the column and replaces the pending index with an undelivered one. ackAlarm also runs the drain check on every explicit dismissal, not only when this call cleared a row: a receipted row still has to be dismissed. Also fixed, found by the same probe run: db.Close left the closed pool as the process singleton (a second probe inherited it), and the lifecycle probe's three subscriptions shared one device id, which migration 010 made illegal. Verified: both probes pass against the live dev database, including the new receipt-vs-dismissal case; migration 011 applied to the dev DB.
Description
No description provided
214 KiB
Languages
Go
94.5%
PLpgSQL
3.4%
HTML
0.8%
Python
0.5%
Dockerfile
0.4%
Other
0.4%