← back to Dw Yolo Loop
cycle 90: CONTINUE-masked segmentation (DTD unanimous A) — c89 (b) defect population = ZERO. Full active scan 71,717 -> 97.49% real-stock + 2.51% untracked POD + 0 true CONTINUE-oversold-at-empty + 0 blocked. SELF-CORRECTION: v1 conflated untracked-inventory (null qty) with oversold -> contaminated 831; own sanity counter (457 impossible DENY-buyable-at-0) caught it; v2 added inventoryItem.tracked -> true defect=0. Resolves c89 73.9%-CONTINUE worry (oversell layered on real stock, not masking empty). Buyability thread fully closed. Residuals: image-correctness, full-404, merch-depth, title/feed hygiene
90deca5cc9f24b512f6d5b3ef00bc9f2618c6035 · 2026-06-18 11:36:36 -0700 · Steve Abrams
Files touched
A scripts/continue-masked-segmentation/FINDING.mdA scripts/continue-masked-segmentation/continue-masked-segmentation-v2.mjsA scripts/continue-masked-segmentation/continue-masked-segmentation.mjs
Diff
commit 90deca5cc9f24b512f6d5b3ef00bc9f2618c6035
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Jun 18 11:36:36 2026 -0700
cycle 90: CONTINUE-masked segmentation (DTD unanimous A) — c89 (b) defect population = ZERO. Full active scan 71,717 -> 97.49% real-stock + 2.51% untracked POD + 0 true CONTINUE-oversold-at-empty + 0 blocked. SELF-CORRECTION: v1 conflated untracked-inventory (null qty) with oversold -> contaminated 831; own sanity counter (457 impossible DENY-buyable-at-0) caught it; v2 added inventoryItem.tracked -> true defect=0. Resolves c89 73.9%-CONTINUE worry (oversell layered on real stock, not masking empty). Buyability thread fully closed. Residuals: image-correctness, full-404, merch-depth, title/feed hygiene
---
scripts/continue-masked-segmentation/FINDING.md | 32 ++++++++++++
.../continue-masked-segmentation-v2.mjs | 57 +++++++++++++++++++++
.../continue-masked-segmentation.mjs | 59 ++++++++++++++++++++++
3 files changed, 148 insertions(+)
diff --git a/scripts/continue-masked-segmentation/FINDING.md b/scripts/continue-masked-segmentation/FINDING.md
new file mode 100644
index 0000000..33b1e55
--- /dev/null
+++ b/scripts/continue-masked-segmentation/FINDING.md
@@ -0,0 +1,32 @@
+# The c89 (b) "CONTINUE-masked never-onboarded" defect population = ZERO — resolved; buyability rests on real stock (97.5%) + intentional untracked POD (2.5%), both benign — cycle 90
+
+**DTD verdict A (unanimous 3/3 — Claude + Codex + Qwen).** READ-ONLY (Admin GraphQL full active scan; no mutation), **$0**. Closes the c89-officer-named residual: segment the active catalog (all buyable) into buyable-via-real-stock vs buyable-ONLY-via-CONTINUE-oversell-at-qty≤0 (the hypothesized soft onboarding-defect population).
+
+## 🟢 Result: the true (b) defect set is ZERO — buyability is 97.5% real stock + 2.5% intentional untracked POD
+Full active scan (71,717, complete=true, PJ excluded), classified by best buyable path per product:
+| Buyable by | Products | Share | Verdict |
+|---|---|---|---|
+| **REAL-STOCK** (tracked, qty>0) | 69,916 | **97.49%** | benign |
+| **UNTRACKED** (not tracked, always-available POD) | 1,801 | **2.51%** | benign (by design) |
+| **CONTINUE-OVERSOLD only** (tracked, qty≤0, CONTINUE = the c89 (b) set) | **0** | **0.00%** | — none exist |
+| **BLOCKED** (tracked, qty≤0, DENY = unbuyable) | 0 | 0.00% | consistent with c89 (0 unbuyable) |
+- **The hypothesized (b) "buyable only because CONTINUE oversells an empty tracked variant" population does NOT exist (0).** The 1,801 always-available-without-stock products are all UNTRACKED inventory (print-on-demand dropship: Pixels, Printy6, Contrado, Steve Abrams Studios, Fentucci POD merch) — made-to-order by design, not an onboarding defect.
+
+## 🔬 Skeptical decode — I caught + corrected my OWN classifier flaw (the discipline working)
+- **v1 reported 831 "CONTINUE-masked-only" — that number was WRONG and I did not ship it.** v1 treated null inventoryQuantity as -1, so UNTRACKED-inventory products (qty=null) fell into the "qty≤0" bucket and got mislabeled as oversold. My own sanity counter caught it: v1 flagged **457 "DENY-variant-buyable-at-qty≤0"** — an impossible state UNLESS inventory is untracked. The DENY/0 examples were all POD vendors (Printy6/Pixels/Contrado/Steve Abrams Studios), the tell.
+- **v2 fix:** read `inventoryItem.tracked` per variant and rank paths real-stock > untracked > continue-oversold > blocked. Result: the 831 decomposes into ~1,801 untracked (benign) + 0 true-oversold. **value-matching-a-flawed-classifier is a tautology** — verifying the mechanism (tracked vs CONTINUE) independently is what surfaced the truth.
+- **Negative control:** real-stock bulk 97.49% → a true CONTINUE-oversold-at-empty set would be a distinct anomaly. There are none.
+- **Resolves the deeper c89 "73.9% CONTINUE" worry too:** c89's 73.9% was a VARIANT-level policy count; this is PRODUCT-level best-path. 97.49% of products have a qty>0 variant → CONTINUE oversell is layered ON TOP of real stock (belt-and-suspenders), NOT propping up empty inventory. So "buyable because we never say no" does not describe the tracked catalog — only the 2.51% intentional POD is stockless, by design.
+
+## 📋 Disposition: c89 (b) residual RESOLVED at zero; no fix
+1. **No CONTINUE-masked onboarding-defect population exists.** The c89 (b) concern is measured and closed at 0. No fix.
+2. **The 1,801 untracked POD products are benign by design** (made-to-order: Pixels/Printy6/Contrado/Steve Abrams Studios/Fentucci merch — print-on-demand, no stock to hold). NOT a defect. The c89 fulfillment/lead-time residual applies to them only in the trivial, intended sense (POD is always made-on-demand) — no action.
+3. **Buyability thread now fully closed:** c89 = 0 active-but-unbuyable (census); c90 = 0 CONTINUE-masked-at-empty, buyability = 97.5% real stock + 2.5% intentional POD. The inventory/buyability surface is structurally healthy.
+
+## What this does NOT cover (named residuals — the open non-inventory surfaces)
+- **Image CORRECTNESS** (loads-but-wrong-colorway, c88 higher-severity; Gemini-capped → needs a non-vision signal or a different key).
+- **Full-404 image pass** (heavy fan-out, low probability after the c88 clean sample).
+- **Merchandising-DEPTH** (c87-queued; gated on cracking the Boost facet param).
+- **Title/feed hygiene** (the banned-word "Wallpaper" live blast-radius + the c86 misnamed-catch-all feed mislabel) — a separate compliance/feed surface.
+
+_Cycle 90. DTD-picked A (unanimous 3/3). Segmented buyability by mechanism: full active scan (71,717) → 97.49% real-stock + 2.51% untracked POD + **0 true CONTINUE-oversold-at-empty** + 0 blocked. The c89-officer-named (b) "CONTINUE-masked never-onboarded" defect population does NOT exist. CRITICAL self-correction: my v1 classifier conflated UNTRACKED inventory (null qty → -1) with oversold and reported a contaminated 831; my own sanity counter (457 impossible "DENY-buyable-at-0") caught it; v2 added inventoryItem.tracked → the 831 was ~1,801 benign POD, true-defect = 0. Also resolves the c89 73.9%-CONTINUE worry: CONTINUE is layered on real stock (97.5% have qty>0), not masking empty inventory. Buyability thread fully closed (healthy). Residuals: image-correctness, full-404, merchandising-depth, title/feed hygiene. PJ excluded. Read-only, $0, no fix._
diff --git a/scripts/continue-masked-segmentation/continue-masked-segmentation-v2.mjs b/scripts/continue-masked-segmentation/continue-masked-segmentation-v2.mjs
new file mode 100644
index 0000000..2abfa24
--- /dev/null
+++ b/scripts/continue-masked-segmentation/continue-masked-segmentation-v2.mjs
@@ -0,0 +1,57 @@
+// continue-masked-segmentation-v2 — READ-ONLY, $0. Cycle 90 CORRECTED. v1 conflated two buyable-at-qty<=0
+// causes: (1) inventory UNTRACKED (always available, benign — e.g. print-on-demand dropship Printy6/Pixels/
+// Contrado/Steve Abrams Studios) vs (2) tracked + qty<=0 + CONTINUE oversell (the real (b) soft-defect).
+// v1's null-qty -> -1 misclassified UNTRACKED as masked (the 457 "DENY-buyable-at-0" oddity = exactly this).
+// FIX: read inventoryItem.tracked per variant. Per-variant buyable-reason:
+// tracked=false -> UNTRACKED (always buyable, benign)
+// tracked=true & qty>0 -> REAL-STOCK (benign)
+// tracked=true & qty<=0 & CONTINUE -> CONTINUE-OVERSOLD (the (b) defect candidate)
+// tracked=true & qty<=0 & DENY -> BLOCKED (should be unbuyable; c89 said 0)
+// Product class = best path: real-stock > untracked > continue-oversold > blocked. True (b) = ONLY-continue-oversold. EXCLUDES PJ.
+import fs from 'fs';
+const ENV=fs.readFileSync('/Users/stevestudio2/Projects/secrets-manager/.env','utf8');
+const TOK=((ENV.match(/^SHOPIFY_ADMIN_TOKEN=(.+)$/m)||[])[1]||'').replace(/['"\r]/g,'').trim();
+const GQL='https://designer-laboratory-sandbox.myshopify.com/admin/api/2024-10/graphql.json';
+const PJ=/phillip[- ]?jeffries/i;
+const sleep=ms=>new Promise(r=>setTimeout(r,ms));
+async function gql(q,v){for(let a=0;a<6;a++){const r=await fetch(GQL,{method:'POST',headers:{'X-Shopify-Access-Token':TOK,'Content-Type':'application/json'},body:JSON.stringify({query:q,variables:v})});if(r.status===429||r.status>=500){await sleep(2000*(a+1));continue;}const j=await r.json();if(j.errors&&JSON.stringify(j.errors).includes('Throttled')){await sleep(2500*(a+1));continue;}return j;}return null;}
+const Q=`query($cursor:String){ products(first:40, after:$cursor, query:"status:active"){ pageInfo{hasNextPage endCursor}
+ edges{node{ title vendor productType
+ variants(first:12){ edges{ node{ availableForSale inventoryQuantity inventoryPolicy inventoryItem{ tracked } } } } } } } }`;
+let cursor=null,pages=0,scanned=0,complete=true;
+let realStock=0, untracked=0, continueOversold=0, blocked=0, noVar=0;
+const coByVendor={}, coEx=[];
+function reason(v){ const tracked=v.inventoryItem?.tracked; const q=(typeof v.inventoryQuantity==='number'?v.inventoryQuantity:null);
+ if(tracked===false) return 'untracked';
+ if(q!==null && q>0) return 'realstock';
+ if(v.inventoryPolicy==='CONTINUE') return 'oversold'; // tracked & q<=0 & CONTINUE
+ return 'blocked'; }
+const RANK={realstock:3,untracked:2,oversold:1,blocked:0};
+while(true){ const j=await gql(Q,{cursor}); if(!j?.data){complete=false;break;} const c=j.data.products;
+ for(const e of c.edges){ const n=e.node; if(PJ.test(n.vendor||''))continue; scanned++;
+ const vs=(n.variants?.edges||[]).map(x=>x.node);
+ if(vs.length===0){ noVar++; continue; }
+ const best=vs.map(reason).reduce((a,b)=>RANK[b]>RANK[a]?b:a,'blocked');
+ if(best==='realstock') realStock++;
+ else if(best==='untracked') untracked++;
+ else if(best==='oversold'){ continueOversold++; coByVendor[n.vendor]=(coByVendor[n.vendor]||0)+1;
+ if(coEx.length<30){ const summ=vs.map(v=>`${v.inventoryItem?.tracked?'T':'U'}:${v.inventoryPolicy}/${v.inventoryQuantity}`).join(','); coEx.push({t:(n.title||'').slice(0,42),vendor:n.vendor,type:n.productType,vars:vs.length,summ:summ.slice(0,70)}); } }
+ else blocked++;
+ }
+ pages++; if(!c.pageInfo.hasNextPage)break; cursor=c.pageInfo.endCursor;
+ const cost=j.extensions?.cost?.throttleStatus; if(cost&&cost.currentlyAvailable<500) await sleep(1500); else await sleep(250);
+ if(pages%150===0) console.log(` ${pages}p scanned=${scanned} continue-oversold=${continueOversold} blocked=${blocked}`);
+}
+const pct=x=>scanned?(100*x/scanned).toFixed(2):'0';
+console.log(`\n=== continue-masked-segmentation-v2 (CORRECTED, READ-ONLY, $0) ===`);
+console.log(`active scanned: ${scanned} (complete=${complete}, ${pages}p) [PJ excluded]`);
+console.log(`\nBUYABLE-BY (best path per product):`);
+console.log(` REAL-STOCK (tracked, qty>0, benign): ${realStock} (${pct(realStock)}%)`);
+console.log(` UNTRACKED (not tracked, always buyable, benign POD): ${untracked} (${pct(untracked)}%)`);
+console.log(` CONTINUE-OVERSOLD only (tracked, qty<=0, CONTINUE = the TRUE (b) set): ${continueOversold} (${pct(continueOversold)}%)`);
+console.log(` BLOCKED (tracked, qty<=0, DENY = would be unbuyable; c89 said 0): ${blocked} (${pct(blocked)}%)`);
+console.log(` no-variants: ${noVar}`);
+console.log(`\nTRUE (b) CONTINUE-OVERSOLD by vendor (top 20):`); Object.entries(coByVendor).sort((a,b)=>b[1]-a[1]).slice(0,20).forEach(([v,n])=>console.log(` ${v}: ${n}`));
+console.log(`\nTRUE (b) examples (summ = Tracked/Untracked:policy/qty):`); coEx.forEach(x=>console.log(` "${x.t}" [${x.vendor}] vars=${x.vars} summ=${x.summ}`));
+fs.writeFileSync('/tmp/continue-masked-segmentation-v2.json',JSON.stringify({ts:new Date().toISOString(),scanned,complete,realStock,untracked,continueOversold,blocked,noVar,coByVendor,coEx},null,2));
+console.log(`\nwrote /tmp/continue-masked-segmentation-v2.json`);
diff --git a/scripts/continue-masked-segmentation/continue-masked-segmentation.mjs b/scripts/continue-masked-segmentation/continue-masked-segmentation.mjs
new file mode 100644
index 0000000..4ea8dfd
--- /dev/null
+++ b/scripts/continue-masked-segmentation/continue-masked-segmentation.mjs
@@ -0,0 +1,59 @@
+// continue-masked-segmentation — READ-ONLY, $0. Cycle 90. Closes the c89 (b) residual: of the active
+// products (all buyable), which are buyable via POSITIVE REAL STOCK (benign) vs ONLY because
+// inventoryPolicy=CONTINUE oversells a qty<=0 variant (the soft onboarding-defect population riding
+// oversell — "buyable because we never say no"). Classification per product:
+// maxQty = max variant inventoryQuantity
+// real-stock : maxQty > 0 (benign; sub-split: has the 2026 sentinel vs other-positive-stock)
+// CONTINUE-masked-only : maxQty <= 0 -> buyable ONLY via CONTINUE oversell = the (b) set.
+// Note: the 2026 sentinel is a qty>0, so CONTINUE-masked-only is by construction missing-2026 (the
+// never-properly-onboarded signal). NEGATIVE CONTROL: the genuinely-stocked bulk makes the masked-at-zero
+// set a distinct quantifiable population, not the norm. EXCLUDES PJ.
+import fs from 'fs';
+const ENV=fs.readFileSync('/Users/stevestudio2/Projects/secrets-manager/.env','utf8');
+const TOK=((ENV.match(/^SHOPIFY_ADMIN_TOKEN=(.+)$/m)||[])[1]||'').replace(/['"\r]/g,'').trim();
+const GQL='https://designer-laboratory-sandbox.myshopify.com/admin/api/2024-10/graphql.json';
+const PJ=/phillip[- ]?jeffries/i;
+const sleep=ms=>new Promise(r=>setTimeout(r,ms));
+async function gql(q,v){for(let a=0;a<6;a++){const r=await fetch(GQL,{method:'POST',headers:{'X-Shopify-Access-Token':TOK,'Content-Type':'application/json'},body:JSON.stringify({query:q,variables:v})});if(r.status===429||r.status>=500){await sleep(2000*(a+1));continue;}const j=await r.json();if(j.errors&&JSON.stringify(j.errors).includes('Throttled')){await sleep(2500*(a+1));continue;}return j;}return null;}
+const Q=`query($cursor:String){ products(first:50, after:$cursor, query:"status:active"){ pageInfo{hasNextPage endCursor}
+ edges{node{ title vendor productType
+ variants(first:12){ edges{ node{ availableForSale inventoryQuantity inventoryPolicy } } } } } } }`;
+let cursor=null,pages=0,scanned=0,complete=true;
+let realStock=0, realStock2026=0, realStockOther=0, maskedOnly=0, noVar=0, maskedButHasDenyBuyable=0;
+const maskedByVendor={}, maskedEx=[];
+while(true){ const j=await gql(Q,{cursor}); if(!j?.data){complete=false;break;} const c=j.data.products;
+ for(const e of c.edges){ const n=e.node; if(PJ.test(n.vendor||''))continue; scanned++;
+ const vs=(n.variants?.edges||[]).map(x=>x.node);
+ if(vs.length===0){ noVar++; continue; }
+ const maxQty=Math.max(...vs.map(v=>(typeof v.inventoryQuantity==='number'?v.inventoryQuantity:-1)));
+ const has2026=vs.some(v=>v.inventoryQuantity===2026);
+ if(maxQty>0){ realStock++; if(has2026) realStock2026++; else realStockOther++; }
+ else {
+ // maxQty<=0 : buyable only via CONTINUE oversell (the (b) set). Sanity: is there a buyable variant?
+ const buyableVia=vs.filter(v=>v.availableForSale===true);
+ const allContinue=buyableVia.length>0 && buyableVia.every(v=>v.inventoryPolicy==='CONTINUE');
+ if(buyableVia.some(v=>v.inventoryPolicy==='DENY')) maskedButHasDenyBuyable++; // DENY+qty<=0+buyable = oddity
+ maskedOnly++;
+ maskedByVendor[n.vendor]=(maskedByVendor[n.vendor]||0)+1;
+ if(maskedEx.length<30){ const summ=vs.map(v=>`${v.inventoryPolicy}/${v.inventoryQuantity}`).join(','); maskedEx.push({t:(n.title||'').slice(0,42),vendor:n.vendor,type:n.productType,vars:vs.length,allCont:allContinue,summ:summ.slice(0,64)}); }
+ }
+ }
+ pages++; if(!c.pageInfo.hasNextPage)break; cursor=c.pageInfo.endCursor;
+ const cost=j.extensions?.cost?.throttleStatus; if(cost&&cost.currentlyAvailable<500) await sleep(1500); else await sleep(250);
+ if(pages%100===0) console.log(` ${pages}p scanned=${scanned} masked-only=${maskedOnly}`);
+}
+const pct=x=>scanned?(100*x/scanned).toFixed(2):'0';
+console.log(`\n=== continue-masked-segmentation (READ-ONLY, $0) ===`);
+console.log(`active scanned: ${scanned} (complete=${complete}, ${pages}p) [PJ excluded]`);
+console.log(`\nHOW each active product is BUYABLE:`);
+console.log(` REAL-STOCK (>=1 variant qty>0, benign): ${realStock} (${pct(realStock)}%)`);
+console.log(` - of which AT the 2026 sentinel: ${realStock2026} (${pct(realStock2026)}%)`);
+console.log(` - other positive stock (no 2026 sentinel, benign drift): ${realStockOther} (${pct(realStockOther)}%)`);
+console.log(` CONTINUE-MASKED-ONLY (max qty<=0, buyable ONLY via oversell = the (b) soft-defect set): ${maskedOnly} (${pct(maskedOnly)}%)`);
+console.log(` no-variants oddity: ${noVar}`);
+console.log(` (sanity) masked-but-a-DENY-variant-is-buyable-at-qty<=0 (data oddity): ${maskedButHasDenyBuyable}`);
+console.log(`\nNEGATIVE CONTROL: real-stock bulk ${pct(realStock)}% -> CONTINUE-masked-only is ${maskedOnly>0?'a distinct quantifiable population':'(none)'}.`);
+console.log(`\nCONTINUE-MASKED-ONLY by vendor (top 20):`); Object.entries(maskedByVendor).sort((a,b)=>b[1]-a[1]).slice(0,20).forEach(([v,n])=>console.log(` ${v}: ${n}`));
+console.log(`\nCONTINUE-MASKED-ONLY examples (summ = policy/qty per variant):`); maskedEx.forEach(x=>console.log(` "${x.t}" [${x.vendor}] vars=${x.vars} allContinue=${x.allCont} summ=${x.summ}`));
+fs.writeFileSync('/tmp/continue-masked-segmentation.json',JSON.stringify({ts:new Date().toISOString(),scanned,complete,realStock,realStock2026,realStockOther,maskedOnly,noVar,maskedButHasDenyBuyable,maskedByVendor,maskedEx},null,2));
+console.log(`\nwrote /tmp/continue-masked-segmentation.json`);
← 232ce74 cycle 89: consistency fix — decode header reframed (census=p
·
back to Dw Yolo Loop
·
cycle 90: officer vp-dw-commerce CONFIRMED (boundary-case so 7a63e67 →