[object Object]

← back to Dw Sku Integrity

TK-10896: fire-self-copy.sh — Steve-run guarded loop for the 18 self-copy vendors

976dd1f17e780ef797514a6332fdc3bba084c015 · 2026-08-31 01:25:37 -0700 · codex-10896

Files touched

Diff

commit 976dd1f17e780ef797514a6332fdc3bba084c015
Author: codex-10896 <steve@designerwallcoverings.com>
Date:   Mon Aug 31 01:25:37 2026 -0700

    TK-10896: fire-self-copy.sh — Steve-run guarded loop for the 18 self-copy vendors
---
 fire-self-copy.sh | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/fire-self-copy.sh b/fire-self-copy.sh
new file mode 100755
index 0000000..8006c0c
--- /dev/null
+++ b/fire-self-copy.sh
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+# TK-10896 — guarded fire loop for the 18 remaining canonical self-copy vendors.
+# GATED: this writes canonical Kamatera dw_unified.dw_sku. STEVE runs this himself.
+# Per vendor: preflight (must be GO) -> apply -> verify -> ledger. Canary-first
+# (smallest vendors first). Every write is idempotent (blank-guard), shopify_id-keyed,
+# recover-existing-code (no mint), reversible (apply-plans-canonical/<v>/undo.sql).
+set -uo pipefail
+cd ~/Projects/dw-sku-integrity
+export DWSKU_PSQL='ssh root@45.61.58.125 psql dw_unified'
+LEDGER=~/.claude/yolo-queue/executed-reversible/ledger.jsonl
+VENDORS=$(python3 -c "
+import json
+d=json.load(open('apply-plans-canonical/SUMMARY.json'))['per_vendor']
+print(' '.join(s for n,s in sorted((v['statements'],v['slug']) for v in d.values()) if s!='arte-international'))
+")
+printf '%-26s %-8s %5s %6s %-6s\n' VENDOR PREFLIGHT APPLY VERIFY RESULT
+for V in $VENDORS; do
+  PV=$(node preflight-check.mjs --plan-dir apply-plans-canonical --vendor "$V" 2>/dev/null | python3 -c "import sys,json;print(json.load(sys.stdin)['verdict'])")
+  if [ "$PV" != "GO" ]; then printf '%-26s %-8s %5s %6s %-6s\n' "${V:0:26}" "$PV" - - SKIP; continue; fi
+  AP=$(ssh root@45.61.58.125 "psql dw_unified" < "apply-plans-canonical/$V/apply.sql" 2>&1 | grep -c '^UPDATE')
+  VF=$(node preflight-check.mjs --plan-dir apply-plans-canonical --vendor "$V" --mode verify 2>/dev/null)
+  VV=$(echo "$VF" | python3 -c "import sys,json;print(json.load(sys.stdin)['verdict'])")
+  AT=$(echo "$VF" | python3 -c "import sys,json;print(json.load(sys.stdin)['ALREADY_TARGET'])")
+  TS=$(node -e "console.log(new Date().toISOString())")
+  printf '{"ts":"%s","agent":"steve-fired","ticket":"TK-10896","action":"self-copy canonical dw_sku %s (%s rows, no mint)","blast_radius":%s,"undo_cmd":"ssh root@45.61.58.125 \\"psql dw_unified\\" < ~/Projects/dw-sku-integrity/apply-plans-canonical/%s/undo.sql","verify":"mode=verify %s"}\n' "$TS" "$V" "$AT" "$AT" "$V" "$VV" >> "$LEDGER"
+  printf '%-26s %-8s %5s %6s %-6s\n' "${V:0:26}" "$PV" "$AP" "$VV" "$([ "$VV" = GO ] && echo DONE || echo CHECK)"
+done
+echo "--- done. undo any vendor: ssh root@45.61.58.125 \"psql dw_unified\" < apply-plans-canonical/<vendor>/undo.sql ---"

← 74251ab TK-10896: CANONICAL correction — mirror was stale, real back  ·  back to Dw Sku Integrity  ·  TK-10896: staging-link-gen + Carnegie 2,000 plan (preflight 5f639b2 →