mirror of
https://github.com/bitbaum/vitareba.git
synced 2026-12-05 08:08:36 +01:00
cron/signals incremented `alerts++` inside the per-admin Promise.allSettled
result loop, so 1 patient going critical with 3 admins reported
{ alerts: 3 } in the response body. Made the cron's observability
number meaningless — Manuel checking the day's run could not
distinguish "3 patients went critical" from "1 patient with our 3
admins on the distribution list".
Now the per-admin loop logs failures only; alerts increments once
per critical-transition iff at least one admin send succeeded.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>