fix(analyze): cad_exists_in_db requires non-NULL geometry #1034
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#1034
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/cad-exists-null-geom"
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?
Дополняет NULL-geom 500-фикс.
cad_exists_in_db(docstring «есть ли GEOMETRY») проверял только наличие строки, неgeom IS NOT NULL→ для ~964 meta-but-null-geom участков врал True. После 500-фикса такой участок шёл в fallback,find_or_enqueue_fetchшаг 2 видел cad_exists=True →("ready", None)→ NSPD-fetch НЕ ставился → analyze зацикливался в 202 job_id=null навсегда (геометрия не подтягивалась). Фикс:AND geom IS NOT NULLво все 3 EXISTS-ветки → null-geom → fetch ставится (202 + реальный job_id) → геометрия приходит → analyze работает (или 404). Valid-geom не затронут. 37 тестов зелёные. Refs #944.Complements the NULL-geom 500 fix. cad_exists_in_db (docstring: "is there GEOMETRY") checked only row existence, not geom IS NOT NULL — so for the ~964 meta-but-NULL-geom parcels it returned True. Consequence after the 500 fix: such a parcel fell into the analyze fallback, find_or_enqueue_fetch step 2 saw cad_exists_in_db=True → returned ("ready", None) → NO NSPD fetch enqueued → analyze looped to a 202 with job_id=null and the parcel was stuck "fetching" forever (never pulled real geometry, never resolved). Fix: add `AND geom IS NOT NULL` to all three EXISTS branches (aligns the function with its docstring). Now a NULL-geom parcel → cad_exists_in_db=False → a real NSPD fetch is enqueued (202 + real job_id) → geometry populates → re-poll → analyze succeeds (or 404 not_in_nspd if NSPD lacks it). No more stuck-202. Valid-geom parcels unaffected. All 3 callers want geometry-presence semantics. 37 analyze/fetch/by-bbox tests green. Refs #944.