← back to Norma Platform
ig(TK-10573): GATE2 fan-out — split 85 originals into 10 batch tickets + iTerm2 delete windows
acd40043d90b85cc3235ba6a5e2ef68b53bc036a · 2026-08-17 06:32:10 -0700 · Steve Abrams
Files touched
A agents/instagram-agent/gen-delete-batches.js
Diff
commit acd40043d90b85cc3235ba6a5e2ef68b53bc036a
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Aug 17 06:32:10 2026 -0700
ig(TK-10573): GATE2 fan-out — split 85 originals into 10 batch tickets + iTerm2 delete windows
---
agents/instagram-agent/gen-delete-batches.js | 67 ++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/agents/instagram-agent/gen-delete-batches.js b/agents/instagram-agent/gen-delete-batches.js
new file mode 100644
index 0000000..bcfedb2
--- /dev/null
+++ b/agents/instagram-agent/gen-delete-batches.js
@@ -0,0 +1,67 @@
+const fs=require('fs'),path=require('path');
+const D=path.join(process.cwd(),'data');
+const res=fs.readFileSync(path.join(D,'redo-results-20260814.jsonl'),'utf8').trim().split('\n').map(l=>JSON.parse(l));
+const byHandle={}; res.forEach(r=>{(byHandle[r.handle]=byHandle[r.handle]||[]).push(r);});
+// archived orphan (no replacement) — manual delete only
+const ORPHAN={handle:'goldleafwallpaper',old_permalink:'https://www.instagram.com/p/Db8lVFUG7q8/',new_permalink:null,orphan:true};
+
+const BATCHES=[
+ {n:'01',tk:'TK-10609',handles:['asseeninhotels','commercialwallcoverings']},
+ {n:'02',tk:'TK-10610',handles:['designerlaboratory','designerwallcoverings']},
+ {n:'03',tk:'TK-10611',handles:['fabric_fridays','goldleafwallpaper'],orphans:[ORPHAN]},
+ {n:'04',tk:'TK-10612',handles:['grassclothwallpaper','hollywoodwallcoverings']},
+ {n:'05',tk:'TK-10613',handles:['linenwallpaper','metallicwallpaper']},
+ {n:'06',tk:'TK-10614',handles:['philliperomanodesigns','screenprintedwallpaper']},
+ {n:'07',tk:'TK-10615',handles:['suedewallpaper','textilewallpaper']},
+ {n:'08',tk:'TK-10616',handles:['velvetwallpaper','wallpaperhistory']},
+ {n:'09',tk:'TK-10617',handles:['ffepurchasing','restorationwallpaper','roomsettings','retrowalls']},
+ {n:'10',tk:'TK-10618',handles:['wallpaperinstallers','wallpaperwednesdays','borninbeverlyhills','patterndesignlab','beverlyhillsvideos']},
+];
+
+let total=0;
+for(const b of BATCHES){
+ let lines=[]; let count=0;
+ for(const h of b.handles){
+ const rows=byHandle[h]||[];
+ lines.push(`\n### @${h} — ${rows.length} post(s)`);
+ rows.forEach(r=>{count++; lines.push(`- OLD ${r.old_permalink} → NEW ${r.new_permalink||'(none)'}`);});
+ }
+ if(b.orphans){for(const o of b.orphans){lines.push(`\n### @${o.handle} — 1 ARCHIVED ORPHAN (no replacement — 404 product)`);lines.push(`- OLD ${o.old_permalink} → NEW (none) — DELETE MANUALLY via public/delete-viewer.html (delete-originals.js won't map it)`);count++;}}
+ total+=count;
+ const only=b.handles.map(h=>` node delete-originals.js --only ${h} # probe (read-only)`).join('\n');
+ const md=`# IG GATE-2 deletion — Batch ${b.n}/10 (${b.tk})
+
+Parent: TK-10573 — "Fix + redo last 5 days DW IG posts". The corrected reposts are LIVE;
+these OLD bad-caption originals are now safe to remove. **This batch owns ${count} post(s)** across
+${b.handles.length} account(s): ${b.handles.map(h=>'@'+h).join(', ')}.
+
+## ⚠️ READ FIRST — shared browser + ban vector
+- Deletion runs through **ONE** openclaw REAL Chrome that Steve is logged into — the SAME browser
+ all 10 windows share. **Do NOT run \`--go\` at the same time as another batch window.** Concurrent
+ browser deletes are Meta's #1 fleet-ban trigger (could nuke the 35-account fleet + the token).
+- \`delete-originals.js\` already paces 60s between deletes and verifies each. Keep that pacing.
+- Deletion is **destructive + customer-facing = Steve-gated.** Do the read-only PROBE now; then
+ STOP and post your findings to ${b.tk}. Only run \`--go\` when Steve gives the explicit go for
+ THIS window AND no other batch window is mid-delete.
+
+## Your ${count} target post(s)
+${lines.join('\n')}
+
+## Procedure
+1. \`export TK_AGENT=dw-instagram && tk take ${b.tk}\` ; \`tk inbox\` (act on DMs).
+2. **PROBE (safe, non-destructive)** — confirm you're logged in as each owning account & the Delete
+ affordance is reachable:
+${only}
+3. \`tk log ${b.tk} "probe: <handle> N/N deletable | not-owner: ..."\` for each account.
+4. **HOLD.** Report probe results on ${b.tk}. Do NOT delete yet.
+5. When Steve says go (and it's THIS window's turn — one window deletes at a time):
+${b.handles.map(h=>` node delete-originals.js --only ${h} --go # DESTRUCTIVE, paced 60s, verified`).join('\n')}
+ (Optional first: \`--canary --only <handle>\` deletes exactly ONE, verifies, stops.)
+${b.orphans?`6. Manually delete the archived orphan(s) via public/delete-viewer.html (not script-mappable).\n`:''}7. \`tk log ${b.tk} "deleted X/${count}, verified"\` ; \`tk done ${b.tk}\` when the batch is clear.
+
+Cost: openclaw browser automation = $0 (local, free). Graph API = $0.
+`;
+ fs.writeFileSync(path.join(D,'delete-batches',`batch-${b.n}.md`),md);
+ console.log(`batch-${b.n}.md ${b.tk} ${count} posts [${b.handles.join(', ')}]`);
+}
+console.log('TOTAL posts across batches:',total);
← ca8370c auto-data-snapshot: 2026-08-16T09:54:36 (1 data files) — age
·
back to Norma Platform
·
docs(sessions): resume — outage recovery, pm2 reconcile (TK- 06c151b →