fix(pipeline): enrich obj_class via objective_lots (fix 'Не указан: 4075') #165
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#165
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/pipeline-class-enrichment-objective-v2"
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?
Replaces closed PR #164 (had stale branch content).
Bug
Pipeline 24mo UI showed 'Не указан: 4075 квартир' —
domrf_kn_objects.obj_classвсегда NULL.Fix
SQL COALESCE через
objective_complex_mapping→objective_lots.classв pipeline query (parcels.py).MCP-verified coverage
Не-mapped остаются 'Не указан' до mapping expansion.
Closes #162
Final review (SHA
ee16d6c, CI ✅)Cross-checked агентом — все 7 проверок пройдены.
✅ Data flow correct:
objective_lots.class→objective_complex_mapping.domrf_obj_id→domrf_kn_objects.obj_id.DISTINCT...LIMIT 1безопасен через UNIQUE constraint mapping table.✅ COALESCE three-tier fallback: kn obj_class → objective lots class → "unknown" (in aggregator)
✅ Case mismatch handled: aggregator
.lower().strip()нормализуетlots_pf(lowercase) vscorp_sum(capitalized)✅ Pure SELECT — no SAVEPOINT needed
✅ No
::castrecurrence, existingcast(... AS interval)уже safe form✅ No TS/frontend regression —
obj_classconsumed только в backend_aggregate_pipeline, emitted asby_classkeys которые UI рендерит dynamic✅ Honest coverage claim: 339/1316 (25.8%) MCP-verified в PR body
Минор (не блокеры)
approve merge