← back to Commercialrealestate
CRCP scope Cycle 6: California guard on scoped grids — Crexi feeds are national but CRCP is CA-only, so sameCity name-match pulled out-of-state cities onto CA subdomains (georgetown.crcp was 11/11 Texas). isCalifornia(item) requires CA source-slug/zip/address; contamination killed, real CA rows preserved
02e8a05fb78fda67af59ab85d8972a4b66a75f32 · 2026-08-20 17:27:55 -0700 · Steve
Files touched
Diff
commit 02e8a05fb78fda67af59ab85d8972a4b66a75f32
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Aug 20 17:27:55 2026 -0700
CRCP scope Cycle 6: California guard on scoped grids — Crexi feeds are national but CRCP is CA-only, so sameCity name-match pulled out-of-state cities onto CA subdomains (georgetown.crcp was 11/11 Texas). isCalifornia(item) requires CA source-slug/zip/address; contamination killed, real CA rows preserved
---
public/crcp-scope.js | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/public/crcp-scope.js b/public/crcp-scope.js
index 8586c5f..d50adf3 100644
--- a/public/crcp-scope.js
+++ b/public/crcp-scope.js
@@ -43,6 +43,26 @@
return null;
}
+ // CRCP is a CALIFORNIA-ONLY product, but the Crexi source feeds are NATIONAL — so a bare
+ // city-name match (sameCity) pulls same-named out-of-state cities onto a CA subdomain
+ // (georgetown.crcp was 11/11 Texas, chester = VA/IL/SC). Require positive California evidence:
+ // a crexi '/california-' source slug, a CA zip (90000–96199), or ', CA' in the address.
+ // A provably-other-state signal, or no signal at all, fails closed (a CA-only product must
+ // not show unconfirmable-state inventory). Returns true = keep, false = drop.
+ function isCalifornia(item) {
+ if (!item) return false;
+ var src = String(item.source == null ? "" : item.source);
+ if (/\/california-/i.test(src)) return true; // crexi CA slug
+ if (/crexi\.com\/properties\/\d+\/[a-z]{2,}-/i.test(src)) return false; // crexi non-CA slug -> not CA
+ var z = parseInt(String(item.zip == null ? "" : item.zip).slice(0, 5), 10);
+ if (z >= 90000 && z <= 96199) return true; // CA zip
+ if (z >= 500 && z <= 99999) return false; // a real non-CA zip -> not CA
+ var addr = String(item.address == null ? "" : item.address);
+ if (/,\s*CA\b/i.test(addr)) return true; // ', CA' in address
+ if (/,\s*[A-Za-z]{2}\b/.test(addr)) return false; // some other 2-letter state -> not CA
+ return false; // no signal -> fail closed
+ }
+
// Re-run the banner/empty-state the instant a scoped fetch resolves (event-driven, not a
// fixed timer) so the empty-state never depends on data arriving before a magic 2500ms.
function schedulePaint() { setTimeout(function () { if (document.body) paintBanner(); }, 0); }
@@ -82,7 +102,7 @@
if (d && Array.isArray(d[key])) {
scoped.arrBefore = d[key].length;
scoped.arrMatched = true;
- d[key] = d[key].filter(function (item) { return window.CRCP_CITIES.sameCity(deriveCity(item), CITY); });
+ d[key] = d[key].filter(function (item) { return isCalifornia(item) && window.CRCP_CITIES.sameCity(deriveCity(item), CITY); });
scoped.arrAfter = d[key].length;
schedulePaint();
}
← 804a788 auto-data-snapshot: 2026-08-20T17:19:08 (2 data files) — dat
·
back to Commercialrealestate
·
CRCP scope Cycle 7: anchor isCalifornia crexi-CA regex to th e258eee →