|
Some checks failed
Deploy / build-backend (push) Blocked by required conditions
Deploy / build-worker (push) Blocked by required conditions
Deploy / build-frontend (push) Blocked by required conditions
Deploy / deploy (push) Blocked by required conditions
Deploy / changes (push) Has been cancelled
objective_lots.district хранит МИКРО-вокабуляр ('Уралмаш', 'ЖБИ', ...).
_query_artificial_demand фильтровал сырым АДМИН-именем ('Кировский' с
forecast.py:123) → ol.district='Кировский' = 0 строк → n_sold=0 → §25.5
Artificial Demand 'unavailable' с ложной причиной «нет проданных лотов»
в каждом district-scoped отчёте. Тот же класс бага, что #1211 в
_price_sensitivity.
Patch: импорт resolve_objective_districts + замена сырого
`ol.district = CAST(:district AS text)` на зеркальный паттерн
sales_series._SOURCE_B_SQL / market_metrics._SALES_WINDOW_SQL:
(CAST(:has_district AS boolean) IS FALSE
OR ol.district = ANY(CAST(:districts AS text[])))
Сигнатура _query_artificial_demand / _build_artificial_demand НЕ меняется
— caller остаётся admin-aware на входе.
+5 новых тестов (TestArtificialDemandDistrictResolution: резолвер вызван,
микро в bind, n_sold>0 после фикса), 6 обновлённых SQL-тестов. 21 passed
artificial_demand + 1030 forecasting тестов зелёные. ruff clean.
Closes #1205
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_affordability.py | ||
| test_confidence_engine.py | ||
| test_demand_normalization.py | ||
| test_demand_supply_forecast.py | ||
| test_macro_coefficient.py | ||
| test_macro_series.py | ||
| test_normalize.py | ||
| test_orchestrator.py | ||
| test_product_scoring.py | ||
| test_rate_sensitivity.py | ||
| test_recommendation.py | ||
| test_regression.py | ||
| test_report.py | ||
| test_report_assembler.py | ||
| test_sales_series.py | ||
| test_scenarios.py | ||
| test_special_indices.py | ||
| test_what_to_build.py | ||