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
The self-check's schema check alerts the owner while a revision is applied before its merge, as the project requires #360
The tick's self-check (server/app/services/health.py, check_schema, on the monitoring branch, #359) reads failing whenever the database's revision differs from EXPECTED_REVISION, in either direction. A database ahead of the code is the window the project's own migration order creates on purpose: every additive revision goes on before the merge that needs it (CLAUDE.md, «Run the migration BEFORE the merge»), and api/public.py:_drift_detail already calls that window «the documented procedure working».
Failure scenario: with #359 merged and production running its code at 0019, the next additive revision 0020 is applied through Neon before its pull request merges. The next tick finds the database at 0020, ahead of the code's 0019, and writes to the owner «🔴 Схема базы не совпадает с кодом»; once the merge deploys, «🟢 … простой N мин». That happens on almost every migration, so the alarm is learnt as noise — and ignored on the day the order really is wrong (a database behind the code, which takes the bot down).
Fix, in #359 before it merges: when both revisions are numbers and the database is ahead, check_schema reads ok with a reason saying so («database at 0020, ahead of code at 0019: migrated before its merge»), as /api/v1/warmup reads the same window; behind stays failing. A deploy that never arrives is the deploy check's to report, after its fifteen minutes. Found by the final review of the monitoring branch.
Activity
Read a database ahead of the code as the window a migration opens, no…
Hand over the monitoring: the self-check, the alerts, Sentry and the …