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#2140
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/tradein-v2-be1-be2-contract"
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
Завершают data-contract нового UI
/trade-in/v2. Additive, скраперы не тронуты — значения уже считаются, их надо просто отдать.#2043 BE-1 — cv / source_counts / created_at + /history.sources_used + cache-KPI
AggregatedEstimate+=cv(float|None),source_counts(dict[str,int]),created_at._cv_from_ppm2/_source_counts;cvпрокинут черезPricingResult— anchor-путь берёт CV комплов (anchor["cv"]), radius-путь — CV радиусной ₽/м²-выборки.source_countsпо ПОЛНОЙ выборке (metadata_lots) до top-N отсечки.POST /estimateвозвращает все три;GET /estimate/{id}пересчитываетcv/source_countsиз сохранённых analogs (best-effort) +created_atиз колонки./history: +=sources_used→ разлочивает колонку «ИСТОЧНИКОВ N/7»./cache-stats: +=avg_median_price(по median_price>0) +repeat_address_pct(доля неуникальных адресов). Честный best-effort по persisted-оценкам.#2044 BE-2 — optional radius_m
radius_m+estimate_qualityуже в main (e23dabe4); здесь остаток:GET /estimate/{id}/house-analyticsи/sell-time-sensitivityпринимаютradius_m(int|None) query-param. None → байт-идентичная авто-логика (300 м при <8 записях); задан → явный радиус, клампится [100,5000].Test plan
ruff check app/— cleanpytest— 2733 passed (1 pre-existing unrelated fail:test_search_api::test_search_cache_hit, падает и на base main)_cv_from_ppm2/_source_counts/_price_from_inputscv (radius+anchor) /radius_mbounds+None-preserves-default701795d8/ Белинского 86) — post-merge, главная сессияCloses #2043
Closes #2044
Данные уже считаются в estimator — отдаём наружу для /trade-in/v2 (снимает approximate-флаги CV / счётчиков источников / даты отчёта / «ИСТОЧНИКОВ N/7»). - AggregatedEstimate += cv (float|None), source_counts (dict[str,int]), created_at. - estimator: _cv_from_ppm2 / _source_counts helpers. cv прокинут через PricingResult — anchor-путь берёт CV комплов (anchor["cv"]), radius-путь — CV радиусной ₽/м²-выборки. source_counts считается по ПОЛНОЙ выборке (metadata_lots) до top-N отсечки. created_at = момент создания. - POST /estimate возвращает все три; GET /estimate/{id} пересчитывает cv/ source_counts из сохранённых analogs (best-effort) + created_at из колонки. - /history: += sources_used (jsonb) в проекции → колонка «ИСТОЧНИКОВ N/7». - /cache-stats: += avg_median_price (по median_price>0) + repeat_address_pct (доля строк с неуникальным address). Честный best-effort по persisted-оценкам. Refs #2043