feat(site-finder): backfill ЕКБ зон-регламента — разблокировать видимость финмодели (#1881) #1889
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#1889
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/zone-regulation-backfill"
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?
Summary
Главный лимит видимости финмодели (эпик #1881):
financial_estimateфаерит только при разрезолвленном НСПД-регламенте (max_far), который резолвится лениво при анализе →zone_regulation_cacheвсего 33 зоны → у большинства участковfinancial_estimate=None(«—» в кокпите). Backfill проактивно кэширует ВСЕ террзоны ЕКБ (~100-120) → любой участок в известной зоне сразу получает регламент и финмодель.Изменения (6 файлов, +495)
backfill_ekb_zone_regulations(zone_regulation.py): WFS-перечисление террзон (features_in_bbox 'territorial_zone') → dedup поurban_index(предпочитает фичу с геометрией) →representative_point(внутри полигона) →zone_regulation_at→upsert. Идемпотентно (cached-skip перед fetch), per-zone try/except (сбой не рушит batch), rate_delay, limit.backfill_zone_regulations+ регистрация вcelery_appinclude + adminPOST /api/v1/admin/scrape/zone-regulations/backfill(паттерн objective sync-our).refresh_zone_regulations/get_or_fetch/upsertНЕ тронуты (additive).Test plan
tasks.backfill_zone_regulations.backfill_zone_regulations)POST .../zone-regulations/backfill→ закэширует ~70-90 новых зон (~5 мин) → financial_estimate станет виден для большинства участковИдемпотентность / безопасность
cached-skip перед любым geoportal-вызовом; per-zone isolation (begin_nested + commit на зону); rate_delay вежливость; bounded loop. Повторный прогон = enumerate + skip.
Refs #1881
🤖 Generated with Claude Code