fix(market-metrics): window sales by contract_date (#949 CRITICAL) #1036
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#1036
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/949-absorption-contract-date"
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?
REOPENED CRITICAL #949 — absorption ~14x overcount.
_SALES_WINDOW_SQL counted window-sales from objective_lots_history, but history is only ~17 days deep (3 snapshots) -> every currently-sold lot had a sold-snapshot in the window -> window-sales = entire cumulative sold stock. Ground-truth (Автовокзал 6mo): buggy 33,245 vs real 2,308; absorption ~235%/mo with confidence=high; fed forecast #950/#952.
Fix: count window-sales from objective_lots.contract_date in window (real sale date, present on 100% of sold lots: 41,091/41,091). Return contract unchanged; downstream formulas untouched; dead history CTE removed. Regression test (41,091 cumulative vs 2,308 window -> absorption 2.35->0.04). 288 tests green.
Verification = prod compute_market_metrics(Автовокзал) post-deploy. Refs #949