← back to Nationalrealestate
Fix places-seed pickMetro CTE scope bug (r.name->name); unblocks 106-failure loop stall
153944d995fff23f07d6d6e601187c3015780726 · 2026-07-30 17:54:23 -0700 · steve@designerwallcoverings.com
Files touched
M src/ingest/places/seed.ts
Diff
commit 153944d995fff23f07d6d6e601187c3015780726
Author: steve@designerwallcoverings.com <steve@designerwallcoverings.com>
Date: Thu Jul 30 17:54:23 2026 -0700
Fix places-seed pickMetro CTE scope bug (r.name->name); unblocks 106-failure loop stall
---
src/ingest/places/seed.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ingest/places/seed.ts b/src/ingest/places/seed.ts
index 4f95162..8f4cfb3 100644
--- a/src/ingest/places/seed.ts
+++ b/src/ingest/places/seed.ts
@@ -103,7 +103,7 @@ async function pickMetro(): Promise<{ id: number; name: string; key: string } |
WHEN st ~ '(^|-)(MT|WY|CO|NM)($|-)' THEN 2 -- Mountain
ELSE 5 END -- rest of US
ELSE 999 END ASC,
- CASE WHEN r.name ILIKE '%Micro Area%' THEN 1 ELSE 0 END ASC, -- big Metro Areas before small Micro Areas
+ CASE WHEN name ILIKE '%Micro Area%' THEN 1 ELSE 0 END ASC, -- big Metro Areas before small Micro Areas
seeds ASC, ls ASC NULLS FIRST, name ASC
LIMIT 1`, [SEED_TARGET]);
return r.rows.length ? { id: r.rows[0].id, name: r.rows[0].name, key: r.rows[0].canonical_key } : null;
← 1dbfb57 auto-save: 2026-07-30T09:16:33 (3 files) — cap_viewport.cjs
·
back to Nationalrealestate
·
Make listings CAP env-tunable (USRE_LISTINGS_CAP, default 10 82774fe →