feat(site-finder): supply_layers v2 compute service (#950 EPIC6 step3+4) #1004
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1004
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/950c-supply-layers-service"
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?
Site Finder v2 / EPIC 6 — #950 Step 3+4. Детерминированный, без LLM, read-only compute. Часть #944.
Сервис
supply_layers.py— считает 3 слоя склада предложения (§9.3) и возвращаетSupplyLayerRowdataclasses (воркер #950 Step 5 UPSERT-ит их вsupply_layersm.125). Зеркалит house-stylemarket_metrics.py(frozen dataclass, _SQL consts, graceful-to-empty, pure helpers,CAST(:x AS type)).objective_lotsavailable по district x class (objective/high).SUM max(0, flat_count - free_flats)по district, mapping-free черезdomrf_kn_objects(free_flats m.124) — БЕЗ domrf<->objective join (обходит 2.5% маппинг). domrf_declared, medium/low по покрытию free_flats. NULL free_flats исключены (нет sold-колонки).Latest-snapshot
DISTINCT ON (obj_id)защищает от cross-snapshot double-count (domrf_kn_objects = UNIQUE(obj_id, snapshot_date)). Только whitelist source/confidence (m.125 CHECK). 45 unit-тестов, ruff clean. code-reviewer opus OK (все колонки существуют против реального schema; latest-snapshot фильтр верен; L1 зеркалит market_metrics; psycopg v3). Refs #950