"""CLI wrapper for the channel×region forecast allocation.

The logic lives in backend/services/forecast_detail_service.py (so the forecast
run can call it directly). This just runs it for the latest run.

    py scripts/allocate_forecast_detail.py
"""
from __future__ import annotations

from backend.services.forecast_detail_service import allocate

if __name__ == "__main__":
    res = allocate()
    print(f"run_id={res['run_id']}: wrote {res['detail_rows']} detail rows from "
          f"{res['forecast_rows']} forecast rows ({res['skipped']} SKUs skipped).")
