REOPENED. _SALES_WINDOW_SQL derived "sales in window" from objective_lots_history snapshots, but history is only ~17 days deep — every currently-sold lot had a sold-snapshot in the window, so window-sales collapsed into the entire cumulative sold stock (Автовокзал 6mo: 33,245 vs real ~2,308). Inflated absorption_rate (~235%/mo with confidence=high), months_of_supply, unit_velocity, liquidity, demand_concentration → contaminated forecast #950/#952. Count window sales directly from objective_lots by contract_date in the window (the real sale date — present on 100% of sold lots: 41,091/41,091). Return contract of _query_sales_window unchanged (units/area/by-room ROLLUP); downstream formulas untouched. Removed the now-dead objective_lots_history JOIN/CTE. Regression test: lots sold outside window (contract_date out of range) not counted (41,091 cumulative vs 2,308 window → absorption 2.35→0.04). 288 tests green. Verification = prod compute_market_metrics(Автовокзал) post-deploy. Refs #949 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| best_layouts.py | ||
| cadastre_fetch.py | ||
| competitors.py | ||
| custom_pois.py | ||
| filters.py | ||
| future_supply.py | ||
| gate_verdict.py | ||
| layout_signature.py | ||
| layout_velocity_refresh.py | ||
| macro.py | ||
| market_metrics.py | ||
| noise_loader.py | ||
| parser.py | ||
| poi_loader.py | ||
| poi_score.py | ||
| pzz_loader.py | ||
| quarter_dump_lookup.py | ||
| quarter_price_index_refresh.py | ||
| quarter_price_refresh.py | ||
| scorer.py | ||
| supply_layers.py | ||
| velocity.py | ||
| weight_profiles.py | ||