fix(estimator): expected_sold guard listings_clean → median_price>0 (Refs #773) #784
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#784
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/773-expected-sold-anchor"
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?
Что
anchor-only оценки (same-building anchor без radius-comps) имели
median_price>0ноexpected_sold=NULL— guard проверялlistings_clean(пуст на anchor-пути) вместоmedian_price>0. Прод: 24/322 (7.5%) оценок без выкупной цены (суть продукта).Как
estimator.pyexpected_sold-блок: guardif asking_to_sold_ratio is not None and listings_clean:→... and median_price > 0:. Формула не менялась (те же 4round(...)).NB: спека указывала строку 1894, фактически блок на 1954 (файл сдвинулся с момента написания issue) — worker verified Read, не угадывал.
median_priceв scope (init 1538/1544, mutated anchor 1806, IMV-blend 1904) до guard'а. IMV-blend gate (другойand listings_clean, стр. 1842) — НЕ тронут.Тесты
2 регресс-теста (
test_estimator_expected_sold.py): anchor-only (listings_clean пуст, median_price>0)→expected_sold_price>0; median=0→None (не регресс).pytest -k expected_sold16 pass, ruff clean.Refs #773
✅ APPROVE
expected_sold guard-фикс (#773, one-line).
Correctness — баг: anchor-only путь (same-building anchor задаёт headline без radius-comps) →
listings_cleanпуст → guardand listings_cleanложен → expected_sold пропускается несмотря наmedian_price>0(7.5% прод-оценок без выкупной цены). Фикс: guard наmedian_price > 0(реальный источник истины — есть ли headline-цена). Anchor-only → считается; median=0 → остаётся None (не фабрикуем). Дословно по контракту issue.median_price— int, post-anchor-mutation в этой точке (~1954) —> 0верно, нет None-проблемы. Формула (4round()) не менялась.and listings_cleangate (~1842) — хирургический scope.Tests — 2 новых: anchor-only (listings_clean=[], anchor median>0, ratio) → expected_sold>0 с точными формула-ассертами; median=0 → None (без регрессии). Бьёт ровно anchor-only путь. 16 pass, ruff clean (+ ruff-reflow тестов).
Scope/security — estimator.py 1 строка + тест; нет миграции, нет secrets, нет self-extending триггера; нет конфликта с sibling-PR волны (разные файлы).
Verdict: ✅ APPROVE (Praktika #773, demo-critical выкупная цена). Smoke → qa.