fix(site-finder): L2 hidden-supply не обнуляет неизвестный flat_count (#2445-A3) #2446
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#2446
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/supply-layers-l2-flat-count-null"
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
Аудит-находка A3 (epic #2445). L2-агрегат
compute_layer2_hiddenвsupply_layers.pyмолча коалесилflat_count NULL → 0, из-за чегоGREATEST(0, COALESCE(flat_count,0) - free_flats)= 0 для объектов с реально неизвестным числом заявленных единиц — и всё равно считал их в знаменателе покрытияn_with_free_flats. Итог: инфлейт покрытия + ложные «0 скрытых» вместо честного «неизвестно». Собственный Python-хелпер_hidden_units()уже возвращал None в этом случае — SQL ему противоречил.Fix
Гейт обоих агрегатов (
n_with_free_flatsCOUNT +hidden_unitsSUM) наfree_flats IS NOT NULL AND flat_count IS NOT NULL. Знаменательn_objects_totalне тронут → покрытие честно падает, districts с частично-backfilledflat_countуходят вconfidence='low'. Выравнено с sibling-конвенцией60_/64_v_zk_rosreestr_velocity.sql.Test plan
TestLayer2Hidden)CASTконвенция соблюденаPost-deploy verify
Проверить, что L2 coverage/confidence для частично-backfilled района сдвинулся medium→low (deploy success ≠ применилось).
Refs #2445