[object Object]

← back to Japan Enrich

TK-11068: Sanderson featured-image repair plan (20 confirmed-foreign heroes) + gated repair script

f79afdfef7f0c051e1144fb6f9972a8dc8c15324 · 2026-09-13 16:27:51 -0700 · Steve Abrams

Resolved all 14 shared-plate groups against sanderson.design. 20 products
confirmed wearing another product's photo (pHash 0-9 vs the vendor original of
the plate they wear, 91-146 vs the correct one). Script is dry-run by default,
requires APPLY=1, carries a live-state drift guard, and ledgers
prev_featured_image_id for undo.mjs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0121kPrarx6J5nkvcXBRoDKb

Files touched

Diff

commit f79afdfef7f0c051e1144fb6f9972a8dc8c15324
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sun Sep 13 16:27:51 2026 -0700

    TK-11068: Sanderson featured-image repair plan (20 confirmed-foreign heroes) + gated repair script
    
    Resolved all 14 shared-plate groups against sanderson.design. 20 products
    confirmed wearing another product's photo (pHash 0-9 vs the vendor original of
    the plate they wear, 91-146 vs the correct one). Script is dry-run by default,
    requires APPLY=1, carries a live-state drift guard, and ledgers
    prev_featured_image_id for undo.mjs.
    
    Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_0121kPrarx6J5nkvcXBRoDKb
---
 dw-newarrivals-fix/tk11068-repair-plan-20.json | 322 +++++++++++++++++++++++++
 dw-newarrivals-fix/tk11068-repair.mjs          |  42 ++++
 2 files changed, 364 insertions(+)

diff --git a/dw-newarrivals-fix/tk11068-repair-plan-20.json b/dw-newarrivals-fix/tk11068-repair-plan-20.json
new file mode 100644
index 0000000..58e1188
--- /dev/null
+++ b/dw-newarrivals-fix/tk11068-repair-plan-20.json
@@ -0,0 +1,322 @@
+[
+  {
+    "handle": "new-tiger-stripe-wallcovering-linen-calico-sanderson",
+    "mfr": "SAW0010-06",
+    "shopify_id": "gid://shopify/Product/7939966206003",
+    "current_base": "DABW217247",
+    "current_file": "DABW217247_9d66.jpg",
+    "true_hero": "DCAVTP107",
+    "true_file": "DCAVTP107_f903.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/C/DCAVTP107_f903.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/new-tiger-stripe-dcavtp107-linen-calico-saw0010-06",
+    "d_shopify_vs_proposed": 95,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "new-tiger-stripe-wallcovering-honey-cream-sanderson",
+    "mfr": "SAW0010-04",
+    "shopify_id": "gid://shopify/Product/7939965812787",
+    "current_base": "DART216341",
+    "current_file": "DART216341_b70e_6de501cf-c788-4067-af3d-ce9e5caa696b.jpg",
+    "true_hero": "DCAVTP104",
+    "true_file": "DCAVTP104_9af4.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/C/DCAVTP104_9af4.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 4,
+    "product_url": "https://www.sanderson.design/wallpaper/new-tiger-stripe-dcavtp104-honey-cream-saw0010-04",
+    "d_shopify_vs_proposed": 117,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "swallows-black-sanderson",
+    "mfr": "SAW0006-05",
+    "shopify_id": "gid://shopify/Product/7944138194995",
+    "current_base": "DCHK233557",
+    "current_file": "DCHK233557_7ffd.jpg",
+    "true_hero": "DVIWSW105",
+    "true_file": "DVIWSW105_756d.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/V/DVIWSW105_756d.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 0,
+    "product_url": "https://www.sanderson.design/wallpaper/swallows-dviwsw105-black-saw0006-05",
+    "d_shopify_vs_proposed": 122,
+    "d_shopify_vs_currentplate": 1,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "palampore-silver-gold-sanderson",
+    "mfr": "SAW0012-01",
+    "shopify_id": "gid://shopify/Product/7940187258931",
+    "current_base": "DCLO232030",
+    "current_file": "DCLO232030_18f1.jpg",
+    "true_hero": "DCAVPA105",
+    "true_file": "DCAVPA105_9557.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/C/DCAVPA105_9557.jpg",
+    "own_page_hits_true": 31,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/palampore-dcavpa105-silver-gold-saw0012-01",
+    "d_shopify_vs_proposed": 128,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "squirrel-amp-dove-dove-eggshell-ivory-sanderson",
+    "mfr": "SAW0005-03",
+    "shopify_id": "gid://shopify/Product/7944136196147",
+    "current_base": "DDAE236494",
+    "current_file": "DDAE236494_22ac.jpg",
+    "true_hero": "DVIWSQ103",
+    "true_file": "DVIWSQ103_bce6.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/V/DVIWSQ103_bce6.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/squirrel-dove-dviwsq103-eggshell-ivory-saw0005-03",
+    "d_shopify_vs_proposed": 111,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "swallows-pebble-sanderson",
+    "mfr": "SAW0006-02",
+    "shopify_id": "gid://shopify/Product/7944137637939",
+    "current_base": "DDAE236494",
+    "current_file": "DDAE236494_22ac_ed48ff49-11c0-4c89-85e3-9e1d69cc0428.jpg",
+    "true_hero": "DVIWSW102",
+    "true_file": "DVIWSW102_bcac.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/V/DVIWSW102_bcac.jpg",
+    "own_page_hits_true": 31,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/swallows-dviwsw102-pebble-saw0006-02",
+    "d_shopify_vs_proposed": 100,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "swallows-silver-sanderson",
+    "mfr": "SAW0006-04",
+    "shopify_id": "gid://shopify/Product/7944138063923",
+    "current_base": "DDAE236494",
+    "current_file": "DDAE236494_22ac_e169b3be-214b-4b54-a15f-cddc65cac04a.jpg",
+    "true_hero": "DVIWSW104",
+    "true_file": "DVIWSW104_e77e.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/V/DVIWSW104_e77e.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/swallows-dviwsw104-silver-saw0006-04",
+    "d_shopify_vs_proposed": 107,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "101-dalmatians-candy-floss-sanderson",
+    "mfr": "SAW0189-01",
+    "shopify_id": "gid://shopify/Product/7899582431283",
+    "current_base": "DDIW217290",
+    "current_file": "DDIW217290_b307_61d9b9f7-f76e-428c-bb6d-b4bb76491b41.jpg",
+    "true_hero": "DDIW217289",
+    "true_file": "DDIW217289_6866.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/D/DDIW217289_6866.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 7,
+    "product_url": "https://www.sanderson.design/wallpaper/101-dalmatians-candy-floss-saw0189-01",
+    "d_shopify_vs_proposed": 15,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "terrariums-botanical-green-multi-sanderson",
+    "mfr": "SAW0134-02",
+    "shopify_id": "gid://shopify/Product/7947301814323",
+    "current_base": "DGLW216657",
+    "current_file": "DGLW216657_ee48_30656ed8-6a24-4a40-9fa9-551f6dc34a1f.jpg",
+    "true_hero": "DGLW216656",
+    "true_file": "DGLW216656_58e9.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/G/DGLW216656_58e9.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 7,
+    "product_url": "https://www.sanderson.design/wallpaper/terrariums-botanical-green-multi-saw0134-02",
+    "d_shopify_vs_proposed": 39,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "cowparsley-chinese-yellow-sanderson",
+    "mfr": "SAW0001-02",
+    "shopify_id": "gid://shopify/Product/7939309731891",
+    "current_base": "DLNC236808",
+    "current_file": "DLNC236808_7eb3.jpg",
+    "true_hero": "DOPWCO105",
+    "true_file": "DOPWCO105_3fdc.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/O/DOPWCO105_3fdc.jpg",
+    "own_page_hits_true": 31,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/cowparsley-dopwco105-chinese-yellow-saw0001-02",
+    "d_shopify_vs_proposed": 124,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "swallows-lime-sanderson",
+    "mfr": "SAW0006-01",
+    "shopify_id": "gid://shopify/Product/7944137605171",
+    "current_base": "DLNC236808",
+    "current_file": "DLNC236808_7eb3_db25e962-6bee-4649-befc-5ed35a4d0785.jpg",
+    "true_hero": "DVIWSW101",
+    "true_file": "DVIWSW101_5f36.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/V/DVIWSW101_5f36.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/swallows-dviwsw101-lime-saw0006-01",
+    "d_shopify_vs_proposed": 132,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "swallows-wedgwood-sanderson-1",
+    "mfr": "SAW0006-03",
+    "shopify_id": "gid://shopify/Product/7944137834547",
+    "current_base": "DMWC237088",
+    "current_file": "DMWC237088_d688.jpg",
+    "true_hero": "DVIWSW103",
+    "true_file": "DVIWSW103_18cd.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/V/DVIWSW103_18cd.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/swallows-dviwsw103-wedgwood-saw0006-03",
+    "d_shopify_vs_proposed": 95,
+    "d_shopify_vs_currentplate": 9,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "new-tiger-stripe-wallcovering-rose-ivory-sanderson",
+    "mfr": "SAW0010-01",
+    "shopify_id": "gid://shopify/Product/7939966369843",
+    "current_base": "DMWC237088",
+    "current_file": "DMWC237088_d688_41ed5a65-47e4-4ee6-a284-7b96a1ba650f.jpg",
+    "true_hero": "DCAVTP101",
+    "true_file": "DCAVTP101_b1e2.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/C/DCAVTP101_b1e2.jpg",
+    "own_page_hits_true": 31,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/new-tiger-stripe-rose-ivory-saw0010-01",
+    "d_shopify_vs_proposed": 91,
+    "d_shopify_vs_currentplate": 9,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "dandelion-clocks-slate-sanderson",
+    "mfr": "SAW0002-03",
+    "shopify_id": "gid://shopify/Product/7939311239219",
+    "current_base": "DOSW217030",
+    "current_file": "DOSW217030_4d58_c165f046-cff1-4051-bec5-95ec40ff323b.jpg",
+    "true_hero": "DOPWDA103",
+    "true_file": "DOPWDA103_d12f.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/O/DOPWDA103_d12f.jpg",
+    "own_page_hits_true": 31,
+    "own_page_hits_current": 4,
+    "product_url": "https://www.sanderson.design/wallpaper/dandelion-clocks-dopwda103-slate-saw0002-03",
+    "d_shopify_vs_proposed": 126,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "rye-wedgwood-sanderson",
+    "mfr": "SAW0218-01",
+    "shopify_id": "gid://shopify/Product/7940188438579",
+    "current_base": "DSAB217420",
+    "current_file": "DSAB217420_d65a.jpg",
+    "true_hero": "DSAB217435",
+    "true_file": "DSAB217435_fde3.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/S/DSAB217435_fde3.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/rye-wedgwood-saw0218-01",
+    "d_shopify_vs_proposed": 112,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "squirrel-amp-dove-dove-linen-ivory-sanderson",
+    "mfr": "SAW0005-01",
+    "shopify_id": "gid://shopify/Product/7944135835699",
+    "current_base": "DVIN214599",
+    "current_file": "DVIN214599_65e4.jpg",
+    "true_hero": "DVIWSQ101",
+    "true_file": "DVIWSQ101_7ec4.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/V/DVIWSQ101_7ec4.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/squirrel-dove-dviwsq101-linen-ivory-saw0005-01",
+    "d_shopify_vs_proposed": 117,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "squirrel-amp-dove-dove-teal-red-sanderson",
+    "mfr": "SAW0005-02",
+    "shopify_id": "gid://shopify/Product/7944136032307",
+    "current_base": "DVIN224339",
+    "current_file": "DVIN224339_f717.jpg",
+    "true_hero": "DVIWSQ102",
+    "true_file": "DVIWSQ102_cb6e.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/V/DVIWSQ102_cb6e.jpg",
+    "own_page_hits_true": 31,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/squirrel-dove-dviwsq102-teal-red-saw0005-02",
+    "d_shopify_vs_proposed": 121,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "cowparsley-amethyst-sanderson",
+    "mfr": "SAW0001-01",
+    "shopify_id": "gid://shopify/Product/7939309633587",
+    "current_base": "DWOW235608",
+    "current_file": "DWOW235608_c766_6c2e2c2c-2ad9-472d-a6e8-0453ebef740d.jpg",
+    "true_hero": "DOPWCO103",
+    "true_file": "DOPWCO103_578b.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/O/DOPWCO103_578b.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/cowparsley-dopwco103-amethyst-saw0001-01",
+    "d_shopify_vs_proposed": 124,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "woodland-ferns-green-sanderson-1",
+    "mfr": "SAW0004-01",
+    "shopify_id": "gid://shopify/Product/7946197368883",
+    "current_base": "DWOW235608",
+    "current_file": "DWOW235608_c766_33c797b8-9f19-4fef-95d5-b7564561637a.jpg",
+    "true_hero": "DAPGWO102",
+    "true_file": "DAPGWO102_cf2f.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/A/DAPGWO102_cf2f.jpg",
+    "own_page_hits_true": 27,
+    "own_page_hits_current": 6,
+    "product_url": "https://www.sanderson.design/wallpaper/woodland-ferns-dapgwo102-green-saw0004-01",
+    "d_shopify_vs_proposed": 146,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  },
+  {
+    "handle": "new-tiger-stripe-wallcovering-leaf-grn-ivory-sanderson",
+    "mfr": "SAW0010-03",
+    "shopify_id": "gid://shopify/Product/7939965747251",
+    "current_base": "DWOW235608",
+    "current_file": "DWOW235608_c766.jpg",
+    "true_hero": "DCAVTP103",
+    "true_file": "DCAVTP103_9421.jpg",
+    "src": "https://www.sanderson.design/static/media/catalog/product/D/C/DCAVTP103_9421.jpg",
+    "own_page_hits_true": 28,
+    "own_page_hits_current": 10,
+    "product_url": "https://www.sanderson.design/wallpaper/new-tiger-stripe-dcavtp103-leaf-grn-ivory-saw0010-03",
+    "d_shopify_vs_proposed": 132,
+    "d_shopify_vs_currentplate": 0,
+    "phash_verdict": "CONFIRMED_FOREIGN"
+  }
+]
\ No newline at end of file
diff --git a/dw-newarrivals-fix/tk11068-repair.mjs b/dw-newarrivals-fix/tk11068-repair.mjs
new file mode 100644
index 0000000..d22f17e
--- /dev/null
+++ b/dw-newarrivals-fix/tk11068-repair.mjs
@@ -0,0 +1,42 @@
+// TK-11068 — Sanderson featured-image repair (20 products).
+// GATED: customer-facing Shopify write. Runs ONLY with APPLY=1. Dry-run by default.
+// Reversible: every write appends prev_featured_image_id to a ledger; undo via `node undo.mjs <ledger>`.
+import fs from 'fs';
+const TOK = fs.readFileSync('.tok','utf8').trim();
+const API = 'https://designer-laboratory-sandbox.myshopify.com/admin/api/2024-10';
+const H   = {'X-Shopify-Access-Token':TOK,'Content-Type':'application/json'};
+const APPLY = process.env.APPLY === '1';
+const sleep = ms => new Promise(r=>setTimeout(r,ms));
+const base = u => (u||'').split('/').pop().split('?')[0].split('_')[0];
+
+const PLAN = JSON.parse(fs.readFileSync('tk11068-repair-plan-20.json','utf8'));
+const ts = new Date().toISOString().replace(/[:.]/g,'-');
+const ledger = `ledger/tk11068-heroswap-${ts}.jsonl`;
+let swapped=0, skipped=0, failed=0;
+
+for (const m of PLAN) {
+  if (m.phash_verdict !== 'CONFIRMED_FOREIGN') { console.log('SKIP (not confirmed):', m.handle); skipped++; continue; }
+  const d = await (await fetch(`${API}/products.json?handle=${m.handle}&fields=id,handle,image`,{headers:H})).json();
+  const p = d.products?.[0];
+  if (!p) { console.log('NOT FOUND', m.handle); failed++; continue; }
+  const curSrc = p.image?.src || '';
+  // PRE-FLIGHT: live state must still match what we measured, else skip (drift guard)
+  if (base(curSrc) !== m.current_base) { console.log(`SKIP drift ${m.handle}: live=${base(curSrc)} expected=${m.current_base}`); skipped++; continue; }
+  if (!APPLY) { console.log(`DRY  ${m.handle}  ${m.current_base} -> ${m.true_hero}  (${m.src})`); continue; }
+  const r = await fetch(`${API}/products/${p.id}/images.json`,{method:'POST',headers:H,
+      body:JSON.stringify({image:{src:m.src,position:1,alt:`${m.mfr} Sanderson`}})});
+  const nj = await r.json();
+  if (!r.ok || !nj.image) { console.log('IMG POST FAIL', m.handle, JSON.stringify(nj).slice(0,140)); failed++; continue; }
+  await fetch(`${API}/products/${p.id}.json`,{method:'PUT',headers:H,
+      body:JSON.stringify({product:{id:p.id,image:{id:nj.image.id}}})});
+  fs.appendFileSync(ledger, JSON.stringify({action:'set_image',id:p.id,handle:m.handle,mfr:m.mfr,
+      prev_featured_image_id:p.image?.id||null, prev_src:curSrc,
+      new_image_id:nj.image.id, new_src:m.src,
+      evidence:{true_hero:m.true_hero,page_hits_true:m.own_page_hits_true,page_hits_current:m.own_page_hits_current,
+                dhash_vs_currentplate:m.d_shopify_vs_currentplate,dhash_vs_proposed:m.d_shopify_vs_proposed},
+      ticket:'TK-11068', ts:new Date().toISOString()})+'\n');
+  console.log(`SWAPPED ${m.handle}  ${m.current_base} -> ${m.true_hero}`);
+  swapped++; await sleep(700);
+}
+console.log(`\n${APPLY?'APPLIED':'DRY-RUN'}  swapped=${swapped} skipped=${skipped} failed=${failed}`);
+if (APPLY && swapped) console.log('ledger:', ledger, '\nundo: node undo.mjs ' + ledger);

← 9c7460f TK-11068: Sanderson per-colorway hero repair plan (20 produc  ·  back to Japan Enrich  ·  TK-11068: before/after contact sheet for the 20 hero swaps ( d6d3c65 →