2.7 KiB
2.7 KiB
Smoke Checklist Before Launch
1) Automated checks
Run from project root:
/home/vlad/dev/Solo_bot/venv/bin/python -m compileall /home/vlad/dev/Solo_bot -q
Run unit tests from writable directory (to avoid log file permission side effects):
cd /tmp
PYTHONPATH="/home/vlad/dev/Solo_bot" /home/vlad/dev/Solo_bot/venv/bin/python -m unittest discover -s "/home/vlad/dev/Solo_bot/tests" -q
Expected result:
- test suite exits with code
0 - all tests pass
1.1) Runtime start convention
- For this project, the canonical full runtime start command is
sudo python3 main.py - Do not treat root-owned runtime artifacts in
alembic/or/tmpas a permissions bug by default - Do not change ownership or permissions during smoke checks unless explicitly requested
- If you need isolated checks, it is still acceptable to run
uvicorn api.main:appornpm run devseparately, but that is not the primary production-like startup path
2) Core migration checks
- Start app in staging once and verify DB init passes:
- account schema migration
- tg mirror backfill
- Confirm no missing column errors for:
tg_idmirrors in billing-related tablescreated_by_tg_idfor scheduled broadcasts
3) Identity and actor checks
Validate these three scenarios end-to-end:
tg-onlyuser:- bot flow works
- actor surface resolves as telegram
web-onlyuser:- auth/login works without Telegram
- billing user is created with internal
users.id
linkeduser:- link Telegram to existing web account
- ensure billing remains on same
users.id - Telegram notifications use chat id, not internal id
4) Payment and temporary state checks
- Create temporary payment state and complete payment via webhook simulation
- Verify:
- temporary state is found/cleared correctly
- payment row uses
user_idbilling relation tg_idmirror is populated when Telegram exists
- Ensure no message send attempts to internal
users.idaschat_id
5) Gifts and referrals checks
- Gift creation:
- sender resolves by legacy ref
- gift stores
sender_user_idand mirrorsender_tg_id
- Referral creation:
- self-referral blocked
- valid referral stored on billing ids
- mirrors updated where applicable
6) Scheduled broadcasts checks
- Create broadcast by legacy creator ref
- Verify:
created_by_user_idis resolved when user existscreated_by_tg_idmirror is stored- listing by
created_by_tg_idworks
7) Runtime warnings to monitor
- Pydantic warning about
model_custom_emoji_idis non-blocking but should be cleaned later - Deprecation warnings for
datetime.utcnow()are non-blocking but should be migrated to timezone-aware UTC