← back to Homesonspec
fix(homesonspec): summit planName cuts at first '<' — no raw markup on fresh crawls (TK-10487)
7114f6a311fa4b3686e34079a2f884e36d9e8c29 · 2026-08-31 00:15:48 -0700 · Steve
Investigating summit ingest rejects surfaced 166 historical staged records whose
planName carried raw markup (e.g. "Riverside Collection ... <div class=\"label\"
data-reac") — an INCOMPLETE tag opener that survives plainText's tag-strip when the
3000-char overview slice ends mid-element. The earlier end-anchored fix (<[^>]*$)
missed the mid-string case. Now planName is cut at the first '<' (a plan name never
contains markup), so fresh crawls emit clean plan names.
NOTE: the ingest rejects themselves are NOT this bug — they are the dup.no-active-
address integrity rule correctly rejecting re-crawls of addresses that already have
an active inventory record (summit had 816 from prior runs). The pipeline dedup gate
is working as designed. tsc 0; vitest 11/11.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
M collectors/summit-homes-kc/src/index.ts
Diff
commit 7114f6a311fa4b3686e34079a2f884e36d9e8c29
Author: Steve <steve@designerwallcoverings.com>
Date: Mon Aug 31 00:15:48 2026 -0700
fix(homesonspec): summit planName cuts at first '<' — no raw markup on fresh crawls (TK-10487)
Investigating summit ingest rejects surfaced 166 historical staged records whose
planName carried raw markup (e.g. "Riverside Collection ... <div class=\"label\"
data-reac") — an INCOMPLETE tag opener that survives plainText's tag-strip when the
3000-char overview slice ends mid-element. The earlier end-anchored fix (<[^>]*$)
missed the mid-string case. Now planName is cut at the first '<' (a plan name never
contains markup), so fresh crawls emit clean plan names.
NOTE: the ingest rejects themselves are NOT this bug — they are the dup.no-active-
address integrity rule correctly rejecting re-crawls of addresses that already have
an active inventory record (summit had 816 from prior runs). The pipeline dedup gate
is working as designed. tsc 0; vitest 11/11.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
collectors/summit-homes-kc/src/index.ts | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/collectors/summit-homes-kc/src/index.ts b/collectors/summit-homes-kc/src/index.ts
index 1a2f135c..25993a7e 100644
--- a/collectors/summit-homes-kc/src/index.ts
+++ b/collectors/summit-homes-kc/src/index.ts
@@ -196,9 +196,13 @@ export function parseHome(html: string, pageUrl: string): SummitHome | null {
const sqft = posInt(sqftM?.[1] ?? null);
const garages = posInt(garageM?.[1] ?? null);
- // Plan name: text after "Floor Plan" up to the next major label
+ // Plan name: text after "Floor Plan" up to the next major label. Cut at the
+ // first "<": when the 3000-char slice ends mid-element, an INCOMPLETE tag
+ // opener (e.g. `<div class="label" data-reac`, no closing ">") slips past
+ // plainText's tag-strip and would otherwise land raw markup in planName and get
+ // the record REJECTED at validation. A plan name never contains "<". (TK-10487)
const planM = overviewText.match(/Floor Plan\s+(.+?)(?:\s+Status\s|\s+Community\s|\s*$)/i);
- const planName = clean(planM?.[1]?.trim() ?? null);
+ const planName = clean(planM?.[1]?.split("<")[0]?.trim() ?? null);
// Status: "Move In Ready" -> MOVE_IN_READY; "Active" or anything else -> UNDER_CONSTRUCTION
const statusM = overviewText.match(/Status\s+(\S.+?)(?:\s{2,}|\s+Have a|\s+About\s|\s*$)/i);
← 8ffc6951 fix(homesonspec): correct 2 more dead CPG seed termsUrls (br
·
back to Homesonspec
·
docs(homesonspec): TK-10878 Phase 2 drafts — pg_partman Sour 21b9aad6 →