[object Object]

← back to Homesonspec

feat(specs): perry specs capture — discounted price, promotion, description, elevation, market

674ccf86fa77e1111136dd0db0ef7250e2a95e43 · 2026-08-03 07:08:25 -0700 · Steve Abrams

Verified vs a real Algolia hit; added promotion/description/elevation to PerryHome.
discountedPrice vs price = price-drop signal. tsc clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Files touched

Diff

commit 674ccf86fa77e1111136dd0db0ef7250e2a95e43
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Mon Aug 3 07:08:25 2026 -0700

    feat(specs): perry specs capture — discounted price, promotion, description, elevation, market
    
    Verified vs a real Algolia hit; added promotion/description/elevation to PerryHome.
    discountedPrice vs price = price-drop signal. tsc clean.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
 collectors/perry-homes/src/index.ts | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/collectors/perry-homes/src/index.ts b/collectors/perry-homes/src/index.ts
index 9d7b1513..31e6fefb 100644
--- a/collectors/perry-homes/src/index.ts
+++ b/collectors/perry-homes/src/index.ts
@@ -119,6 +119,10 @@ interface PerryHome {
   market?: string;
   designNumber?: string;
   url?: string;
+  // extra specs (verified on the Algolia hit)
+  promotion?: string;
+  description?: string;
+  elevation?: string;
 }
 
 /** Build the Algolia multi-query POST body for a given page. */
@@ -259,6 +263,17 @@ export const perryHomesAdapter: SourceAdapter = {
         const cStatus = constructionStatus(h.productionPhase);
         const estCompletion = isoFromUnix(h.completionDate);
 
+        // Long-tail specs verified on the Perry Algolia hit. discountedPrice vs price
+        // is a price-drop signal; elevation/description/promotion/market are buyer info.
+        const specs: Record<string, unknown> = {
+          discountedPrice: posNum(h.discountedPrice),
+          promotion: str(h.promotion),
+          description: str(h.description),
+          elevation: str(h.elevation),
+          market: str(h.market),
+        };
+        for (const k of Object.keys(specs)) if (specs[k] == null || specs[k] === false) delete specs[k];
+
         // Community FIRST — publish creates the FK target the home record needs.
         records.push({
           entityType: "community",
@@ -320,6 +335,12 @@ export const perryHomesAdapter: SourceAdapter = {
             planName: fv(plan, plan, url),
             // facts-only: a Cloudinary image exists in the feed but is intentionally dropped.
             images: fv<string[]>([], null, url),
+            specs: fv(
+              Object.keys(specs).length ? specs : null,
+              null,
+              url,
+              "perry extra specs (discounted price, promotion, description, elevation, market)",
+            ),
           },
         });
       }

← 41335772 feat(specs): meritage specs capture — monthly payment, was-p  ·  back to Homesonspec  ·  docs(specs): 6-builder batch outcome — 4 capture rich per-ho d6741529 →