🔄 Migrate velocity + analytics_queries: domrf_kn_sale_graph → objective_corpus_room_month #156

Closed
opened 2026-05-15 06:06:57 +00:00 by lekss361 · 0 comments
lekss361 commented 2026-05-15 06:06:57 +00:00 (Migrated from github.com)

Problem

User report 2026-05-15: D2 velocity-score возвращает null для cad 66:41:0204016:10 потому что domrf_kn_sale_graph table устарела на 4 месяца (последний месяц 2026-01).

Data quality comparison

Source Newest month Rows w/ deals (last 6mo) Total deals
objective_corpus_room_month 2026-05-01 3486 12742
domrf_kn_sale_graph 2026-01-01 849 11319

Antonov's Objective integration (PR #91/#94 / event Objective_Integration_May07_2026) даёт фresh + comprehensive data. velocity service использует устаревший источник.

Usages в коде (grep)

  • backend/app/api/v1/parcels.py:1854 — D2 velocity-score comment
  • backend/app/services/site_finder/velocity.py — main velocity service
  • backend/app/services/analytics_queries.py:688,692,948,950,1114,1197,1478,1589 — 6+ functions

Acceptance

  • velocity.py refactored на objective_corpus_room_month + linkage через objective_complex_mapping (114 mappings) → domrf_kn_objects.obj_id
  • analytics_queries.py functions с velocity / sales analytics migrated (НЕ snapshot-based queries — те для исторических данных)
  • velocity для cad 66:41:0204016:10 возвращает не-null result через chrome-devtools e2e test
  • Tests updated
  • Vault: Module_Velocity_Service.md updated с new data source
## Problem User report 2026-05-15: D2 velocity-score возвращает `null` для cad 66:41:0204016:10 потому что `domrf_kn_sale_graph` table **устарела на 4 месяца** (последний месяц 2026-01). ## Data quality comparison | Source | Newest month | Rows w/ deals (last 6mo) | Total deals | |---|---|---|---| | `objective_corpus_room_month` | **2026-05-01** | 3486 | 12742 | | `domrf_kn_sale_graph` | 2026-01-01 | 849 | 11319 | Antonov's Objective integration (PR #91/#94 / event `Objective_Integration_May07_2026`) даёт фresh + comprehensive data. velocity service использует устаревший источник. ## Usages в коде (grep) - `backend/app/api/v1/parcels.py:1854` — D2 velocity-score comment - `backend/app/services/site_finder/velocity.py` — main velocity service - `backend/app/services/analytics_queries.py:688,692,948,950,1114,1197,1478,1589` — 6+ functions ## Acceptance - [ ] velocity.py refactored на `objective_corpus_room_month` + linkage через `objective_complex_mapping` (114 mappings) → `domrf_kn_objects.obj_id` - [ ] analytics_queries.py functions с velocity / sales analytics migrated (НЕ snapshot-based queries — те для исторических данных) - [ ] velocity для cad 66:41:0204016:10 возвращает не-null result через chrome-devtools e2e test - [ ] Tests updated - [ ] Vault: `Module_Velocity_Service.md` updated с new data source
Sign in to join this conversation.
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#156
No description provided.