From 7af9de4a9a2a58de7b52fcab96035bf99aece205 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Sun, 6 Sep 2026 11:33:11 -0400 Subject: [PATCH] The rollup's check-in tells Sentry its schedule A bare ping to a slug Sentry has never been told about is accepted and dropped, so the rollup monitor never existed and a missed night would have alarmed nobody. The check-in now carries the monitor's shape and upserts it. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG --- deploy/wizwar-rollup.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/deploy/wizwar-rollup.sh b/deploy/wizwar-rollup.sh index 84d43c9..b39bdd4 100755 --- a/deploy/wizwar-rollup.sh +++ b/deploy/wizwar-rollup.sh @@ -14,7 +14,14 @@ OUT="/var/lib/wizwar/rollup.jsonl" LOG="/var/log/wizwar/rollup.log" DAY="${1:-$(date -u -d 'yesterday' +%Y-%m-%d)}" CRON_URL=$(cat /root/.wizwar-sentry-cron-rollup 2>/dev/null || true) -checkin() { [ -n "$CRON_URL" ] && curl -sf -o /dev/null "$CRON_URL?status=$1" || true; } +# The check-in carries the schedule: Sentry only keeps a monitor it has +# been told the shape of, and a bare ping to an unknown slug is accepted +# and dropped without a word. +checkin() { + [ -n "$CRON_URL" ] && curl -sf -o /dev/null -X POST -H "Content-Type: application/json" \ + -d "{\"status\":\"$1\",\"monitor_config\":{\"schedule\":{\"type\":\"crontab\",\"value\":\"10 0 * * *\"},\"checkin_margin\":30,\"max_runtime\":10,\"timezone\":\"UTC\"}}" \ + "$CRON_URL" || true +} checkin in_progress if python3 - "$DAY" "$OUT" <<'PY' >> "$LOG" 2>&1