[object Object]

← back to Dw Validator Debug TK11314

Fix Designtex material-copy readiness false positives with regression proof

8cb713c5a12b5fd3840d39d8a0287fcb2479759d · 2026-09-09 09:57:06 -0700 · Steve Abrams

Files touched

Diff

commit 8cb713c5a12b5fd3840d39d8a0287fcb2479759d
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed Sep 9 09:57:06 2026 -0700

    Fix Designtex material-copy readiness false positives with regression proof
---
 shopify/scripts/lib/TK11314-e2e-proof.json         | 30 ++++++++++++++++++++++
 shopify/scripts/lib/validate-before-activate.js    |  5 +++-
 .../scripts/lib/validate-before-activate.test.js   | 29 +++++++++++++++++++++
 3 files changed, 63 insertions(+), 1 deletion(-)

diff --git a/shopify/scripts/lib/TK11314-e2e-proof.json b/shopify/scripts/lib/TK11314-e2e-proof.json
new file mode 100644
index 00000000..679fbbde
--- /dev/null
+++ b/shopify/scripts/lib/TK11314-e2e-proof.json
@@ -0,0 +1,30 @@
+{
+  "ticket": "TK-11314",
+  "timestamp": "2026-09-09T16:55:10.185732+00:00",
+  "environment": "Isolated Mac worktrees; live Shopify read-only snapshots; local dw_unified SELECTs",
+  "cleanup": "Retained local evidence and worktrees. No production code, product, credential, billing, schedule, or canonical database changes.",
+  "intent": "Accept legitimate material-copy phrase while retaining disclaimer and readiness refusals",
+  "risk_tier": "R1 isolated code + R3 read-only live replay",
+  "build": {
+    "branch": "fix/tk11314-description-readiness",
+    "base_commit": "a0294b56ef501900a7a9adec687bf3607c21ef62"
+  },
+  "verdict": "PASS for staged validator; not deployed",
+  "checks": [
+    {
+      "check": "Four regression tests",
+      "verdict": "PASS",
+      "evidence": "node --test shopify/scripts/lib/validate-before-activate.test.js"
+    },
+    {
+      "check": "Live Designtex replay",
+      "verdict": "PASS",
+      "evidence": "/Users/macstudio3/Projects/dw-activation-debug-TK11314/verification/readiness-replay.json;251 false legal-copy flags removed"
+    },
+    {
+      "check": "Live operational query",
+      "verdict": "PASS",
+      "evidence": "/Users/macstudio3/Projects/dw-activation-debug-TK11314/verification/live-boundary.json"
+    }
+  ]
+}
diff --git a/shopify/scripts/lib/validate-before-activate.js b/shopify/scripts/lib/validate-before-activate.js
index a2532eaa..68fbd225 100644
--- a/shopify/scripts/lib/validate-before-activate.js
+++ b/shopify/scripts/lib/validate-before-activate.js
@@ -135,7 +135,10 @@ function validateBeforeActivate(product) {
   } else if (descText.length < 24) {
     reasons.push('description too short (placeholder-grade)');
     tags.push('Needs-Description');
-  } else if (LEGAL_TERMS.test(descText) && descText.length < 200) {
+  } else if (LEGAL_TERMS.test(descText.replace(/\bwithout\s+prop\s*65\s+phthalates\b/gi, '')) && descText.length < 200) {
+    // Designtex's "without Prop 65 Phthalates" is a material specification,
+    // not a disclaimer. Remove only that phrase for this check; any actual
+    // warning/disclaimer elsewhere in the description still blocks.
     // short body that is mostly legal boilerplate = not a real product description
     reasons.push('description is legal/disclaimer boilerplate, not product copy');
     tags.push('Needs-Description');
diff --git a/shopify/scripts/lib/validate-before-activate.test.js b/shopify/scripts/lib/validate-before-activate.test.js
new file mode 100644
index 00000000..789e9c78
--- /dev/null
+++ b/shopify/scripts/lib/validate-before-activate.test.js
@@ -0,0 +1,29 @@
+'use strict';
+const test = require('node:test');
+const assert = require('node:assert/strict');
+const { validateBeforeActivate } = require('./validate-before-activate.js');
+const product = descriptionHtml => ({ title: 'Cork, Dove Wallcoverings | Designtex',
+  vendor: 'Designtex', dwSku: 'DWDX-220334', tags: ['Wallcovering', 'Cork'],
+  specs: { width: '54 Inches' }, descriptionHtml,
+  images: ['https://cdn.shopify.com/example.jpg'], variants: [{ sku: 'DWDX-220334-Sample' }] });
+const description = '<p>Cork in Dove is a designer wallcovering from the Biophilia collection by Designtex. Priced per yard.</p><ul><li><strong>Material:</strong> 100% Vinyl (without Prop 65 Phthalates)</li><li><strong>Width:</strong> 54 Inches</li><li><strong>Sold By:</strong> yard</li></ul>';
+test('actual Designtex material specification is product copy', () => {
+  assert.deepEqual(validateBeforeActivate(product(description)).reasons, []);
+});
+test('real disclaimers remain blocked even with the exempt material phrase', () => {
+  for (const text of ['This product is sold subject to our terms and conditions.',
+    'Disclaimer: without Prop 65 Phthalates. All rights reserved.',
+    'WARNING: Prop 65 chemicals may cause cancer or reproductive harm.',
+    'Copyright © Designtex. All rights reserved.',
+    'Settlement agreement restrictions apply to this product.']) {
+    assert.ok(validateBeforeActivate(product(text)).reasons.some(r => /legal\/disclaimer/.test(r)), text);
+  }
+});
+test('empty, placeholder and short descriptions still fail', () => {
+  for (const description of ['', 'Unknown product coming soon', 'TBD', 'Short'])
+    assert.equal(validateBeforeActivate(product(description)).ok, false);
+});
+test('description correction cannot bypass image, width, sample or internal gates', () => {
+  for (const override of [{ images: [] }, { specs: {} }, { variants: [] }, { tags: ['internal'] }])
+    assert.equal(validateBeforeActivate({ ...product(description), ...override }).ok, false);
+});

← a0294b56 Gate below-images Pattern Description block on live theme (s  ·  back to Dw Validator Debug TK11314  ·  TK-11357 action A: hard-abort guard on 5 debug-clone store-w 1f69e597 →