feat(forecasting): §25.3 cannibalization unit-mix axis (4/4), gated (#1169) #1180
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#1180
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/cannibalization-unitmix-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 unit-mix axis — the 4th and final axis. §25.3 now scores a candidate vs own-portfolio on class + price + timing + unit-mix (+ geo weight).
recommend_mixbuckets[].share_pct(the same rule-based квартирография as §22product_tz), extracted + normalized to{bucket: share}._canonical_room_bucketfolds two disjoint key vocabularies into one room-count space:recommend_mixRU labels ("1-к 30-45", "80+ м²") ↔ manualown_planned_projectLatin keys ("1k"). Without it the L1 similarity would silently be 0 (no shared keys) — load-bearing, verified by code-review.recommend_mixis heavy, so it's derived only when the own-portfolio has ≥1 project with a non-emptyunit_mix.get_own_portfoliofetched once incompute_special_indices, threaded into_build_cannibalization(no double-fetch). WithOWN_DEVELOPER_IDSunset (empty portfolio) → zero added cost on the hot §22 report path.Test plan
uv run pytest tests/services/forecasting/test_special_indices.py -q→ 205 passed (+ cross-vocab alignment, share extraction, gate call_count==0/1, single-fetch, all-4-axes, determinism)Honesty note
Unit-mix only fires for manual-future own-projects that have a mix set (domrf-current projects carry
unit_mix=None) — narrow until manual portfolio data exists. Like the rest of own-portfolio cannibalization, it's dormant untilOWN_DEVELOPER_IDSis configured. Axis is correct, just data-starved — documented.Refs #1169