fix(nspd-geo): MultiPolygon coercion + wide building schema (on-demand ingest) #1045

Merged
bot-backend merged 1 commit from fix/on-demand-ingest-multipolygon into main 2026-06-04 08:11:54 +00:00
Collaborator

REAL code cause (prod-confirmed, 2 parcels: 'Geometry type (Polygon) does not match column type (MultiPolygon)') of single-contour parcels stuck fetching — complements migr 129/130 (NOT NULL chain).

F1: _save_parcel/_save_quarter ST_Multi() the geom (migr 93/58 MultiPolygon cols), mirroring bulk_harvest.
F2: _save_building rewritten to wide cad_buildings schema (migr 92): quarter_cad_number, _safe_int(floors), source NOT NULL.
F3: upsert_features per-feature begin_nested() SAVEPOINT (one bad feature no longer aborts the snapshot).

New test_nspd_geo.py + savepoint tests; 89 passed, ruff clean. Found by read-only audit, prod-evidence-confirmed.

REAL code cause (prod-confirmed, 2 parcels: 'Geometry type (Polygon) does not match column type (MultiPolygon)') of single-contour parcels stuck fetching — complements migr 129/130 (NOT NULL chain). F1: _save_parcel/_save_quarter ST_Multi() the geom (migr 93/58 MultiPolygon cols), mirroring bulk_harvest. F2: _save_building rewritten to wide cad_buildings schema (migr 92): quarter_cad_number, _safe_int(floors), source NOT NULL. F3: upsert_features per-feature begin_nested() SAVEPOINT (one bad feature no longer aborts the snapshot). New test_nspd_geo.py + savepoint tests; 89 passed, ruff clean. Found by read-only audit, prod-evidence-confirmed.
bot-backend added 1 commit 2026-06-04 08:11:51 +00:00
fix(nspd-geo): coerce geom to MultiPolygon + wide cad_buildings schema in on-demand ingest
All checks were successful
Deploy / build-frontend (push) Has been skipped
Deploy / deploy (push) Successful in 1m8s
Deploy / changes (push) Successful in 5s
Deploy / build-backend (push) Successful in 1m35s
Deploy / build-worker (push) Successful in 2m19s
5f60668642
REAL code-level cause (prod-confirmed, 2 parcels: "Geometry type (Polygon) does
not match column type (MultiPolygon)") of single-contour parcels stuck "fetching"
— complements migrations 129/130 (which fixed the cad_parcels NOT NULL chain).

F1: _save_parcel/_save_quarter now ST_Multi() the geom so single-contour Polygons
fit the MultiPolygon columns (migr 93/58), mirroring the bulk_harvest paths.
F2: _save_building rewritten to the wide cad_buildings schema (migr 92):
quarter_cad_number (was quarter_cad_num → UndefinedColumn), _safe_int(floors)
(range strings → NULL), source='nspd' NOT NULL.
F3: upsert_features wraps each feature in begin_nested() SAVEPOINT so one bad
feature no longer aborts the whole quarter snapshot (backend.md rule; mirrors
grid-walk). New tests/workers/test_nspd_geo.py + savepoint tests. 89 passed.
bot-backend merged commit 5f60668642 into main 2026-06-04 08:11:54 +00:00
bot-backend deleted branch fix/on-demand-ingest-multipolygon 2026-06-04 08:11:55 +00:00
Sign in to join this conversation.
No reviewers
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#1045
No description provided.