← back to Dw Signup Fulfillment
TK-11366: answer the valence question - full-price free shipping was a weight-data leak
c959bc5f1ac9614af366097d74a3e3ad206bcfa5 · 2026-09-10 11:18:00 -0700 · Steve Abrams
Pre-window (Jul 1 - Aug 17) non-sample US orders, n=73 (31 free / 42 paid):
FREE: median cart weight 0.25 lb, 55%% under 0.5 lb, 32%% of line items unweighted
PAID: median cart weight 12 lb, 2%% under 0.5 lb, 2%% of line items unweighted
A 16x difference in unweighted-line rate. The free rate was gated on TOTAL WEIGHT
<= 0.5 lb on the General profile, so a cart with no product weights totals 0 lb and
ships free regardless of value: #32506 $938.84, #32510 $476.48, #32545 $411.72,
#32611 $396.00, #32725 $351.84 - all 0 lb, all unweighted, all free.
So the full-price shift is the OPPOSITE of the samples story: samples = customers
overcharged on advertised-free items (real harm, fixed); full-price = DW eating freight
from a catalog data gap (harm to DW, closed). No second customer-harm incident.
Residual not papered over: 45%% of free full-price orders weighed MORE than 0.5 lb and
are unexplained by the weight gate (#32818 $1820/4lb, #32622 $1095/6lb, #32700 $859/8lb).
Spun the catalog defect off as TK-11414.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Files touched
A verification/tk10836/verify-freeship-valence.js
Diff
commit c959bc5f1ac9614af366097d74a3e3ad206bcfa5
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Sep 10 11:18:00 2026 -0700
TK-11366: answer the valence question - full-price free shipping was a weight-data leak
Pre-window (Jul 1 - Aug 17) non-sample US orders, n=73 (31 free / 42 paid):
FREE: median cart weight 0.25 lb, 55%% under 0.5 lb, 32%% of line items unweighted
PAID: median cart weight 12 lb, 2%% under 0.5 lb, 2%% of line items unweighted
A 16x difference in unweighted-line rate. The free rate was gated on TOTAL WEIGHT
<= 0.5 lb on the General profile, so a cart with no product weights totals 0 lb and
ships free regardless of value: #32506 $938.84, #32510 $476.48, #32545 $411.72,
#32611 $396.00, #32725 $351.84 - all 0 lb, all unweighted, all free.
So the full-price shift is the OPPOSITE of the samples story: samples = customers
overcharged on advertised-free items (real harm, fixed); full-price = DW eating freight
from a catalog data gap (harm to DW, closed). No second customer-harm incident.
Residual not papered over: 45%% of free full-price orders weighed MORE than 0.5 lb and
are unexplained by the weight gate (#32818 $1820/4lb, #32622 $1095/6lb, #32700 $859/8lb).
Spun the catalog defect off as TK-11414.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
---
verification/tk10836/verify-freeship-valence.js | 60 +++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/verification/tk10836/verify-freeship-valence.js b/verification/tk10836/verify-freeship-valence.js
new file mode 100644
index 0000000..527702e
--- /dev/null
+++ b/verification/tk10836/verify-freeship-valence.js
@@ -0,0 +1,60 @@
+#!/usr/bin/env node
+// TK-11366 final question: was full-price "Free Shipping (No Tracking)" INTENDED or a LEAK?
+// Hypothesis: pre-2026-09-09 that rate lived on the GENERAL profile gated by TOTAL WEIGHT <= 0.5 lb
+// (per TK-11333's own baseline note). Any order whose products have NO weight set totals 0 lb,
+// clears the gate, and ships free regardless of cart value -> a leak in DW's favour, not a
+// customer benefit by design. Test: compare product weights on pre-window full-price orders that
+// shipped FREE vs those that PAID. READ-ONLY.
+const fs=require('fs'),os=require('os');
+for (const line of fs.readFileSync(os.homedir()+'/Projects/secrets-manager/.env','utf8').split('\n')) {
+ const m=line.match(/^\s*([A-Z0-9_]+)\s*=\s*(.*)$/); if(!m) continue;
+ let v=m[2].trim().replace(/^['"]|['"]$/g,''); if(!process.env[m[1]]) process.env[m[1]]=v;
+}
+const STORE=process.env.SHOPIFY_STORE_DOMAIN, TOKEN=process.env.SHOPIFY_FULL_ACCESS_TOKEN, API='2024-10';
+async function gql(q,v={}){const r=await fetch(`https://${STORE}/admin/api/${API}/graphql.json`,{method:'POST',
+ headers:{'X-Shopify-Access-Token':TOKEN,'Content-Type':'application/json'},body:JSON.stringify({query:q,variables:v})});
+ const j=await r.json(); if(j.errors)console.error('ERR',JSON.stringify(j.errors).slice(0,300)); return j.data;}
+
+const Q=`query($c:String){ orders(first:25, after:$c, query:"created_at:>2026-07-01 created_at:<2026-08-18", sortKey:CREATED_AT){
+ pageInfo{hasNextPage endCursor}
+ nodes{ name createdAt
+ subtotalPriceSet{shopMoney{amount}} totalShippingPriceSet{shopMoney{amount}}
+ shippingLine{title} shippingAddress{countryCodeV2}
+ lineItems(first:15){ nodes{ sku title quantity
+ variant{ inventoryItem{ requiresShipping measurement{ weight{unit value} } } } } } } } }`;
+(async()=>{
+ let c=null, rows=[], pages=0;
+ do{ const d=await gql(Q,{c}); if(!d) break; pages++;
+ for(const o of d.orders.nodes){
+ const lis=o.lineItems.nodes; if(!lis.length) continue;
+ if(o.shippingAddress?.countryCodeV2!=='US') continue;
+ const isS=li=>/(^|-)sample/i.test(li.sku||'')||/sample|memo|swatch/i.test(li.title||'');
+ if(!lis.every(li=>!isS(li))) continue; // NON-sample only
+ let wt=0, unweighted=0, tot=0;
+ for(const li of lis){
+ const w=li.variant?.inventoryItem?.measurement?.weight;
+ const lbs = w? (w.unit==='POUNDS'?w.value : w.unit==='OUNCES'?w.value/16 : w.unit==='GRAMS'?w.value/453.592 : w.unit==='KILOGRAMS'?w.value*2.20462 : 0) : 0;
+ wt += lbs*li.quantity; tot++;
+ if(!w || !w.value) unweighted++;
+ }
+ rows.push({name:o.name, sub:Number(o.subtotalPriceSet?.shopMoney?.amount||0),
+ ship:Number(o.totalShippingPriceSet?.shopMoney?.amount||0),
+ rate:o.shippingLine?.title||'(none)', wt:+wt.toFixed(3), unweighted, lines:tot});
+ } c=d.orders.pageInfo.hasNextPage?d.orders.pageInfo.endCursor:null; }while(c && pages<14);
+
+ const free=rows.filter(r=>r.ship===0), paid=rows.filter(r=>r.ship>0);
+ const stat=(a,f)=>a.length? (a.reduce((s,x)=>s+f(x),0)/a.length) : null;
+ const med=a=>{a=[...a].sort((x,y)=>x-y);return a.length?a[Math.floor(a.length/2)]:null;};
+ console.log(`PRE-WINDOW (Jul 1 - Aug 17) non-sample US orders: n=${rows.length} free=${free.length} paid=${paid.length}\n`);
+ console.log('### THE TEST: does shipping FREE track a cart weight of <= 0.5 lb? ###');
+ for(const [lab,a] of [['FREE',free],['PAID',paid]]){
+ if(!a.length){console.log(` ${lab}: none`);continue;}
+ const under = a.filter(r=>r.wt<=0.5).length;
+ console.log(` ${lab.padEnd(5)} n=${String(a.length).padStart(3)} median cart weight=${med(a.map(r=>r.wt))} lb median subtotal=$${med(a.map(r=>r.sub))}`);
+ console.log(` carts weighing <= 0.5 lb: ${under}/${a.length} (${(100*under/a.length).toFixed(0)}%)`);
+ console.log(` avg unweighted line items per order: ${stat(a,r=>r.unweighted/r.lines*100).toFixed(0)}% of lines have NO weight set`);
+ }
+ console.log('\n### highest-value orders that shipped FREE (the ones that look like a leak) ###');
+ for(const r of free.filter(x=>x.sub>=300).sort((a,b)=>b.sub-a.sub).slice(0,10))
+ console.log(` ${r.name} $${r.sub.toFixed(2)} weight=${r.wt} lb unweighted lines=${r.unweighted}/${r.lines} "${r.rate}"`);
+})();
← b3b8acb TK-10836: park the Kelly remedy — Steve: stop sending to Kel
·
back to Dw Signup Fulfillment
·
TK-11411: ledgered re-send for the 14 customers who lost mai 03b8d4b →