You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GET /api/v1/cron/tick sends messages and prunes rows, so a safe method has side effects #269
/api/v1/cron/tick is registered for both GET and POST (server/app/api/cron.py:209, methods=["GET", "POST"]), and either one runs the whole tick: it sends the due morning and evening digests and reminders to Telegram and prunes rows.
GET is defined as safe: nothing on the way is required to treat it as having effects. Link previewers, crawlers, browser prefetch and monitoring that follows URLs all issue GETs freely. The X-Cron-Secret header is what keeps strangers out, so the exposure is limited to callers that hold the secret — but anything configured with the URL and the header (an uptime monitor pointed at it «to check it is alive», a retrying proxy) sends the digests as a side effect of looking.
Failure scenario. Somebody adds the tick URL, with its header, to an uptime monitor that polls every minute. Each poll is a full tick; the "mark before send" rule keeps a digest from going out twice, but reminders and the prune now run on the monitor's clock, and the monitor's own retries are ticks too.
Why GET exists: the external cron and .github/workflows/reminders.yml call it that way (docs/deploy.md, the external cron). Changing the external cron is the owner's step (#120).
Where it goes. The v2 programme keeps the path, makes the tick POST, and keeps GET only until the external cron and reminders.yml are moved (docs/specs/2026-10-03-one-contract-design.md, «What stays plain HTTP»).
Activity