← back to Reidwitlin Landing
chore: lint, refactor, v0.2.3 (session close)
d7714e5c1ff495f6f422da957b818b0f47b26857 · 2026-07-07 12:31:39 -0700 · Steve Abrams
Files touched
M lib/backfill-source-images.jsM package-lock.jsonM package.jsonM scripts/build-rwltd-data.js
Diff
commit d7714e5c1ff495f6f422da957b818b0f47b26857
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Jul 7 12:31:39 2026 -0700
chore: lint, refactor, v0.2.3 (session close)
---
lib/backfill-source-images.js | 3 ++-
package-lock.json | 4 ++--
package.json | 2 +-
scripts/build-rwltd-data.js | 8 ++++----
4 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/lib/backfill-source-images.js b/lib/backfill-source-images.js
index 077086f..cf797a5 100644
--- a/lib/backfill-source-images.js
+++ b/lib/backfill-source-images.js
@@ -75,7 +75,8 @@ async function backfillFromSourceFeed(products, opts = {}) {
p.swatch = src;
p.room = src;
delete p.image_note;
- p.image_source = 'rwltd-variant'; backfilled++;
+ p.image_source = 'rwltd-variant';
+ backfilled++;
} else {
const cur = (p.swatch || '').split('?')[0];
const s0 = src.split('?')[0];
diff --git a/package-lock.json b/package-lock.json
index d186134..2e05533 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "reidwitlin-landing",
- "version": "0.2.2",
+ "version": "0.2.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "reidwitlin-landing",
- "version": "0.2.2",
+ "version": "0.2.3",
"dependencies": {
"dotenv": "^17.4.2",
"express": "^4.19.2",
diff --git a/package.json b/package.json
index 2ee89b3..9fc87f0 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "reidwitlin-landing",
- "version": "0.2.2",
+ "version": "0.2.3",
"private": true,
"description": "Editorial vendor landing for Reid Witlin — a Designer Wallcoverings private label (INTERNAL dw_unified.rwltd_catalog — not on Shopify)",
"scripts": {
diff --git a/scripts/build-rwltd-data.js b/scripts/build-rwltd-data.js
index 9bb46ce..377ec3e 100644
--- a/scripts/build-rwltd-data.js
+++ b/scripts/build-rwltd-data.js
@@ -339,15 +339,15 @@ async function main() {
// rebuild degrades safely rather than failing.
try {
const { backfillFromSourceFeed } = require('../lib/backfill-source-images');
- const bf = await backfillFromSourceFeed(products);
+ const backfill = await backfillFromSourceFeed(products);
// Guard the SILENT failure mode: a bot-block / rate-limit / empty CDN response
// returns HTTP 200 with 0 products (no throw) — which would quietly re-draft
// ~190 colorways. The real feed has hundreds of patterns; <50 means the feed
// lied. Throw so the catch logs a LOUD skip instead of silently gutting the
// catalog. (Contrarian catch, 2026-07-07.)
- if (bf.sourcePatterns < 50) throw new Error(`source feed suspicious: only ${bf.sourcePatterns} patterns returned (bot-block/empty?) — refusing to silently skip backfill`);
- console.log(` source-image backfill: ${bf.backfilled} colorways got an authoritative photo (feed ${bf.sourcePatterns} patterns / ${bf.indexSize} keys)`);
- if (bf.conflicts.length) console.log(` ${bf.conflicts.length} already-imaged differ from source (kept ours): ${bf.conflicts.map(c => c.handle.split('--')[0]).join(', ')}`);
+ if (backfill.sourcePatterns < 50) throw new Error(`source feed suspicious: only ${backfill.sourcePatterns} patterns returned (bot-block/empty?) — refusing to silently skip backfill`);
+ console.log(` source-image backfill: ${backfill.backfilled} colorways got an authoritative photo (feed ${backfill.sourcePatterns} patterns / ${backfill.indexSize} keys)`);
+ if (backfill.conflicts.length) console.log(` ${backfill.conflicts.length} already-imaged differ from source (kept ours): ${backfill.conflicts.map(c => c.handle.split('--')[0]).join(', ')}`);
} catch (e) {
// Distinguish a real feed problem from a wiring/integration bug — the catch
// must not relabel a code error as a network blip (Contrarian Hole 3).
← b8b384a auto-save: 2026-07-07T12:30:21 (4 files) — lib/backfill-sour
·
back to Reidwitlin Landing
·
reidwitlin-landing: add Memo/Stock/Price chip actions (share 685f7c8 →