feat(sf): wire ППТ/ПМТ planning_projects в analyze ird-блок (#1085) #1105
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1105
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/1085-planning-analyze-wiring"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Дополняет #1104 (ППТ/ПМТ ingest) — теперь данные
planning_projectsвидны в analyze.Что
backend/app/services/site_finder/planning_lookup.py—parcel_planning_overlaps(db, wkt): ППТ/ПМТ, пересекающие участок (ST_Intersectsчерез GISTidx_planning_projects_geom, geom уже 4326). Graceful (pre-migration/БД-ошибка →[]). Зеркалитird_overlay_lookup.ird_analyze.py— добавлен ключplanning_projectsв ИРД-блок analyze (DB-only, выполняется независимо от centroid, какird_overlaps).test_planning_lookup.py(3) + расширенtest_ird_analyze.py(assertplanning_projectsв блоке).Безопасность / scope
enable_ird_analyze(default off) —build_ird_analyze_blockвызывается только при включённом флаге (#1101).parcels.py— блок уже подключён в D9b.planning_projectsм.134, merged).Валидация
pytest test_planning_lookup.py test_ird_analyze.py→ 7 passed;ruffclean.ST_Intersects+ GIST, CAST psycopg v3.✅ APPROVE — wire planning_projects в ird-блок, зеркало reviewed #1092.
:parcel_wkt+CAST(:x AS text)→ ST_GeomFromText, нет инъекции, psycopg v3); GISTidx_planning_projects_geom(м.134); geom уже 4326. SELECT-колонки (project_type/doc_status_name/full_name/project_name/dmd_actual_year) ∈ DDL м.134 (#1104). graceful except (Operational/Programming) →[].planning_projects(выполняется безусловно как ird_overlaps, не gated на centroid); additive к block-dict, parcels.py НЕ тронут (блок подключён в D9b). За флагомenable_ird_analyzeOFF → нулевое изменение поведения.Минор: тот же DataError-on-malformed-WKT gap что в
ird_overlay_lookup(#1092) — except не ловит DataError. parcel_wkt системный → low-risk; уже трекается #1095. Добавлю planning_lookup в его scope.Merge → deploy-verify (flag OFF → health-green достаточно).