[object Object]

← back to Homesonspec

publisher: promote lat/lon on the UPDATE branch too (contrarian critical fix)

12220514b5b01d14540de5edaea4547f2377fa9a · 2026-07-29 00:53:33 -0700 · Steve Abrams

Cody caught it: the inventory_home upsert wrote lat/lon on CREATE but the UPDATE branch silently
dropped them — so re-extracted homes (dr-horton's new in-feed community geo, and every other adapter's
coords) never got geo on any incremental update. Now null-coalesced into the update object: promotes a
coord when the re-extract has one, never clobbers a good pin with a null. Verified: nulled Delaware's
dr-horton coords, FORCE_REEXTRACT re-pinned 80 via the update path (was 0). Fixes ALL adapters, not just
dr-horton — coords now persist across incremental re-extracts as intended.

Files touched

Diff

commit 12220514b5b01d14540de5edaea4547f2377fa9a
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Jul 29 00:53:33 2026 -0700

    publisher: promote lat/lon on the UPDATE branch too (contrarian critical fix)
    
    Cody caught it: the inventory_home upsert wrote lat/lon on CREATE but the UPDATE branch silently
    dropped them — so re-extracted homes (dr-horton's new in-feed community geo, and every other adapter's
    coords) never got geo on any incremental update. Now null-coalesced into the update object: promotes a
    coord when the re-extract has one, never clobbers a good pin with a null. Verified: nulled Delaware's
    dr-horton coords, FORCE_REEXTRACT re-pinned 80 via the update path (was 0). Fixes ALL adapters, not just
    dr-horton — coords now persist across incremental re-extracts as intended.
---
 packages/publisher/src/index.ts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/packages/publisher/src/index.ts b/packages/publisher/src/index.ts
index 6d730847..7faa196a 100644
--- a/packages/publisher/src/index.ts
+++ b/packages/publisher/src/index.ts
@@ -163,6 +163,11 @@ export async function publishStagedRecord(stagedRecordId: string) {
         beds: value<number>("beds"),
         bathsTotal: value<number>("bathsTotal"),
         sqft: value<number>("sqft"),
+        // Promote coords on re-extract too — the create branch wrote lat/lon but this update branch
+        // silently dropped them, so re-extracted homes (e.g. dr-horton's new in-feed community geo)
+        // never got geo. Null-coalesced: only overwrite when the new extract HAS a coord, so a later
+        // coordless extract never clobbers a good pin. [yolo iter-4 contrarian fix]
+        ...(value<number>("lat") != null ? { lat: value<number>("lat"), lon: value<number>("lon") } : {}),
         images: value<string[]>("images") ?? undefined,
         constructionStatus: (value<string>("constructionStatus") as never) ?? undefined,
         estCompletionDate: value<string>("estCompletionDate")

← fa040b5f geocode: one-time dr-horton coord backfill from CACHED snaps  ·  back to Homesonspec  ·  auto-save: 2026-07-29T01:34:44 (1 files) — scripts/backfill- c806053d →