gendesign/backend/tests/services/site_finder
Light1YT f8daf50f5f feat(site_finder): future-supply-pressure index (#950 Step 6)
Add backend/app/services/site_finder/future_supply.py — deterministic,
no-LLM §9.3 composite quantifying queued competing supply (hidden + future)
vs market absorption, computed on-the-fly (not stored).

- Reads VIEW v_supply_layers_latest (incl. non-derivable graddoc_stub/
  insider_manual L3 rows), not a layer recompute.
- Reuses market_metrics.compute_market_metrics for monthly absorption
  (available / months_of_supply == sold/mo; algebra verified).
- months_of_pressure = (hidden + future_by_horizon) / absorption/mo;
  index = linear-clamp saturation at 18mo (1.5x EKB cycle); confidence=MIN
  (thin L2/L3 honestly drags composite to low).
- L3 horizon-weighted (NULL expected_online_date -> neutral 0.5);
  open excluded from numerator (only hidden+future compete with a new object).
- Graceful: empty/thin/no-absorption -> index None + low, div-by-zero guarded.
- 54 unit tests (pure-helper math + mocked db/market_metrics).
2026-06-03 01:57:29 +05:00
..
test_best_layouts.py fix(sf-09): capacity-aware redistribute (round 2) — bounded + correct invariant 2026-05-17 15:30:50 +03:00
test_competitor_relevance.py feat(site-finder): per-competitor relevance_weight (#949 PR B) (#1000) 2026-06-02 19:45:38 +00:00
test_future_supply.py feat(site_finder): future-supply-pressure index (#950 Step 6) 2026-06-03 01:57:29 +05:00
test_macro.py feat(site-finder): macro_indicator table + backfill + reader (#945 PR A) (#963) 2026-06-02 18:41:28 +00:00
test_market_metrics.py feat(site_finder): market-metrics service (#949 PR A, §9.2) (#997) 2026-06-02 19:26:26 +00:00
test_supply_layers.py feat(site-finder): supply_layers v2 compute service (#950 EPIC6 step3+4) (#1004) 2026-06-02 20:34:26 +00:00