feat(forecasting): activate §25.3 cannibalization timing axis (#1169) #1176
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1176
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/cannibalization-timing-1169"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Activates the §25.3 cannibalization timing axis (the deferred follow-up from #1169 PR2).
_build_cannibalizationalready hadcandidate_release_monthplumbed but unfed; this derives it from the §25.1 Launch Window peak-deficit horizon and threads it in.candidate_release_month = date.today() + launch_window_horizon_months(first-of-month) — when the recommended project would actually hit the market.compute_special_indicesnow computes Launch Window once and reuses it (injected back as a no-op closure) — no double-compute of the expensive demand/supply forecast.candidate_release_month=None→ timing axis excluded (None-not-0, not fabricated); cannibalization still scores on class+price+geo._add_monthshelper: pure stdlib (no dateutil), year-boundary safe (Oct+6→Apr next year, Dec+1→Jan), first-of-month.date.today()read once, everything downstream pure.§25.3 axes now: class + price + timing + geo active; unit-mix remains phase-2 (needs a project-level recommended mix).
Test plan
uv run pytest tests/services/forecasting/test_special_indices.py -q→ 168 passed (+18:_add_monthsincl. year-boundary, horizon extraction, candidate-month derivation, timing-contributes-when-LW-resolves, near>far, timing-excluded-when-LW-absent, determinism)ruffclean;mypy special_indices.py→ 0 errors in file (pre-existing baseline elsewhere out of scope)Activation note
Fully lights up once
OWN_DEVELOPER_IDSis set (own-portfolio populated) — until then cannibalization runs the labelled proxy. The timing axis logic is unit-test-verified now.Refs #1169