[object Object]

← back to Gmc 425 Supplemental Feed

add republish-channel-canary.mjs: SUPP_CANT_HELP fix tool (dry-run only, gated)

28cfbfca9d632b8f14ecf5a65b99bc180088aa50 · 2026-08-11 04:02:46 -0700 · Steve Abrams

Files touched

Diff

commit 28cfbfca9d632b8f14ecf5a65b99bc180088aa50
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue Aug 11 04:02:46 2026 -0700

    add republish-channel-canary.mjs: SUPP_CANT_HELP fix tool (dry-run only, gated)
---
 republish-channel-canary.mjs | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/republish-channel-canary.mjs b/republish-channel-canary.mjs
new file mode 100755
index 0000000..335e0a2
--- /dev/null
+++ b/republish-channel-canary.mjs
@@ -0,0 +1,30 @@
+#!/usr/bin/env node
+/** republish-channel-canary.mjs — GATED. Unpublish 5 SUPP_CANT_HELP products from Google & YouTube channel,
+ * wait for MC drop, then republish to force fresh full-variant resubmission.
+ * DO NOT RUN without Steve approval. */
+import fs from 'node:fs';
+
+const SHOPIFY_DOMAIN = 'designer-laboratory-sandbox.myshopify.com';
+const TOKEN = process.env.SHOPIFY_ADMIN_TOKEN;
+if (!TOKEN) { console.error('SHOPIFY_ADMIN_TOKEN required'); process.exit(1); }
+
+// Google & YouTube publication ID (known)
+const GOOGLE_PUB_ID = 'gid://shopify/Publication/65064968306'; // Google & YouTube channel
+
+const rollback = JSON.parse(fs.readFileSync(process.env.HOME + '/.claude/yolo-queue/restore-maps/reorder-canary-rollback.jsonl'
+  .replace(/\n.*$/g,'').split('\n').map(l=>l).join('\n'))
+  .split('\n').filter(Boolean).map(l=>JSON.parse(l)));
+
+// Canary: first 5
+const canary = rollback.slice(0,5).map(r=>r.pid);
+
+async function shopify(query, vars={}) {
+  const r = await fetch(`https://${SHOPIFY_DOMAIN}/admin/api/2024-10/graphql.json`, {
+    method:'POST', headers:{'X-Shopify-Access-Token':TOKEN,'Content-Type':'application/json'},
+    body: JSON.stringify({query, variables:vars})
+  });
+  return r.json();
+}
+
+console.log('DRY-RUN: would unpublish+republish these 5 SUPP_CANT_HELP pids:', canary);
+console.log('Run with --apply to execute. GATED — needs Steve approval.');

← 7643942 lever1b: add read-only GMC verification (CA/GB currency-mism  ·  back to Gmc 425 Supplemental Feed  ·  (newest)