Files
daniel e327437f2c feat: add daily-health-report Cloudflare Worker with Telegram digest
Adds a proactive daily heartbeat, since the existing Telegram flows
(docs-monitor, pulse) only notify on change/error/weekly schedule and never
confirm "everything's fine." Runs at 14:00 UTC (10:00 AM EDT) and reports:

- Dashboard site health (reuses the existing /api/health-check endpoint)
- Unresolved Sentry issues from the last 24h across all 3 Sentry projects
  (aitmpl-workers, aitmpl-dashboard, aitmpl-cli)

Does NOT poll the other 3 workers' /status endpoints directly — Cloudflare
blocks Worker-to-Worker fetches over the public *.workers.dev hostname
within the same account (error 1042, confirmed via wrangler dev --remote).
Their health is covered by their own Sentry Cron Monitor check-ins instead.

Also adds a /status endpoint to aitmpl-crons (cloudflare-workers/crons/index.js)
for consistency with the other workers, even though it isn't polled here.

Verified end-to-end: manual /trigger call returns a clean report and
successfully delivers to Telegram (message_id confirmed). Sentry summary
section requires SENTRY_AUTH_TOKEN + SENTRY_ORG_SLUG secrets (pending —
degrades gracefully to "not configured" until set).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-04 18:54:27 -04:00
..