[object Object]

← back to Wallco Ai

geometric pilot: push 9 both-gates-clean designs live to wallco.ai

f03778e2ece8eb4976aa45c91167ab9cd79f1bbb · 2026-05-26 10:12:19 -0700 · Steve Abrams

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Files touched

Diff

commit f03778e2ece8eb4976aa45c91167ab9cd79f1bbb
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue May 26 10:12:19 2026 -0700

    geometric pilot: push 9 both-gates-clean designs live to wallco.ai
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---
 scripts/sync-geometric-9-to-prod.sh | 70 +++++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/scripts/sync-geometric-9-to-prod.sh b/scripts/sync-geometric-9-to-prod.sh
new file mode 100755
index 0000000..015e0dd
--- /dev/null
+++ b/scripts/sync-geometric-9-to-prod.sh
@@ -0,0 +1,70 @@
+#!/bin/zsh
+# One-off scoped push: the 9 both-gates-clean geometric-block-leaves designs
+# Mac2 → wallco.ai prod (Kamatera 45.61.58.125). Steve approved 2026-05-26
+# ("make live", scope = 9 both-gates-clean). Mirrors sync_drunk_animals_to_prod.sh
+# but scoped to an explicit id list, NOT the whole category — the other 29 geo
+# designs stay local (settlement-blocked or new-ghost-flagged).
+#
+# Safe: prod max id is 39286; these ids (50571-50586) are unoccupied on prod,
+# so the explicit-id INSERT cannot clobber an existing design. ON CONFLICT DO
+# UPDATE makes it idempotent. We do NOT setval the sequence (prod keeps issuing
+# from ~39287, no collision for the foreseeable future).
+set -e
+ROOT=/Users/stevestudio2/Projects/wallco-ai
+REMOTE=root@45.61.58.125
+REMOTE_DIR=/root/public-projects/wallco-ai
+IDS="50571,50572,50573,50578,50580,50581,50583,50585,50586"
+cd "$ROOT"
+
+echo "=== 1. Export 9 rows ==="
+psql dw_unified -c "\copy (
+  SELECT id, kind, width_in, height_in, panels, generator, prompt, seed,
+         dominant_hex, palette, local_path, category, is_published,
+         motifs, created_at
+  FROM spoon_all_designs
+  WHERE category='geometric-block-leaves' AND id IN ($IDS)
+  ORDER BY id
+) TO '/tmp/geo9.csv' WITH CSV HEADER"
+echo "  exported $(($(wc -l < /tmp/geo9.csv) - 1)) rows"
+
+echo "=== 2. PNG file list ==="
+psql dw_unified -At -c "SELECT local_path FROM spoon_all_designs WHERE category='geometric-block-leaves' AND id IN ($IDS)" \
+  | sed "s|$ROOT/||" > /tmp/geo9_files.txt
+echo "  $(wc -l < /tmp/geo9_files.txt) PNG paths"
+
+echo "=== 3. rsync the 9 PNGs to prod ==="
+rsync -az --files-from=/tmp/geo9_files.txt . $REMOTE:$REMOTE_DIR/
+
+echo "=== 4. scp CSV + rewrite local_path Mac2→Kamatera ==="
+scp /tmp/geo9.csv $REMOTE:/tmp/geo9.csv
+ssh $REMOTE "sed -i 's|$ROOT|$REMOTE_DIR|g' /tmp/geo9.csv"
+
+echo "=== 5. Import into prod PG (upsert on id) ==="
+ssh $REMOTE "sudo -u postgres psql dw_unified <<'EOS'
+CREATE TEMP TABLE geo9_in (
+  id int, kind text, width_in numeric, height_in numeric, panels int,
+  generator text, prompt text, seed bigint, dominant_hex text,
+  palette jsonb, local_path text, category text, is_published bool,
+  motifs text[], created_at timestamptz
+);
+\copy geo9_in FROM '/tmp/geo9.csv' WITH CSV HEADER;
+INSERT INTO spoon_all_designs
+  (id, kind, width_in, height_in, panels, generator, prompt, seed,
+   dominant_hex, palette, local_path, category, is_published, motifs, created_at)
+SELECT * FROM geo9_in
+ON CONFLICT (id) DO UPDATE SET
+  is_published=EXCLUDED.is_published, motifs=EXCLUDED.motifs,
+  dominant_hex=EXCLUDED.dominant_hex, palette=EXCLUDED.palette,
+  prompt=EXCLUDED.prompt, local_path=EXCLUDED.local_path;
+SELECT count(*) AS geo_on_prod, count(*) FILTER (WHERE is_published) AS published
+  FROM spoon_all_designs WHERE category='geometric-block-leaves';
+EOS"
+
+echo "=== 6. Refresh prod snapshot + hot-reload ==="
+ssh $REMOTE "cd $REMOTE_DIR && /usr/bin/python3 scripts/refresh_designs_snapshot.py && curl -sf -X POST http://127.0.0.1:9905/admin/reload-designs >/dev/null && echo reloaded"
+
+echo "=== 7. Smoke test ==="
+sleep 2
+curl -sf 'https://wallco.ai/api/designs/search?q=geometric-block-leaves&limit=3' | head -c 400
+echo ""
+echo "✓ 9 geometric-block-leaves designs pushed live to wallco.ai"

← 0626076 TODO: record fliepaper partial publish (1 PASS + 10 cabinet/  ·  back to Wallco Ai  ·  generator_tick: restrict tile categories to tone-on-tone pal b026705 →