fix(tradein/data): external_valuations.house_id — резолв в write-path + идемпотентный бэкфилл (#2236) #2263
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#2263
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/tradein-extval-house-id"
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
target_house_id(тот жеmatch_house_readonly, что у estimate-target). INSERT пишетhouse_id+ON CONFLICT ... house_id = COALESCE(EXCLUDED.house_id, external_valuations.house_id)— существующее значение не перетирается NULL'ом, NULL добирается значением. Best-effort: резолв упал → house_id NULL, estimate не падает.python -m scripts.backfill_external_valuations_house_idпо устоявшемуся паттерну проекта (backfill_house_coords.py): per-row SAVEPOINT (в т.ч. в dry-run — паритет), батчиid > after_id,--dry-run/--limit/--source, идемпотентен (WHERE house_id IS NULL+ guard в UPDATE, повторный прогон — no-op). НЕ миграция (резолв требует Python), manifest #2216 не затронут.Как проверено
uv run pytest(deselect толькоtest_search_cache_hit): 3033 passed, 6 skipped.После merge+deploy: прогон на проде
--dry-run --limit 100→ полный прогон (ожидаемо ~87% из 1579 строк получат house_id).Closes #2236