gendesign/backend/app
Light1YT c8000d1089
All checks were successful
CI / changes (push) Successful in 7s
CI / frontend-tests (push) Has been skipped
CI / changes (pull_request) Successful in 6s
CI / frontend-tests (pull_request) Has been skipped
CI / backend-tests (push) Successful in 6m24s
Deploy / changes (push) Successful in 6s
Deploy / build-backend (push) Successful in 1m46s
Deploy / build-worker (push) Successful in 2m55s
CI / backend-tests (pull_request) Successful in 6m20s
Deploy / build-frontend (push) Has been skipped
Deploy / deploy (push) Successful in 1m10s
test(parcels): integration EXPLAIN-gate для analyze hot-path SQL (#1198)
PR #1195 ввёл CTE alias `overlaps` (PG keyword для time-period operator)
→ каждый POST /analyze падал с syntax error ~10ч до hotfix PR #1197. Mock-БД
в tests/api/v1/test_*.py не поймала: MagicMock на db.execute() не парсит SQL.

Расширяет существующий phantom-column gate (tests/integration/) на
_neighbors_summary и parcel_ird_overlaps SQL:

1. _NEIGHBORS_SUMMARY_SQL вынесен из inline-text в module-level constant
   в parcels.py (паттерн как в best_layouts/ird_overlay_lookup/krt_lookup).
   Заодно сконвертирован на canonical CAST(:wkt AS text) — backend.md rule.
2. EXPLAIN-тесты через phantom_check_session (SSH-туннель к prod-PG) —
   skip без TEST_DATABASE_URL, run в спец CI job.
3. Compile-time guards (всегда работают, без БД):
   - CTE-alias не должен быть PG-keyword (overlaps/user/current_date/select/where)
   - SQL не должен содержать :bind::type (psycopg v3 antipattern)

Поймал бы:
- #1195 (CTE alias overlaps) — оба EXPLAIN-тест + compile-time keyword guard
- :type recurring class — compile-time parametrized guard
- Phantom column / typo PostGIS function — EXPLAIN parses + plans

Refactor backward-compatible: _neighbors_summary использует ту же константу,
behavior идентичен. 26 unit-тестов parcels analyze продолжают зелёные.

Refs #1198
2026-06-13 09:43:49 +05:00
..
api test(parcels): integration EXPLAIN-gate для analyze hot-path SQL (#1198) 2026-06-13 09:43:49 +05:00
core feat(sf): cross-load ETL tradein→gendesign newbuilding_listings — вариант A (#976) 2026-06-12 11:18:47 +03:00
models feat(jobs): centralized job_settings API + DB-driven beat schedule 2026-05-11 15:38:13 +03:00
observability feat(backend): sentry-sdk init для FastAPI + Celery (#204 backend) (#207) 2026-05-16 15:09:16 +00:00
schemas feat(chat): deterministic §22 chat foundation — POST /api/v1/chat/ask (no LLM) 2026-06-08 17:21:51 +05:00
scrapers Merge pull request 'feat(#263 sub-A): cad_* overlay schemas + cadastre territorial_zones (ПЗЗ)' (#265) from feat/263-sub-a-cad-nspd-overlay-schemas-and-pzz into main 2026-05-17 07:50:08 +00:00
services fix(forecasting): нормализовать dict-district в build_site_finder_report (#1130 follow-up) 2026-06-13 09:24:55 +05:00
templates feat(sf-b7): GET /parcels/{cad}/snapshot.pdf — 1-page WeasyPrint export (#334) 2026-05-17 21:11:03 +00:00
workers feat(sf): cross-load ETL tradein→gendesign newbuilding_listings — вариант A (#976) 2026-06-12 11:18:47 +03:00
__init__.py init 2026-04-25 13:45:19 +03:00
main.py feat(chat): deterministic §22 chat foundation — POST /api/v1/chat/ask (no LLM) 2026-06-08 17:21:51 +05:00