feat(forecasting): demand-supply forecast engine (#980, 952-A) #1012

Merged
bot-backend merged 1 commit from feat/952a-demand-supply-forecast into main 2026-06-03 06:56:33 +00:00
Collaborator

Site Finder v2 / EPIC 8 — таск #980 (952-A): центральный движок прогноза §9.7. Детерминированный, без LLM, чистая сборка. ADVISORY.

demand_supply_forecast.py — per-(сегмент×горизонт) DemandSupplyForecast:

  • Demand = pace(§9.2 unit_velocity) × §9.4 norm × §9.5 macro × h (линейно, без компаундинга).
  • Supply = open + hidden×clamp(h/18) + future_online − absorbed (net clamp≥0).
  • deficit_index [-1,+1] (log-saturation; +дефицит/−затоварка; None при supply≤0 — без фейкового бесконечного дефицита).
  • future-конкуренты §9.7 через get_competitors(horizon).

⚠️ β считается РОВНО ОДИН раз (через §9.4; §9.5 ортогонален; rate_sensitivity только для фразы) — доказано adversarial-тестом. confidence=MIN, cap medium, advisory=True.

89 тестов (forecasting/ всего 360). code-reviewer opus (все 6 чеков численно: β-once, deficit-знак, graceful, reuse). Closes #980. Refs #952

**Site Finder v2 / EPIC 8 — таск #980 (952-A): центральный движок прогноза §9.7.** Детерминированный, без LLM, чистая сборка. **ADVISORY**. `demand_supply_forecast.py` — per-(сегмент×горизонт) `DemandSupplyForecast`: - **Demand** = pace(§9.2 unit_velocity) × §9.4 norm × §9.5 macro × h (линейно, без компаундинга). - **Supply** = open + hidden×clamp(h/18) + future_online − absorbed (net clamp≥0). - **deficit_index** [-1,+1] (log-saturation; +дефицит/−затоварка; None при supply≤0 — без фейкового бесконечного дефицита). - future-конкуренты §9.7 через get_competitors(horizon). ⚠️ **β считается РОВНО ОДИН раз** (через §9.4; §9.5 ортогонален; rate_sensitivity только для фразы) — доказано adversarial-тестом. confidence=MIN, cap medium, advisory=True. **89 тестов** (forecasting/ всего 360). code-reviewer opus ✅ (все 6 чеков численно: β-once, deficit-знак, graceful, reuse). Closes #980. Refs #952
bot-backend added 1 commit 2026-06-03 06:56:32 +00:00
Assemble merged §9.x services into per-(segment×horizon) DemandSupplyForecast:
demand (§9.2 pace × §9.4 norm × §9.5 macro, linear no-compound) vs supply
(open + phased hidden h/18 + future_online − absorbed, §9.3) → balance /
deficit_index[-1,+1] + §9.7 future competitors. Pure synthesis, no §9.x math
rebuilt; β counted EXACTLY ONCE (via §9.4 only; rate_sensitivity surfaced for
phrase only; §9.5 orthogonal). Supply net clamped ≥0; deficit_index None on
supply≤0 (no fake infinite deficit). confidence=MIN(components) capped medium;
advisory=True always. Deterministic, no LLM, no SQL, un-wired. 89 unit tests
(pure helpers + mocked orchestrator incl. adversarial β-once test), all green.
bot-backend merged commit 70ffa399fc into main 2026-06-03 06:56:33 +00:00
bot-backend deleted branch feat/952a-demand-supply-forecast 2026-06-03 06:56:34 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#1012
No description provided.