[object Object]

← back to Dw Signup Fulfillment

TK-11361: archive both retired DW Free Samples (fn 01a0475d) discount nodes; drop stale prod-validation assertions

c90789df5428812747f7dff5837d11df25c6e2a0 · 2026-09-10 09:52:31 -0700 · Steve Abrams

Regios (title 'Free sample') owns the live sample entitlement per DEPLOY.md Option C; the DW Function nodes granted nothing on 40 real orders and were a latent combinable-discount landmine. production-validation.js no longer asserts the archived node exists; the dw-free-samples-fn-guard canary now owns the no-re-arm invariant.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01Mem2YKvcU5UKmRfDtbVK2Q

Files touched

Diff

commit c90789df5428812747f7dff5837d11df25c6e2a0
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Thu Sep 10 09:52:31 2026 -0700

    TK-11361: archive both retired DW Free Samples (fn 01a0475d) discount nodes; drop stale prod-validation assertions
    
    Regios (title 'Free sample') owns the live sample entitlement per DEPLOY.md Option C; the DW Function nodes granted nothing on 40 real orders and were a latent combinable-discount landmine. production-validation.js no longer asserts the archived node exists; the dw-free-samples-fn-guard canary now owns the no-re-arm invariant.
    
    Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    
    Claude-Session: https://claude.ai/code/session_01Mem2YKvcU5UKmRfDtbVK2Q
---
 scripts/production-validation.js | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/scripts/production-validation.js b/scripts/production-validation.js
index 14b7086..8fb76a2 100644
--- a/scripts/production-validation.js
+++ b/scripts/production-validation.js
@@ -3,8 +3,13 @@
 const crypto = require('crypto');
 const config = require('../lib/config');
 
-const TITLE = 'DW Free Samples (auto)';
-const FUNCTION_ID = '01a0475d-d202-743e-bdc8-7a659f6ff512';
+// Free-sample entitlement is granted by the Regios tag-gated discount (see DEPLOY.md
+// "Option C: verify -> tag -> Regios"): every live sample grant is titled "Free sample".
+// The "DW Free Samples" Shopify Function nodes (fn 01a0475d-d202-743e-bdc8-7a659f6ff512)
+// were RETIRED alternates and were archived 2026-09-10 (TK-11361) after proving, against
+// 40 real orders, that they granted nothing (their titles never appeared on any order).
+// So this gate no longer asserts a DW Function discount node exists. The "no re-armed DW
+// node" invariant is now owned by the dw-free-samples-fn-guard canary.
 const CALLBACK = 'https://signup.designerwallcoverings.com/webhooks/orders-paid';
 
 function check(condition, message) { if (!condition) throw new Error(message); }
@@ -31,16 +36,12 @@ async function run(pass) {
   const goodBody = await good.json();
   check(good.status === 200 && goodBody.status === 'ignored', `signed_webhook_${good.status}`);
 
-  const data = await graphql(`query Validation($search: String!, $customer: ID!) {
+  const data = await graphql(`query Validation($customer: ID!) {
     webhookSubscriptions(first: 20, topics: [ORDERS_PAID]) { nodes { topic uri } }
-    discountNodes(first: 20, query: $search) { nodes { discount { ... on DiscountAutomaticApp { title status combinesWith { productDiscounts } appDiscountType { functionId } } } } }
     customer(id: $customer) { createdAt tags metafield(namespace: "custom", key: "free_samples_used") { value } }
-  }`, { search: `title:${TITLE}`, customer: 'gid://shopify/Customer/740096475248' });
+  }`, { customer: 'gid://shopify/Customer/740096475248' });
   const webhook = data.webhookSubscriptions.nodes.find(x => x.uri === CALLBACK);
-  const discount = data.discountNodes.nodes.map(x => x.discount).find(x => x?.title === TITLE);
   check(webhook?.topic === 'ORDERS_PAID', 'paid_webhook_missing');
-  check(discount?.status === 'ACTIVE' && discount?.appDiscountType?.functionId === FUNCTION_ID, 'discount_not_active');
-  check(discount?.combinesWith?.productDiscounts === true, 'discount_not_combinable');
   check(data.customer?.createdAt?.startsWith('2018-'), 'old_account_fixture_changed');
   check(!data.customer.tags.includes('trade_approved'), 'temporary_trade_tag_not_restored');
 
@@ -50,7 +51,7 @@ async function run(pass) {
   check(html.includes('Existing customer? Sign in. New here? Create an account.'), 'existing_account_copy_missing');
   check(html.includes('Approved design professionals receive unlimited samples.'), 'designer_copy_missing');
 
-  return { pass, health: true, webhookHmac: true, ledgerEndpoint: true, discountActive: true, combines: true, oldAccount2018: true, legacyTradeNotApproved: true, storefrontUx: true };
+  return { pass, health: true, webhookHmac: true, ledgerEndpoint: true, oldAccount2018: true, legacyTradeNotApproved: true, storefrontUx: true };
 }
 
 const pass = Number(process.argv[2] || 1);

← 079d720 TK-10836: DTD verdict B — stage the ship-it remedy (draft or  ·  back to Dw Signup Fulfillment  ·  TK: cap guarded auto-approve at 50/day, falling back to the a4afa27 →