[object Object]

← back to Designerwallcoverings

TK-11644: exhaustive post-fix verification (PASS, 0 survivors of 31,191) + gated identity-residual executor (5 of 11 adjudicated DELETE, dry-run default)

236e4a6fec9f65100353d1e2882a57aae70229f6 · 2026-09-16 14:09:44 -0700 · Steve Abrams

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

Files touched

Diff

commit 236e4a6fec9f65100353d1e2882a57aae70229f6
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Sep 16 14:09:44 2026 -0700

    TK-11644: exhaustive post-fix verification (PASS, 0 survivors of 31,191) + gated identity-residual executor (5 of 11 adjudicated DELETE, dry-run default)
    
    Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01NbiFp4yxwRthCmDhbkwQnu
---
 assets/TK-11644-identity-manifest.json |  88 +++++++++++++++++++++++++++
 scripts/tk11644-identity-fix.mjs       |  87 +++++++++++++++++++++++++++
 scripts/tk11644-postfix-verify.mjs     | 105 +++++++++++++++++++++++++++++++++
 3 files changed, 280 insertions(+)

diff --git a/assets/TK-11644-identity-manifest.json b/assets/TK-11644-identity-manifest.json
new file mode 100644
index 0000000..7fd2e56
--- /dev/null
+++ b/assets/TK-11644-identity-manifest.json
@@ -0,0 +1,88 @@
+{
+ "generated_at": "2026-09-16T21:09:12.145Z",
+ "will_delete": 5,
+ "skipped": [],
+ "leave": [
+  {
+   "handle": "dwtt-71081-designer-wallcoverings-los-angeles",
+   "why": "desc actually names KASAI Charcoal Printed Fabrics (F92932) = THIS product. Detector false positive (\"the Paramount of luxury\" is marketing prose, not a product name). Desc is MORE specific than the body here"
+  },
+  {
+   "handle": "dwh-68110",
+   "why": "body repeats the same \"Tiki Wiki Lounge ... Tea Towel\" naming — deleting swaps a wrong name for the same wrong name. Separate pre-existing data defect, not this job"
+  },
+  {
+   "handle": "dwh-70320",
+   "why": "body ALSO says \"Chiba Bay Orange Wall Art\" on a product titled Abalone — the body carries the same wrong identity, so the fallback is not better. Separate defect"
+  },
+  {
+   "handle": "dwh-71017",
+   "why": "desc and body agree (\"Arlene Absinthe Sepia Square Throw Pillow Cover\") — wrong product FORM, but consistent; deleting changes nothing"
+  },
+  {
+   "handle": "dwh-75917",
+   "why": "same as dwh-71017 — desc and body agree on the throw-pillow naming"
+  },
+  {
+   "handle": "wc51505",
+   "why": "desc names the SKU \"WC51505\", which is not a false claim — just unspecific. Below the bar for a customer-facing write"
+  }
+ ],
+ "rows": [
+  {
+   "gid": "gid://shopify/Product/6944746864691",
+   "pid": "6944746864691",
+   "handle": "dwtt-72141-designer-wallcoverings-los-angeles",
+   "title": "Stablewood - Natural Wallcovering | Thibaut",
+   "vendor": "Thibaut",
+   "mf_id": "gid://shopify/Metafield/21748022444083",
+   "old_value": "This bamboo weave wallcovering in charcoal offers a sophisticated and textured backdrop for any space. The subtle stripe pattern adds depth and visual interest, making it a versatile choice for both residential and commercial interiors.",
+   "fallback": "This wallcovering features a realistic wood grain pattern. It evokes a warm and inviting farmhouse style with a touch of rustic charm.",
+   "why": "desc says \"bamboo weave in charcoal\"; product is Stablewood Natural and its body says \"realistic wood grain\" — desc is a false claim, body is right"
+  },
+  {
+   "gid": "gid://shopify/Product/6944753254451",
+   "pid": "6944753254451",
+   "handle": "dwtt-72319-designer-wallcoverings-los-angeles",
+   "title": "Taluk Sisal Wallcovering | Thibaut",
+   "vendor": "Thibaut",
+   "mf_id": "gid://shopify/Metafield/21748044955699",
+   "old_value": "This Bankun Raffia wallcovering in Aqua offers a subtle, textured backdrop, perfect for creating a serene and inviting atmosphere. Its natural grasscloth appearance adds a touch of organic elegance to any space, making it ideal for both residential and commercial interiors.",
+   "fallback": "This is a natural sisal wallcovering with a subtle woven texture. It evokes a warm and earthy mood, perfect for adding a touch of organic elegance to any space.",
+   "why": "desc says \"Bankun Raffia in Aqua\"; product is Taluk Sisal and its body says \"natural sisal\" — false claim, body right"
+  },
+  {
+   "gid": "gid://shopify/Product/6944753352755",
+   "pid": "6944753352755",
+   "handle": "dwtt-72322-designer-wallcoverings-los-angeles",
+   "title": "Belgium Linen Wallcovering | Thibaut",
+   "vendor": "Thibaut",
+   "mf_id": "gid://shopify/Metafield/21748045217843",
+   "old_value": "This Bankun Raffia wallcovering in Tobacco from Thibaut Design offers a warm and textured backdrop. Its natural grasscloth texture adds depth and sophistication to any space, making it ideal for creating a serene and inviting atmosphere.",
+   "fallback": "This is a close-up of a linen wallcovering. The texture and neutral color palette create a warm and inviting atmosphere.",
+   "why": "desc says \"Bankun Raffia in Tobacco\"; product is Belgium Linen and its body says \"linen wallcovering\" — false claim, body right"
+  },
+  {
+   "gid": "gid://shopify/Product/6944753418291",
+   "pid": "6944753418291",
+   "handle": "dwtt-72324-designer-wallcoverings-los-angeles",
+   "title": "Cabo Raffia - Natural Wallcovering | Thibaut",
+   "vendor": "Thibaut",
+   "mf_id": "gid://shopify/Metafield/21748045512755",
+   "old_value": "This Bankun Raffia wallcovering in Straw from Thibaut Design offers a subtle, textured backdrop. Its natural, woven appearance brings warmth and sophistication to any space, making it ideal for creating a serene and inviting atmosphere.",
+   "fallback": "This is a natural raffia wallcovering with a subtle texture. It evokes a warm and relaxed tropical mood.",
+   "why": "desc says \"Bankun Raffia in Straw\"; product is Cabo Raffia and its body says \"natural raffia\" — wrong pattern named, body right"
+  },
+  {
+   "gid": "gid://shopify/Product/7384910037043",
+   "pid": "7384910037043",
+   "handle": "bgs-1522-maya-50191",
+   "title": "Beadazzled Sparkle Geode - Fields of Gold | Maya Romanoff",
+   "vendor": "Maya Romanoff",
+   "mf_id": "gid://shopify/Metafield/27887699329075",
+   "old_value": "Shop Beadazzled Glass in Fields of Gold from the Beadazzled Glass collection. Luxury glass beads by Maya Romanoff. Class A fire rated for commercial & hospitali",
+   "fallback": "This is a shimmering wallcovering with a geode-like appearance. The gold and beige tones create a luxurious and sophisticated mood.",
+   "why": "desc sells \"Beadazzled Glass\" from the Glass collection; product is Beadazzled Sparkle Geode and its body describes the geode — wrong collection named, body right"
+  }
+ ]
+}
\ No newline at end of file
diff --git a/scripts/tk11644-identity-fix.mjs b/scripts/tk11644-identity-fix.mjs
new file mode 100644
index 0000000..f01a78f
--- /dev/null
+++ b/scripts/tk11644-identity-fix.mjs
@@ -0,0 +1,87 @@
+// TK-11644 RESIDUAL — the wrong-product ("identity contradiction") rows the 2026-04-05
+// bad job left in Tier C. Tier A+B were the GENERICIZATION shape (boilerplate overwrite);
+// these 11 are the rarer title_tag-shaped WRONG-IDENTITY shape appearing in description_tag:
+// the meta description names a DIFFERENT product than the one on the page.
+//
+// Not every one of the 11 is a defect. Each row is adjudicated below against its OWN live
+// body_html, because "the desc names another product" is only a false claim to Google when
+// the product's own body disagrees with it. Three classes:
+//   DELETE  — desc names a different product AND body names the right one  (real false claim)
+//   LEAVE   — desc is actually CORRECT for this product (detector false positive), or the
+//             body repeats the SAME wrong name (a separate pre-existing data defect that
+//             deleting does not fix — it would just swap one wrong name for the same one)
+//
+// DRY-RUN BY DEFAULT. --apply is the GATED customer-facing Shopify write (Steve go only).
+// Race-safe: live-verifies the metafield still holds the exact swept value and that the body
+// fallback is still usable. Every delete is ledgered with its full old value.
+import { gql } from './lib/shopify.mjs';
+import fs from 'node:fs';
+
+const APPLY = process.argv.includes('--apply');
+
+// handle -> {verdict, why}  (adjudicated 2026-09-16 against live body_html)
+const PLAN = {
+  'dwtt-72141-designer-wallcoverings-los-angeles': ['DELETE','desc says "bamboo weave in charcoal"; product is Stablewood Natural and its body says "realistic wood grain" — desc is a false claim, body is right'],
+  'dwtt-72319-designer-wallcoverings-los-angeles': ['DELETE','desc says "Bankun Raffia in Aqua"; product is Taluk Sisal and its body says "natural sisal" — false claim, body right'],
+  'dwtt-72322-designer-wallcoverings-los-angeles': ['DELETE','desc says "Bankun Raffia in Tobacco"; product is Belgium Linen and its body says "linen wallcovering" — false claim, body right'],
+  'dwtt-72324-designer-wallcoverings-los-angeles': ['DELETE','desc says "Bankun Raffia in Straw"; product is Cabo Raffia and its body says "natural raffia" — wrong pattern named, body right'],
+  'bgs-1522-maya-50191':                           ['DELETE','desc sells "Beadazzled Glass" from the Glass collection; product is Beadazzled Sparkle Geode and its body describes the geode — wrong collection named, body right'],
+  'dwtt-71081-designer-wallcoverings-los-angeles': ['LEAVE','desc actually names KASAI Charcoal Printed Fabrics (F92932) = THIS product. Detector false positive ("the Paramount of luxury" is marketing prose, not a product name). Desc is MORE specific than the body here'],
+  'dwh-68110':                                     ['LEAVE','body repeats the same "Tiki Wiki Lounge ... Tea Towel" naming — deleting swaps a wrong name for the same wrong name. Separate pre-existing data defect, not this job'],
+  'dwh-70320':                                     ['LEAVE','body ALSO says "Chiba Bay Orange Wall Art" on a product titled Abalone — the body carries the same wrong identity, so the fallback is not better. Separate defect'],
+  'dwh-71017':                                     ['LEAVE','desc and body agree ("Arlene Absinthe Sepia Square Throw Pillow Cover") — wrong product FORM, but consistent; deleting changes nothing'],
+  'dwh-75917':                                     ['LEAVE','same as dwh-71017 — desc and body agree on the throw-pillow naming'],
+  'wc51505':                                       ['LEAVE','desc names the SKU "WC51505", which is not a false claim — just unspecific. Below the bar for a customer-facing write'],
+};
+
+const swept = JSON.parse(fs.readFileSync('assets/TK-11644-identity-contradiction.json','utf8'));
+const sweptBy = new Map(swept.map(r=>[r.handle, r]));
+
+const targets = Object.entries(PLAN).filter(([,v])=>v[0]==='DELETE').map(([h])=>h);
+const leave   = Object.entries(PLAN).filter(([,v])=>v[0]==='LEAVE');
+
+const parts = targets.map((h,j)=>`p${j}: productByHandle(handle:${JSON.stringify(h)}){ id title vendor status descriptionHtml metafield(namespace:"global",key:"description_tag"){ id value updatedAt } }`);
+const d = await gql(`{ ${parts.join('\n')} }`);
+
+const verified=[], skipped=[];
+targets.forEach((h,j)=>{
+  const n=d[`p${j}`];
+  if(!n){ skipped.push({handle:h,why:'product-not-found'}); return; }
+  const cur=(n.metafield?.value||'').trim();
+  const sw=(sweptBy.get(h)?.desc||'').trim();
+  if(!cur){ skipped.push({handle:h,why:'already-deleted'}); return; }
+  if(!cur.startsWith(sw.slice(0,80))){ skipped.push({handle:h,why:'changed-since-sweep (never clobber a manual fix)',now:cur.slice(0,70)}); return; }
+  const body=(n.descriptionHtml||'').replace(/<[^>]+>/g,' ').replace(/&[a-z#0-9]+;/gi,' ').replace(/\s+/g,' ').trim();
+  if(body.length<60){ skipped.push({handle:h,why:`body fallback unusable (${body.length} chars)`}); return; }
+  verified.push({gid:n.id,pid:n.id.split('/').pop(),handle:h,title:n.title,vendor:n.vendor,
+    mf_id:n.metafield.id, old_value:cur, fallback:body, why:PLAN[h][1]});
+});
+
+fs.writeFileSync('assets/TK-11644-identity-manifest.json',JSON.stringify(
+  {generated_at:new Date().toISOString(),will_delete:verified.length,skipped,leave:leave.map(([h,v])=>({handle:h,why:v[1]})),rows:verified},null,1));
+
+console.log(`\nADJUDICATED ${Object.keys(PLAN).length} identity-contradiction rows:`);
+console.log(`  DELETE (false claim, body is correct): ${verified.length}`);
+console.log(`  LEAVE  (false positive / body repeats same name): ${leave.length}`);
+if(skipped.length) console.log(`  SKIPPED: ${JSON.stringify(skipped)}`);
+console.log('\nBefore -> after (what Google would show instead):');
+for(const v of verified) console.log(`  ${v.handle}  [${v.title}]\n      was: ${JSON.stringify(v.old_value.slice(0,86))}\n      ->:  ${JSON.stringify(v.fallback.slice(0,86))}\n      why: ${v.why}`);
+console.log('\nmanifest + rollback map -> assets/TK-11644-identity-manifest.json');
+if(!APPLY){ console.log('\nDRY-RUN. No write fired. --apply is GATED (Steve go only).'); process.exit(0); }
+
+const ledger=process.env.HOME+'/.claude/yolo-queue/executed-reversible/ledger.jsonl';
+let ok=0,err=0;
+for(const v of verified){
+  const q=`mutation { metafieldsDelete(metafields:[{ownerId:${JSON.stringify(v.gid)},namespace:"global",key:"description_tag"}]) { deletedMetafields { key } userErrors { field message } } }`;
+  try{
+    const r=await gql(q);
+    const ue=r.metafieldsDelete.userErrors;
+    if(ue && ue.length){ err++; console.error('userErrors',v.handle,JSON.stringify(ue)); continue; }
+    ok++;
+    fs.appendFileSync(ledger,JSON.stringify({ts:new Date().toISOString(),agent:'claude-run-11644',ticket:'TK-11644',
+      action:'delete global.description_tag (identity-contradiction residual)',pid:v.pid,handle:v.handle,blast_radius:1,
+      undo_cmd:`re-set global.description_tag=${JSON.stringify(v.old_value)} on product ${v.pid}`,
+      verify:`storefront meta description now falls back to body_html`})+'\n');
+  }catch(e){ err++; console.error('ERR',v.handle,e.message); }
+}
+console.log(`\nAPPLIED: deleted=${ok} err=${err}`);
diff --git a/scripts/tk11644-postfix-verify.mjs b/scripts/tk11644-postfix-verify.mjs
new file mode 100644
index 0000000..3fe2e48
--- /dev/null
+++ b/scripts/tk11644-postfix-verify.mjs
@@ -0,0 +1,105 @@
+// TK-11644 EXHAUSTIVE post-fix verification. READ-ONLY, $0.
+// Re-runs the same authoritative sweep (full-catalog bulk export of global.description_tag
+// value+updatedAt) AFTER the Tier A+B deletes, and asserts that NOTHING from the executed
+// manifests survives. A sample proves ~1%; this measures the whole population, so a partial
+// apply / silent API error cannot hide behind a green sample.
+// Writes to a NEW path so the PRE-fix evidence export is never overwritten.
+import { gql } from './lib/shopify.mjs';
+import fs from 'node:fs';
+
+const WIN_LO = new Date('2026-04-05T16:20:00-07:00').getTime();
+const WIN_HI = new Date('2026-04-05T16:27:00-07:00').getTime();
+const OUT = 'assets/TK-11644-postfix';
+const RAW = `${OUT}-raw.jsonl`;
+
+const BULK_QUERY = `{
+  products {
+    edges { node {
+      id handle vendor title status
+      metafield(namespace:"global", key:"description_tag") { value updatedAt }
+    } }
+  }
+}`;
+
+async function startBulk() {
+  const q = `mutation { bulkOperationRunQuery(query: ${JSON.stringify(BULK_QUERY)}) {
+    bulkOperation { id status } userErrors { field message } } }`;
+  const d = await gql(q);
+  const ue = d.bulkOperationRunQuery.userErrors;
+  if (ue.length) { console.error('userErrors', ue); process.exit(1); }
+  return d.bulkOperationRunQuery.bulkOperation.id;
+}
+async function poll() {
+  const q = `{ currentBulkOperation(type: QUERY) { id status errorCode objectCount url } }`;
+  for (;;) {
+    const d = await gql(q);
+    const b = d.currentBulkOperation;
+    process.stderr.write(`\r  bulk ${b.status} objs=${b.objectCount}   `);
+    if (b.status === 'COMPLETED') { process.stderr.write('\n'); return b; }
+    if (['FAILED','CANCELED'].includes(b.status)) { console.error('\nbulk', b); process.exit(1); }
+    await new Promise(r => setTimeout(r, 3000));
+  }
+}
+
+let jsonl;
+if (process.env.USE_CACHE === '1' && fs.existsSync(RAW)) {
+  console.error('using cached', RAW);
+  jsonl = fs.readFileSync(RAW,'utf8');
+} else {
+  console.error('starting POST-FIX bulk export ...');
+  await startBulk(); const done = await poll();
+  if (!done.url) { console.error('no results url'); process.exit(1); }
+  jsonl = await (await fetch(done.url)).text();
+  fs.mkdirSync('assets',{recursive:true}); fs.writeFileSync(RAW, jsonl);
+  console.error('cached ->', RAW);
+}
+
+// handles we DELETED (from the executed manifests) — the exhaustive assertion set
+const executed = new Map();
+for (const t of ['A','B']) {
+  const m = JSON.parse(fs.readFileSync(`assets/TK-11644-fix-tier${t}-manifest.json`,'utf8'));
+  for (const r of m.rows) executed.set(r.handle, t);
+}
+
+const lines = jsonl.split('\n').filter(Boolean).map(JSON.parse);
+let totalProducts=0, seenExecuted=0, survivors=0, missingFromCatalog=0;
+const survivorRows=[]; const residualByStatus={}; let residualInWindow=0;
+const seenHandles=new Set();
+
+for (const n of lines) {
+  if (!n.id || !n.id.includes('/Product/')) continue;
+  totalProducts++;
+  const h = n.handle;
+  const mf = n.metafield;
+  const tier = executed.get(h);
+  if (tier) { seenExecuted++; seenHandles.add(h);
+    if (mf && (mf.value||'').trim()) {
+      survivors++;
+      survivorRows.push({handle:h, tier, status:n.status, value:(mf.value||'').slice(0,90), updatedAt:mf.updatedAt});
+    }
+  }
+  if (mf && mf.updatedAt) {
+    const t = new Date(mf.updatedAt).getTime();
+    if (t >= WIN_LO && t <= WIN_HI) {
+      residualInWindow++;
+      residualByStatus[n.status] = (residualByStatus[n.status]||0)+1;
+    }
+  }
+}
+for (const h of executed.keys()) if (!seenHandles.has(h)) missingFromCatalog++;
+
+const verdict = survivors === 0 && missingFromCatalog === 0 ? 'PASS'
+              : survivors === 0 ? 'WARN' : 'FAIL';
+console.log(JSON.stringify({
+  verdict,
+  total_products_measured: totalProducts,
+  executed_population: executed.size,
+  executed_found_in_catalog: seenExecuted,
+  executed_missing_from_catalog: missingFromCatalog,
+  survivors_still_carrying_description_tag: survivors,
+  survivor_sample: survivorRows.slice(0,20),
+  residual_in_bad_job_window_all_statuses: residualInWindow,
+  residual_by_status: residualByStatus,
+  note: 'residual ACTIVE should be Tier C (job wrote something specific/unique, LEAVE) + X (body unusable, EXCLUDED); ARCHIVED/DRAFT were out of scope by design.',
+  raw: RAW,
+}, null, 2));

← 52b975b auto-data-snapshot: 2026-09-16T10:07:35 (1 data files) — scr  ·  back to Designerwallcoverings  ·  TK-00038: complete the Sanderson final PDP verify (was 60/50 7f0bf67 →