← back to Gmc Titlefix
TK-11449 close-out verification: all 6 tobacco appeals landed, 16/16 cohort accounted for, account-wide policy scan
25a4869057f194469471703259429cd95f75ee00 · 2026-09-16 14:08:24 -0700 · Steve
Read-only, $0. Evidence for closing TK-11449:
- 6 Fentucci Naturals tobacco offers now approved 6/6 contexts, zero item-level issues
- landing-side parity re-checked (the Batik trap): 4.25 advertised == 4.25 rendered, 6/6 published
- the other 10 of the original 16 re-measured: 9 absent (404), 1 (Saint Germain Hemp II) still
disapproved and correctly routed as Phillip Jeffries showroom-only
- account-wide: accountIssues=0, tobacco_policy_violation=1 product total (the routed one),
so the measurement is no longer cohort-bound
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014n9AwiqukwYaLECtAEMvXd
Files touched
A data/tk11449-pj-gmc-scope.jsonA tk11449-acct-policy-scan.mjsA tk11449-close-parity6.mjsA tk11449-close-verify-other10.mjsA tk11449-close-verify.mjsA tk11449-pj-gmc-scope.mjsA tk11449-policy-locate.mjs
Diff
commit 25a4869057f194469471703259429cd95f75ee00
Author: Steve <steve@designerwallcoverings.com>
Date: Wed Sep 16 14:08:24 2026 -0700
TK-11449 close-out verification: all 6 tobacco appeals landed, 16/16 cohort accounted for, account-wide policy scan
Read-only, $0. Evidence for closing TK-11449:
- 6 Fentucci Naturals tobacco offers now approved 6/6 contexts, zero item-level issues
- landing-side parity re-checked (the Batik trap): 4.25 advertised == 4.25 rendered, 6/6 published
- the other 10 of the original 16 re-measured: 9 absent (404), 1 (Saint Germain Hemp II) still
disapproved and correctly routed as Phillip Jeffries showroom-only
- account-wide: accountIssues=0, tobacco_policy_violation=1 product total (the routed one),
so the measurement is no longer cohort-bound
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014n9AwiqukwYaLECtAEMvXd
---
data/tk11449-pj-gmc-scope.json | 88 ++++++++++++++++++++++++++++++++++++++++
tk11449-acct-policy-scan.mjs | 41 +++++++++++++++++++
tk11449-close-parity6.mjs | 29 +++++++++++++
tk11449-close-verify-other10.mjs | 31 ++++++++++++++
tk11449-close-verify.mjs | 85 ++++++++++++++++++++++++++++++++++++++
tk11449-pj-gmc-scope.mjs | 40 ++++++++++++++++++
tk11449-policy-locate.mjs | 35 ++++++++++++++++
7 files changed, 349 insertions(+)
diff --git a/data/tk11449-pj-gmc-scope.json b/data/tk11449-pj-gmc-scope.json
new file mode 100644
index 0000000..1fb2c3f
--- /dev/null
+++ b/data/tk11449-pj-gmc-scope.json
@@ -0,0 +1,88 @@
+{
+ "ticket": "TK-11449 spinoff",
+ "read_only": true,
+ "fetched_at": "2026-09-16T21:06:47.068Z",
+ "walk_complete": true,
+ "total_offers_walked": 61992,
+ "pj_offers": 7,
+ "pj_serving": 4,
+ "pj_disapproved_only": 3,
+ "rows": [
+ {
+ "offerId": "44455859126323",
+ "title": "Sakka - White on Marshmallow Manila Hemp 11' Panel Height - Mural Repe",
+ "price": 5212.67,
+ "link": "https://www.designerwallcoverings.com/products/dwjp-13182-philip-jeffries-sakka-white-on-marshmallow-manila-hemp-11-panel-height-mural-repeat-264-670-6-cm-h-9022",
+ "ctx_approved": 6,
+ "ctx_disapproved": 0,
+ "ctx_total": 6,
+ "issues": []
+ },
+ {
+ "offerId": "shopify_US_7375754395699_42511926263859",
+ "title": "Vinyl Husk - Banana Bark | Phillip Jeffries",
+ "price": 358.37,
+ "link": "https://www.designerwallcoverings.com/products/dwjp-12278-philip-jeffries-vinyl-husk-banana-bark-7264?variant=44788370669619&country=US¤cy=USD&utm_medium=product_sync&utm_source=google&utm_content=sag_organic&utm_campaign=sag_organic",
+ "ctx_approved": 6,
+ "ctx_disapproved": 0,
+ "ctx_total": 6,
+ "issues": []
+ },
+ {
+ "offerId": "44455856701491",
+ "title": "Haiku - Red Rejuvination on Venetian Glass Glam Grass 11' Panel Height",
+ "price": 5212.67,
+ "link": "https://www.designerwallcoverings.com/products/dwjp-13178-philip-jeffries-haiku-red-rejuvination-on-venetian-glass-glam-grass-11-panel-height-mural-repeat-264-670-6-cm-h-9020?variant=44455856701491",
+ "ctx_approved": 6,
+ "ctx_disapproved": 0,
+ "ctx_total": 6,
+ "issues": []
+ },
+ {
+ "offerId": "shopify_US_7375774941235_42511949398067",
+ "title": "Vinyl Brushstroke Silk - Picasso Plum Repeat: 18\" (45.7cm) V x 54\" (13",
+ "price": 318.55,
+ "link": "https://www.designerwallcoverings.com/products/dwjp-12420-philip-jeffries-vinyl-brushstroke-silk-picasso-plum-repeat-18-45-7cm-v-x-54-137-2cm-h-7479?variant=44788370898995&country=US¤cy=USD&utm_medium=product_sync&utm_source=google&utm_content=sag_organic&utm_campaign=sag_organic",
+ "ctx_approved": 0,
+ "ctx_disapproved": 6,
+ "ctx_total": 6,
+ "issues": [
+ "DISAPPROVED|price_mismatch"
+ ]
+ },
+ {
+ "offerId": "shopify_US_7857804935219_44425863299123",
+ "title": "Suede Lounge - Taupe Topaz | Wallcovering | Phillip Jeffries Roll",
+ "price": 94,
+ "link": "https://www.designerwallcoverings.com/products/suede-lounge-taupe-topaz-wallcovering-phillip-jeffries?variant=44425863299123&country=US¤cy=USD&utm_medium=product_sync&utm_source=google&utm_content=sag_organic&utm_campaign=sag_organic",
+ "ctx_approved": 0,
+ "ctx_disapproved": 6,
+ "ctx_total": 6,
+ "issues": [
+ "DISAPPROVED|item_missing_required_attribute"
+ ]
+ },
+ {
+ "offerId": "shopify_US_7375678636083_42511767699507",
+ "title": "Against The Grain - Chevronic Charcoal | Phillip Jeffries",
+ "price": 318.55,
+ "link": "https://www.designerwallcoverings.com/products/dwjp-11159-philip-jeffries-against-the-grain-chevronic-charcoal-repeat-12-30-5cmhorizontal-4274?variant=44788367851571&country=US¤cy=USD&utm_medium=product_sync&utm_source=google&utm_content=sag_organic&utm_campaign=sag_organic",
+ "ctx_approved": 0,
+ "ctx_disapproved": 6,
+ "ctx_total": 6,
+ "issues": [
+ "DISAPPROVED|price_mismatch"
+ ]
+ },
+ {
+ "offerId": "shopify_US_7375889465395_42512083681331",
+ "title": "Sakka - Beige on Manicured White Zen Washi 11' Panel Height - Mural Re",
+ "price": 5212.67,
+ "link": "https://www.designerwallcoverings.com/products/dwjp-13180-philip-jeffries-sakka-beige-on-manicured-white-zen-washi-11-panel-height-mural-repeat-264-670-6-cm-h-9021?variant=44455857848371&country=US¤cy=USD&utm_medium=product_sync&utm_source=google&utm_content=sag_organic&utm_campaign=sag_organic",
+ "ctx_approved": 6,
+ "ctx_disapproved": 0,
+ "ctx_total": 6,
+ "issues": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tk11449-acct-policy-scan.mjs b/tk11449-acct-policy-scan.mjs
new file mode 100644
index 0000000..105b5ee
--- /dev/null
+++ b/tk11449-acct-policy-scan.mjs
@@ -0,0 +1,41 @@
+// READ-ONLY, $0: ACCOUNT-WIDE policy-issue scan — closes the cohort-bound gap Kimi flagged.
+// (a) aggregateProductStatuses -> how many products account-wide carry tobacco_policy_violation?
+// (b) accounts/v1/.../issues -> any ACCOUNT-level tobacco/policy issue suppressing serving?
+import { createRequire } from 'module';
+const require = createRequire(import.meta.url);
+const { token, MERCHANT } = require('/Users/macstudio3/Projects/gmc-titlefix/_auth.js');
+const BASE='https://merchantapi.googleapis.com';
+const H={Authorization:'Bearer '+(await token())};
+
+// (b) account-level issues
+const ra=await fetch(`${BASE}/accounts/v1/accounts/${MERCHANT}/issues`,{headers:H,signal:AbortSignal.timeout(60000)});
+const ja=await ra.json();
+console.log('--- ACCOUNT-LEVEL ISSUES --- http',ra.status);
+const ai=ja.accountIssues||[];
+console.log('count:',ai.length);
+ai.forEach(i=>console.log(' ',i.severity,'|',i.title,'|',i.impactedDestinations?JSON.stringify(i.impactedDestinations).slice(0,120):''));
+if(ra.status!==200) console.log(' NOT-MEASURED (non-200) — do not read as clean');
+
+// (a) aggregate item-level issue codes account-wide
+let page='',codes={},active=0,disc=0,pend=0,seen=new Set(),ok=true,ctxs=new Set();
+do{
+ const r=await fetch(`${BASE}/issueresolution/v1/accounts/${MERCHANT}/aggregateProductStatuses?pageSize=100`+(page?`&pageToken=${encodeURIComponent(page)}`:''),{headers:H,signal:AbortSignal.timeout(90000)});
+ if(!r.ok){ ok=false; console.log('aggregate HTTP',r.status); break; }
+ const j=await r.json();
+ for(const a of (j.aggregateProductStatuses||[])){
+ ctxs.add(a.reportingContext);
+ if(a.reportingContext!=='SHOPPING_ADS') continue;
+ const s=a.stats||{};
+ active+=Number(s.activeCount||0); disc+=Number(s.disapprovedCount||0); pend+=Number(s.pendingCount||0);
+ for(const i of (a.itemLevelIssues||[])) if(i.severity==='DISAPPROVED') codes[i.code]=(codes[i.code]||0)+Number(i.productCount||0);
+ }
+ page=j.nextPageToken||''; if(page&&seen.has(page))break; seen.add(page);
+}while(page);
+console.log('\n--- ACCOUNT-WIDE (SHOPPING_ADS) --- walk_ok:',ok);
+console.log('active',active,'disapproved',disc,'pending',pend);
+const sorted=Object.entries(codes).sort((a,b)=>b[1]-a[1]);
+console.log('top disapproval codes:');
+sorted.slice(0,12).forEach(([c,n])=>console.log(' ',String(n).padStart(7),c));
+const tob=sorted.filter(([c])=>/tobacco|illegal_drugs|alcohol|legal_restrictions/.test(c));
+console.log('\nPOLICY-FAMILY CODES ACCOUNT-WIDE:', tob.length?JSON.stringify(Object.fromEntries(tob)):'(NONE)');
+if(!ok) console.log('NOT-MEASURED: aggregate walk incomplete — counts are not authoritative.');
diff --git a/tk11449-close-parity6.mjs b/tk11449-close-parity6.mjs
new file mode 100644
index 0000000..fceced3
--- /dev/null
+++ b/tk11449-close-parity6.mjs
@@ -0,0 +1,29 @@
+// READ-ONLY storefront parity + liveness spot-check for the 6 ex-tobacco offers. 6 gentle GETs, 6s apart.
+import fs from 'fs';
+const rows = JSON.parse(fs.readFileSync('/Users/macstudio3/Projects/gmc-titlefix/data/tk11449-close-verify.json','utf8'))
+ .rows.filter(r=>r.grp==='tobacco');
+const UA = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125 Safari/537.36';
+const out=[];
+for (const r of rows) {
+ const handle = new URL(r.link).pathname.split('/').pop();
+ const vid = new URL(r.link).searchParams.get('variant');
+ let rec={name:r.name,handle,vid,advertised:r.price};
+ try {
+ const res = await fetch(`https://www.designerwallcoverings.com/products/${handle}.json`,{headers:{'User-Agent':UA},signal:AbortSignal.timeout(30000)});
+ rec.http=res.status;
+ if(res.ok){
+ const p=(await res.json()).product;
+ rec.product_id=p.id; rec.published=!!p.published_at; rec.variants=p.variants.length;
+ const v=p.variants.find(v=>String(v.id)===String(vid));
+ rec.landing_variant_found=!!v; rec.landing_price=v?Number(v.price):null;
+ rec.parity = v ? (Math.abs(Number(v.price)-r.price)<0.005) : null;
+ }
+ } catch(e){ rec.http='ERR '+String(e).slice(0,60); }
+ out.push(rec);
+ console.log(`${rec.parity===true?'OK ':rec.parity===false?'MISMATCH':'??'} ${rec.name.padEnd(22)} http=${rec.http} adv=${rec.advertised} landing=${rec.landing_price} published=${rec.published} variantFound=${rec.landing_variant_found}`);
+ await new Promise(z=>setTimeout(z,6000));
+}
+fs.writeFileSync('/Users/macstudio3/Projects/gmc-titlefix/data/tk11449-close-parity6.json',
+ JSON.stringify({ticket:'TK-11449',read_only:true,fetched_at:new Date().toISOString(),rows:out},null,1));
+const bad=out.filter(r=>r.parity!==true);
+console.log(bad.length?`\nNOT-CLEAN: ${bad.length}/6`:`\nALL 6 CLEAN: advertised == landing, all published`);
diff --git a/tk11449-close-verify-other10.mjs b/tk11449-close-verify-other10.mjs
new file mode 100644
index 0000000..7bbff15
--- /dev/null
+++ b/tk11449-close-verify-other10.mjs
@@ -0,0 +1,31 @@
+// READ-ONLY: current live state of the OTHER 10 originally-tobacco-flagged offers. $0.
+import { createRequire } from 'module';
+const require = createRequire(import.meta.url);
+const { token, MERCHANT } = require('/Users/macstudio3/Projects/gmc-titlefix/_auth.js');
+import fs from 'fs';
+const ALL = JSON.parse(fs.readFileSync('/tmp/tk11449-orig16.json','utf8'));
+const SIX = ['44588462440499','44587694358579','44588454772787','44588462506035','44588462637107','44588462571571'];
+const TEN = ALL.filter(x=>!SIX.includes(x.o));
+const BASE='https://merchantapi.googleapis.com';
+const money=m=>(m&&m.amountMicros!=null)?Number(m.amountMicros)/1e6:null;
+const H={Authorization:'Bearer '+(await token())};
+const rows=[];
+for(const t of TEN){
+ const name=`accounts/${MERCHANT}/products/online~en~US~${t.o}`;
+ let j=null,st=null;
+ for(let a=0;a<4;a++){try{const r=await fetch(`${BASE}/products/v1/${name}`,{headers:H,signal:AbortSignal.timeout(45000)});st=r.status;j=await r.json();if(r.ok||r.status===404)break;await new Promise(z=>setTimeout(z,900*(a+1)));}catch(e){st=String(e).slice(0,60);await new Promise(z=>setTimeout(z,900*(a+1)));}}
+ if(st===404){rows.push({...t,present:false,measured:true});console.log(`ABSENT(404) ${t.o} ${t.t}`);continue;}
+ if(st!==200||!j){rows.push({...t,present:null,measured:false,_error:st});console.log(`NOT-MEASURED ${t.o} err=${st}`);continue;}
+ const ps=j.productStatus||{},at=j.productAttributes||{};
+ const ds=(ps.destinationStatuses||[]);
+ const disa=ds.filter(d=>(d.disapprovedCountries||[]).length>0).length;
+ const appr=ds.filter(d=>(d.approvedCountries||[]).length>0).length;
+ const iss=[...new Set((ps.itemLevelIssues||[]).map(i=>`${i.severity}|${i.code}`))];
+ rows.push({...t,present:true,measured:true,price:money(at.price),link:at.link,ctx_total:ds.length,ctx_approved:appr,ctx_disapproved:disa,issues:iss,lastUpdateDate:ps.lastUpdateDate,googleExpirationDate:ps.googleExpirationDate});
+ console.log(`PRESENT ${String(money(at.price)).padStart(8)} ${appr}appr/${disa}disa of ${ds.length} ${t.o} ${t.t}\n issues: ${iss.join(', ')||'(none)'}`);
+}
+fs.writeFileSync('/Users/macstudio3/Projects/gmc-titlefix/data/tk11449-close-verify-other10.json',
+ JSON.stringify({ticket:'TK-11449',read_only:true,fetched_at:new Date().toISOString(),n:rows.length,rows},null,1));
+const stillTob=rows.filter(r=>r.present&&(r.issues||[]).some(c=>/tobacco/.test(c)));
+const nm=rows.filter(r=>!r.measured);
+console.log(`\nabsent=${rows.filter(r=>r.present===false).length} present=${rows.filter(r=>r.present).length} still-tobacco=${stillTob.length} not-measured=${nm.length}`);
diff --git a/tk11449-close-verify.mjs b/tk11449-close-verify.mjs
new file mode 100644
index 0000000..72e05e7
--- /dev/null
+++ b/tk11449-close-verify.mjs
@@ -0,0 +1,85 @@
+#!/usr/bin/env node
+/**
+ * TK-11449 — READ-ONLY close-out verification. Merchant API v1 products.get, $0, no writes.
+ * Answers: (1) did the 6 tobacco appeals LAND? (2) do the 5 price fixes still hold?
+ * (3) is the 1 inert Pipa orphan still present? Offer ids read from FIRED PAYLOADS.
+ */
+import { createRequire } from 'module';
+const require = createRequire(import.meta.url);
+const { token, MERCHANT } = require('/Users/macstudio3/Projects/gmc-titlefix/_auth.js');
+import fs from 'fs';
+
+const TARGETS = [
+ // --- 6 tobacco appeal cohort (ids from data/tk11449-tobacco-attrs.json, the measured cohort) ---
+ { o:'44588462440499', grp:'tobacco', name:'Senigallia Greige', note:'appeal 1 — reported APPROVED 09-13' },
+ { o:'44587694358579', grp:'tobacco', name:'Varigotti Greige', note:'appeal fired 09-14 00:43Z' },
+ { o:'44588454772787', grp:'tobacco', name:'Cefalu Pewter', note:'appeal fired 09-14 00:43Z' },
+ { o:'44588462506035', grp:'tobacco', name:'Senigallia Fawn', note:'appeal fired 09-14 00:43Z' },
+ { o:'44588462637107', grp:'tobacco', name:'Senigallia Terracotta', note:'appeal fired 09-14 00:43Z' },
+ { o:'44588462571571', grp:'tobacco', name:'Senigallia Pewter', note:'appeal fired 09-14 00:43Z' },
+ // --- 5 price_mismatch (ids from ~/.claude/yolo-queue/tk11449-price-fix-*.json + postdedup measurement) ---
+ { o:'42630990135347', grp:'price', name:'Mayenne', expect:1335.60 },
+ { o:'42630996623411', grp:'price', name:'Maizan', expect:861.53 },
+ { o:'42630982795315', grp:'price', name:'Sufera', expect:826.88 },
+ { o:'42665240264755', grp:'price', name:'Batik', expect:4.25 },
+ { o:'shopify_US_4705839906867_32555898208307', grp:'price', name:'Glambeads', expect:4.25 },
+ // --- the 1 remaining inert orphan (DO NOT APPEAL) ---
+ { o:'43605859696691', grp:'orphan', name:'Pipa 12" Golden (inert orphan)', note:'expect PRESENT+DISAPPROVED, or ABSENT if expired' },
+];
+
+const BASE = 'https://merchantapi.googleapis.com';
+const money = m => (m && m.amountMicros != null) ? Number(m.amountMicros)/1e6 : null;
+
+(async () => {
+ const H = { Authorization: 'Bearer ' + (await token()) };
+ const rows = [];
+ for (const t of TARGETS) {
+ const name = `accounts/${MERCHANT}/products/online~en~US~${t.o}`;
+ let j=null, status=null;
+ for (let a=0;a<4;a++){
+ try {
+ const r = await fetch(`${BASE}/products/v1/${name}`, { headers:H, signal:AbortSignal.timeout(45000) });
+ status = r.status; j = await r.json();
+ if (r.ok || r.status === 404) break;
+ await new Promise(z=>setTimeout(z,900*(a+1)));
+ } catch(e){ status = String(e).slice(0,80); await new Promise(z=>setTimeout(z,900*(a+1))); }
+ }
+ if (status === 404) { rows.push({ ...t, present:false, measured:true }); process.stderr.write('x'); continue; }
+ if (status !== 200 || !j) { rows.push({ ...t, present:null, measured:false, _error:status }); process.stderr.write('?'); continue; }
+ const ps = j.productStatus || {}, at = j.productAttributes || {};
+ const ds = (ps.destinationStatuses||[]).map(d=>({
+ ctx:d.reportingContext,
+ appr:(d.approvedCountries||[]).length,
+ pend:(d.pendingCountries||[]).length,
+ disa:(d.disapprovedCountries||[]).length,
+ }));
+ rows.push({ ...t, present:true, measured:true,
+ title: at.title, price: money(at.price), link: at.link,
+ creationDate: ps.creationDate, lastUpdateDate: ps.lastUpdateDate,
+ googleExpirationDate: ps.googleExpirationDate,
+ issues: [...new Set((ps.itemLevelIssues||[]).map(i=>`${i.severity}|${i.code}`))],
+ ctx_total: ds.length,
+ ctx_disapproved: ds.filter(d=>d.disa>0).length,
+ ctx_approved: ds.filter(d=>d.appr>0).length,
+ ctx_pending: ds.filter(d=>d.pend>0).length,
+ destinationStatuses: ds,
+ });
+ process.stderr.write('.');
+ }
+ const out = { ticket:'TK-11449', read_only:true, cost:'$0 (Merchant API v1 reads)',
+ fetched_at:new Date().toISOString(), n:rows.length,
+ not_measured: rows.filter(r=>!r.measured).length, rows };
+ const P = '/Users/macstudio3/Projects/gmc-titlefix/data/tk11449-close-verify.json';
+ fs.writeFileSync(P, JSON.stringify(out,null,1));
+ console.error(`\nwrote ${P}`);
+
+ const fmt = r => {
+ if (!r.measured) return ` NOT-MEASURED ${r.name} (${r.o}) err=${r._error}`;
+ if (!r.present) return ` ABSENT(404) ${r.name} (${r.o})`;
+ return ` PRESENT ${String(r.price).padStart(9)} ctx ${r.ctx_approved}appr/${r.ctx_pending}pend/${r.ctx_disapproved}disa of ${r.ctx_total} ${r.name}\n issues: ${r.issues.join(', ')||'(none)'}\n lastUpdate=${r.lastUpdateDate} exp=${r.googleExpirationDate}`;
+ };
+ for (const g of ['tobacco','price','orphan']) {
+ console.log(`\n=== ${g.toUpperCase()} ===`);
+ rows.filter(r=>r.grp===g).forEach(r=>console.log(fmt(r)));
+ }
+})();
diff --git a/tk11449-pj-gmc-scope.mjs b/tk11449-pj-gmc-scope.mjs
new file mode 100644
index 0000000..315de65
--- /dev/null
+++ b/tk11449-pj-gmc-scope.mjs
@@ -0,0 +1,40 @@
+// READ-ONLY, $0: how many LIVE GMC offers belong to Phillip Jeffries (showroom-only)?
+// Full products.list walk; refuses to report on a truncated/incomplete walk.
+import { createRequire } from 'module';
+const require = createRequire(import.meta.url);
+const { token, MERCHANT } = require('/Users/macstudio3/Projects/gmc-titlefix/_auth.js');
+import fs from 'fs';
+const BASE='https://merchantapi.googleapis.com';
+const money=m=>(m&&m.amountMicros!=null)?Number(m.amountMicros)/1e6:null;
+const isPJ = s => /phillip\s*jeffries/i.test(s||'');
+let page='', total=0, pj=[], complete=false, pages=0;
+try{
+ do{
+ const H={Authorization:'Bearer '+(await token())};
+ const r=await fetch(`${BASE}/products/v1/accounts/${MERCHANT}/products?pageSize=250`+(page?`&pageToken=${encodeURIComponent(page)}`:''),{headers:H,signal:AbortSignal.timeout(90000)});
+ if(!r.ok){ throw new Error('HTTP '+r.status); }
+ const j=await r.json();
+ for(const p of (j.products||[])){
+ total++;
+ const a=p.productAttributes||{}, ps=p.productStatus||{};
+ if(isPJ(a.brand)||isPJ(a.title)||isPJ(a.productTypes&&a.productTypes.join(' '))){
+ const ds=ps.destinationStatuses||[];
+ pj.push({offerId:p.offerId,title:(a.title||'').slice(0,70),brand:a.brand,price:money(a.price),link:a.link,
+ ctx_approved:ds.filter(d=>(d.approvedCountries||[]).length>0).length,
+ ctx_disapproved:ds.filter(d=>(d.disapprovedCountries||[]).length>0).length,
+ ctx_total:ds.length,
+ issues:[...new Set((ps.itemLevelIssues||[]).map(i=>`${i.severity}|${i.code}`))]});
+ }
+ }
+ page=j.nextPageToken||''; pages++;
+ if(pages%40===0) process.stderr.write(` ${total}`);
+ } while(page);
+ complete=true;
+}catch(e){ console.error('WALK FAILED:',String(e).slice(0,120)); }
+const serving = pj.filter(o=>o.ctx_approved>0);
+const out={ticket:'TK-11449 spinoff',read_only:true,fetched_at:new Date().toISOString(),
+ walk_complete:complete,total_offers_walked:total,pj_offers:pj.length,pj_serving:serving.length,
+ pj_disapproved_only:pj.filter(o=>o.ctx_approved===0&&o.ctx_disapproved>0).length, rows:pj};
+fs.writeFileSync('/Users/macstudio3/Projects/gmc-titlefix/data/tk11449-pj-gmc-scope.json',JSON.stringify(out,null,1));
+console.log(`\nwalk_complete=${complete} total=${total} PJ_offers=${pj.length} PJ_SERVING=${serving.length} PJ_disapproved_only=${out.pj_disapproved_only}`);
+if(!complete) console.log('NOT-MEASURED: walk incomplete — do not treat counts as authoritative.');
diff --git a/tk11449-policy-locate.mjs b/tk11449-policy-locate.mjs
new file mode 100644
index 0000000..a5171b4
--- /dev/null
+++ b/tk11449-policy-locate.mjs
@@ -0,0 +1,35 @@
+// READ-ONLY, $0: LOCATE every offer account-wide carrying a policy-family issue.
+// Proves the account-wide aggregate counts (tobacco=1, illegal_drugs=1) map to known products.
+import { createRequire } from 'module';
+const require = createRequire(import.meta.url);
+const { token, MERCHANT } = require('/Users/macstudio3/Projects/gmc-titlefix/_auth.js');
+import fs from 'fs';
+const BASE='https://merchantapi.googleapis.com';
+const RE=/tobacco|illegal_drugs|alcohol|legal_restrictions|guns/;
+let page='',total=0,hits=[],complete=false,pages=0;
+try{
+ do{
+ const H={Authorization:'Bearer '+(await token())};
+ const r=await fetch(`${BASE}/products/v1/accounts/${MERCHANT}/products?pageSize=250`+(page?`&pageToken=${encodeURIComponent(page)}`:''),{headers:H,signal:AbortSignal.timeout(90000)});
+ if(!r.ok) throw new Error('HTTP '+r.status);
+ const j=await r.json();
+ for(const p of (j.products||[])){
+ total++;
+ const a=p.productAttributes||{},ps=p.productStatus||{};
+ const iss=[...new Set((ps.itemLevelIssues||[]).map(i=>`${i.severity}|${i.code}`))];
+ if(iss.some(c=>RE.test(c))){
+ const ds=ps.destinationStatuses||[];
+ hits.push({offerId:p.offerId,title:(a.title||'').slice(0,75),brand:a.brand,link:a.link,issues:iss,
+ ctx_approved:ds.filter(d=>(d.approvedCountries||[]).length>0).length,
+ ctx_disapproved:ds.filter(d=>(d.disapprovedCountries||[]).length>0).length,ctx_total:ds.length});
+ }
+ }
+ page=j.nextPageToken||''; pages++; if(pages%40===0) process.stderr.write(` ${total}`);
+ }while(page);
+ complete=true;
+}catch(e){ console.error('WALK FAILED:',String(e).slice(0,140)); }
+fs.writeFileSync('/Users/macstudio3/Projects/gmc-titlefix/data/tk11449-policy-locate.json',
+ JSON.stringify({ticket:'TK-11449',read_only:true,fetched_at:new Date().toISOString(),walk_complete:complete,total_offers_walked:total,n:hits.length,rows:hits},null,1));
+console.log(`\nwalk_complete=${complete} total=${total} policy_family_hits=${hits.length}`);
+hits.forEach(h=>console.log(` ${h.ctx_approved>0?'SERVING ':'disapproved'} ${h.offerId} ${h.issues.join(',')}\n ${h.title}`));
+if(!complete) console.log('NOT-MEASURED: walk incomplete.');
← 5a32a40 auto-data-snapshot: 2026-09-16T13:57:01 (3 data files) — dat
·
back to Gmc Titlefix
·
TK-11449: account-wide policy-family locate (61,992 offers) 19c2e6c →