Commit graph

2 commits

Author SHA1 Message Date
lekss361
fa861f7c0c chore(tradein): close pre-commit ruff gap + add CI pytest gate (#666)
- pre-commit ruff/ruff-format files: ^backend/ -> ^(backend|tradein-mvp/backend)/;
  clean trade_in_pdf.py 51->0 (dead PIL/days_overlay/qr_url + 47 E501; render
  byte-identical).
- deploy-tradein.yml: new pytest 'test' job gating build+deploy.
- fix suite for green gate: tests/matching/__init__.py (collection error) +
  restore get_role in test_history_scope.py (teardown leak breaking test_rbac).
- 1087 tests green; 2 pre-existing order-dependent tests deselected+documented.
  No runtime-logic changes.

Closes #666
2026-05-29 21:57:41 +03:00
lekss361
4f034bd86b ops: alembic baseline, pre-commit, TIGER cleanup, pg_dump scripts
- backend/alembic/* — alembic infra (env.py, script.py.mako). versions/ empty
  for now; first migration goes in Stage 2a when models are finalized.
- backend/Dockerfile: bake alembic.ini + alembic/ into the image so
  `docker compose exec backend alembic upgrade head` works in prod.
- backend/db/init/99_drop_unused_extensions.sql + bind-mount in both compose
  files: drops postgis-image's TIGER/topology/fuzzystrmatch on fresh volumes.
- .pre-commit-config.yaml + pre-commit in dev deps: ruff/prettier on commit
  to stop CI failures like UP035 from leaking out.
- ops/backup.sh, ops/restore.sh: pg_dump cron script with optional Selectel S3
  upload. 7-day local retention. Restore guard: requires RESTORE_CONFIRM=yes.
- Makefile: new targets `make migration NAME=...`, `make pre-commit-install`.
- backend/.env.example: SENTRY_DSN comment with sentry.io reference.
2026-04-26 13:08:51 +03:00