Skip to content

Point the external cron at the tick, and check DADATA_TOKEN really works #120

Open

Description

@lumenpearson

Only the owner can do these. Two live-service items that no test reaches.

1. The external cron is what actually keeps the promise. The bot tells people «в течение примерно пяти минут», and .github/workflows/reminders.yml asks for a tick every five minutes and delivered 6.7 a day over five days of measurement, in gaps of two to six and a half hours. It is a fallback, not the clock. docs/deploy.md has the setup for a real cron service.

The trap: CRON_SECRET lives in two places — the server's environment and whatever calls the tick — and nothing checks that they match. Set them separately, mistype one, and GET /api/v1/cron/tick answers 403 Bad cron secret on a schedule while both halves look perfectly configured. An unset one on the server side answers 404 Cron is not configured instead, which at least names itself.

2. DADATA_TOKEN on Vercel — Production and Preview, and it is the API key, not the secret one. A live DaData has never been asked a question from this deployment. Without it the school search refuses at the door and the bot asks for the name to be typed, which works; with a wrong key it also refuses, and the two look the same from outside.

Both are recorded in HANDOVER.md section 7.

Metadata

Metadata

Assignees

Type

No type

Projects

  • Status
    Ready

Relationships

None yet

Development

No branches or pull requests

Issue actions