[object Object]

← back to Wallco Ai

scripts: bump dead admin-reload port 9792 → 9878 across 18 batch scripts

11887e56286960478a62deb8a7ce0073778090e6 · 2026-05-26 09:26:23 -0700 · Steve Abrams

server.js now listens on 9878 (pm2 env), so every batch/tick script's
silent POST /admin/reload-designs to 9792 was 404ing. The in-memory
catalog was missing 2,348 freshly-generated designs until the next
process restart. Bumping the hardcoded port (and env-var defaults in
marketplace-watcher/rerender-rooms-debug) restores live reload across
drunk_animals, stoned_animals, cherry_blossoms, mural_*, imperial_garden,
publish-*, da4-preview, and generate-butterfly-trellis batches.

Files touched

Diff

commit 11887e56286960478a62deb8a7ce0073778090e6
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue May 26 09:26:23 2026 -0700

    scripts: bump dead admin-reload port 9792 → 9878 across 18 batch scripts
    
    server.js now listens on 9878 (pm2 env), so every batch/tick script's
    silent POST /admin/reload-designs to 9792 was 404ing. The in-memory
    catalog was missing 2,348 freshly-generated designs until the next
    process restart. Bumping the hardcoded port (and env-var defaults in
    marketplace-watcher/rerender-rooms-debug) restores live reload across
    drunk_animals, stoned_animals, cherry_blossoms, mural_*, imperial_garden,
    publish-*, da4-preview, and generate-butterfly-trellis batches.
---
 scripts/build-cull-viewer.js                 | 2 +-
 scripts/cherry_blossoms_batch.js             | 2 +-
 scripts/da4-preview-batch.js                 | 4 ++--
 scripts/drunk_animals_batch.js               | 2 +-
 scripts/drunk_animals_tick.js                | 2 +-
 scripts/drunk_monkeys_birds_subdued_batch.js | 2 +-
 scripts/generate-butterfly-trellis-batch.js  | 2 +-
 scripts/imperial_garden_colorways_batch.js   | 4 ++--
 scripts/marketplace-watcher.js               | 2 +-
 scripts/mural_animals_batch.js               | 2 +-
 scripts/mural_scenic_batch.js                | 2 +-
 scripts/publish-cactus.js                    | 4 ++--
 scripts/publish-geometric-block-leaves.js    | 4 ++--
 scripts/rerender-rooms-debug.js              | 2 +-
 scripts/stoned_animals_batch.js              | 2 +-
 scripts/stoned_animals_tick.js               | 2 +-
 scripts/test_drunk_animals.sh                | 4 ++--
 server.js                                    | 4 ++--
 18 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/scripts/build-cull-viewer.js b/scripts/build-cull-viewer.js
index fc7a6e9..6ea5d57 100644
--- a/scripts/build-cull-viewer.js
+++ b/scripts/build-cull-viewer.js
@@ -4,7 +4,7 @@
 //
 // Output: data/fuzzy-cull-viewer.html (open with `open <path>`)
 // Images referenced via /designs/img/<file>.png (works when wallco-ai Mac2 is
-// up at localhost:9792) AND via file://… fallback (works without a server).
+// up at localhost:9878) AND via file://… fallback (works without a server).
 
 "use strict";
 const fs = require("fs");
diff --git a/scripts/cherry_blossoms_batch.js b/scripts/cherry_blossoms_batch.js
index 5200826..717cd87 100644
--- a/scripts/cherry_blossoms_batch.js
+++ b/scripts/cherry_blossoms_batch.js
@@ -35,7 +35,7 @@ console.log(`\n=== Batch done: ${ok} ok, ${fail} failed ===`);
 
 spawnSync('python3', [path.join(ROOT, 'scripts', 'refresh_designs_snapshot.py')],
           { stdio: 'inherit', cwd: ROOT, timeout: 180_000 });
-spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9792/admin/reload-designs'],
+spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9878/admin/reload-designs'],
           { stdio: 'inherit', cwd: ROOT, timeout: 10_000 });
 
 process.exit(fail === 0 ? 0 : 1);
diff --git a/scripts/da4-preview-batch.js b/scripts/da4-preview-batch.js
index c002279..0df846f 100644
--- a/scripts/da4-preview-batch.js
+++ b/scripts/da4-preview-batch.js
@@ -101,8 +101,8 @@ for (let i = 0; i < batch.length; i++) {
     new_design_id: newId,
     elapsed_sec: parseFloat(elapsedSec),
     exit_status: r.status,
-    view_url: newId ? `http://127.0.0.1:9792/design/${newId}` : null,
-    image_url: newId ? `http://127.0.0.1:9792/designs/img/by-id/${newId}` : null,
+    view_url: newId ? `http://127.0.0.1:9878/design/${newId}` : null,
+    image_url: newId ? `http://127.0.0.1:9878/designs/img/by-id/${newId}` : null,
     prompt_head: prompt.slice(0, 200),
   });
 
diff --git a/scripts/drunk_animals_batch.js b/scripts/drunk_animals_batch.js
index c107d64..99c6a7e 100644
--- a/scripts/drunk_animals_batch.js
+++ b/scripts/drunk_animals_batch.js
@@ -51,7 +51,7 @@ console.log(`\n=== Batch done: ${ok} ok, ${fail} failed, ${skipped} settlement-s
 // grid so the new batch shows on wallco.ai immediately.
 spawnSync('python3', [path.join(ROOT, 'scripts', 'refresh_designs_snapshot.py')],
           { stdio: 'inherit', cwd: ROOT, timeout: 120_000 });
-spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9792/admin/reload-designs'],
+spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9878/admin/reload-designs'],
           { stdio: 'inherit', cwd: ROOT, timeout: 10_000 });
 
 process.exit(fail === 0 ? 0 : 1);
diff --git a/scripts/drunk_animals_tick.js b/scripts/drunk_animals_tick.js
index 35d75c8..d0b2ee1 100644
--- a/scripts/drunk_animals_tick.js
+++ b/scripts/drunk_animals_tick.js
@@ -154,7 +154,7 @@ if (r.status === 0) {
 // live server picks up the new row in its in-memory grid.
 spawnSync('python3', [path.join(ROOT, 'scripts', 'refresh_designs_snapshot.py')],
           { stdio: 'inherit', cwd: ROOT, timeout: 60_000 });
-spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9792/admin/reload-designs'],
+spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9878/admin/reload-designs'],
           { stdio: 'inherit', cwd: ROOT, timeout: 10_000 });
 
 process.exit(r.status || 0);
diff --git a/scripts/drunk_monkeys_birds_subdued_batch.js b/scripts/drunk_monkeys_birds_subdued_batch.js
index 06ffafa..62fcea0 100644
--- a/scripts/drunk_monkeys_birds_subdued_batch.js
+++ b/scripts/drunk_monkeys_birds_subdued_batch.js
@@ -67,6 +67,6 @@ L('refreshing designs.json snapshot…');
 spawnSync('python3', [path.join(ROOT, 'scripts', 'refresh_designs_snapshot.py')],
           { stdio: 'inherit', cwd: ROOT, timeout: 180_000 });
 L('hot-reloading wallco-ai server (local + remote if reachable)…');
-spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9792/admin/reload-designs'], { stdio: 'inherit', timeout: 10_000 });
+spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9878/admin/reload-designs'], { stdio: 'inherit', timeout: 10_000 });
 
 process.exit(fail === 0 ? 0 : (ok > 0 ? 0 : 1));
diff --git a/scripts/generate-butterfly-trellis-batch.js b/scripts/generate-butterfly-trellis-batch.js
index 39176b3..1726b71 100644
--- a/scripts/generate-butterfly-trellis-batch.js
+++ b/scripts/generate-butterfly-trellis-batch.js
@@ -163,6 +163,6 @@ print(json.dumps(palette))
   console.log(`\nDone. ${results.length}/${VARIATIONS.length} succeeded.`);
   if (results.length) {
     console.log('\nNew design ids:', results.map(r => r.id).join(', '));
-    console.log('Live at: http://localhost:9792/designs?cat=butterfly-trellis (admin) or refresh /designs');
+    console.log('Live at: http://localhost:9878/designs?cat=butterfly-trellis (admin) or refresh /designs');
   }
 })();
diff --git a/scripts/imperial_garden_colorways_batch.js b/scripts/imperial_garden_colorways_batch.js
index 2399bda..7d26015 100644
--- a/scripts/imperial_garden_colorways_batch.js
+++ b/scripts/imperial_garden_colorways_batch.js
@@ -282,13 +282,13 @@ print(json.dumps(palette))
   console.log(`\nDone. ${all.length}/100 succeeded.`);
   if (all.length) {
     console.log(`\nNew design ids: ${all.map(r => r.id).join(', ')}`);
-    console.log(`Review at: http://localhost:9792/designs?cat=colorways-imperial-garden-barone`);
+    console.log(`Review at: http://localhost:9878/designs?cat=colorways-imperial-garden-barone`);
   }
 
   // Refresh + reload
   spawnSync('python3', [path.join(__dirname, 'refresh_designs_snapshot.py')],
             { stdio: 'inherit', cwd: path.join(__dirname, '..'), timeout: 180_000 });
-  spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9792/admin/reload-designs'],
+  spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9878/admin/reload-designs'],
             { stdio: 'inherit', timeout: 10_000 });
 
   process.exit(all.length === 100 ? 0 : 1);
diff --git a/scripts/marketplace-watcher.js b/scripts/marketplace-watcher.js
index 5f9f088..4f3bdcc 100644
--- a/scripts/marketplace-watcher.js
+++ b/scripts/marketplace-watcher.js
@@ -21,7 +21,7 @@ const LOG_PATH  = path.join(OUT_DIR, 'status-watch.jsonl');
 const EVENTS_PATH = path.join(OUT_DIR, 'events.jsonl');
 
 const HOST = process.env.WALLCO_HOST || '127.0.0.1';
-const PORT = Number(process.env.WALLCO_PORT || 9792);
+const PORT = Number(process.env.WALLCO_PORT || 9878);
 
 function getStatus() {
   return new Promise((resolve, reject) => {
diff --git a/scripts/mural_animals_batch.js b/scripts/mural_animals_batch.js
index bb4ed08..fe3dc2d 100644
--- a/scripts/mural_animals_batch.js
+++ b/scripts/mural_animals_batch.js
@@ -35,7 +35,7 @@ console.log(`\n=== Batch done: ${ok} ok, ${fail} failed ===`);
 
 spawnSync('python3', [path.join(ROOT, 'scripts', 'refresh_designs_snapshot.py')],
           { stdio: 'inherit', cwd: ROOT, timeout: 180_000 });
-spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9792/admin/reload-designs'],
+spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9878/admin/reload-designs'],
           { stdio: 'inherit', cwd: ROOT, timeout: 10_000 });
 
 process.exit(fail === 0 ? 0 : 1);
diff --git a/scripts/mural_scenic_batch.js b/scripts/mural_scenic_batch.js
index 08d3aac..02a3d9b 100644
--- a/scripts/mural_scenic_batch.js
+++ b/scripts/mural_scenic_batch.js
@@ -54,7 +54,7 @@ console.log(`\n=== Batch done: ${ok} ok, ${fail} failed ===`);
 
 spawnSync('python3', [path.join(ROOT, 'scripts', 'refresh_designs_snapshot.py')],
           { stdio: 'inherit', cwd: ROOT, timeout: 180_000 });
-spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9792/admin/reload-designs'],
+spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9878/admin/reload-designs'],
           { stdio: 'inherit', cwd: ROOT, timeout: 10_000 });
 
 process.exit(fail === 0 ? 0 : 1);
diff --git a/scripts/publish-cactus.js b/scripts/publish-cactus.js
index baa8308..df216de 100755
--- a/scripts/publish-cactus.js
+++ b/scripts/publish-cactus.js
@@ -28,9 +28,9 @@ console.log('designs.json now has ' + allRows.length + ' rows');
 
 console.log('Hot-reloading wallco-ai DESIGNS cache…');
 try {
-  execSync('curl -s -X POST http://localhost:9792/admin/reload-designs --max-time 3', { encoding: 'utf8', stdio: 'inherit' });
+  execSync('curl -s -X POST http://localhost:9878/admin/reload-designs --max-time 3', { encoding: 'utf8', stdio: 'inherit' });
 } catch (e) {
   console.error('reload failed (server may be down): ' + e.message);
 }
 
-console.log('\nDone. Verify at http://localhost:9792/designs?cat=cactus');
+console.log('\nDone. Verify at http://localhost:9878/designs?cat=cactus');
diff --git a/scripts/publish-geometric-block-leaves.js b/scripts/publish-geometric-block-leaves.js
index 4a24245..dad78a7 100755
--- a/scripts/publish-geometric-block-leaves.js
+++ b/scripts/publish-geometric-block-leaves.js
@@ -30,9 +30,9 @@ console.log('designs.json now has ' + allRows.length + ' rows');
 // Hot reload
 console.log('Hot-reloading wallco-ai DESIGNS cache…');
 try {
-  execSync('curl -s -X POST http://localhost:9792/admin/reload-designs', { encoding: 'utf8', stdio: 'inherit' });
+  execSync('curl -s -X POST http://localhost:9878/admin/reload-designs', { encoding: 'utf8', stdio: 'inherit' });
 } catch (e) {
   console.error('reload failed: ' + e.message);
 }
 
-console.log('\nDone. Verify at http://localhost:9792/designs?cat=geometric-block-leaves');
+console.log('\nDone. Verify at http://localhost:9878/designs?cat=geometric-block-leaves');
diff --git a/scripts/rerender-rooms-debug.js b/scripts/rerender-rooms-debug.js
index 39c6ecb..7deebba 100644
--- a/scripts/rerender-rooms-debug.js
+++ b/scripts/rerender-rooms-debug.js
@@ -26,7 +26,7 @@ const arg = (k, d) => { const i = args.indexOf(k); return i >= 0 ? args[i+1] : d
 const FIX_DESIGN_ID = arg('--design-id', null);
 const PARALLELISM = parseInt(arg('--parallelism', '3'), 10);
 const DRY_RUN = args.includes('--dry-run');
-const SERVER_URL = process.env.WALLCO_URL || 'http://127.0.0.1:9792';
+const SERVER_URL = process.env.WALLCO_URL || 'http://127.0.0.1:9878';
 
 async function rerenderRoom(designId, roomType) {
   const r = await fetch(`${SERVER_URL}/api/room`, {
diff --git a/scripts/stoned_animals_batch.js b/scripts/stoned_animals_batch.js
index d1c2426..91bef83 100644
--- a/scripts/stoned_animals_batch.js
+++ b/scripts/stoned_animals_batch.js
@@ -34,7 +34,7 @@ console.log(`\n=== Batch done: ${ok} ok, ${fail} failed ===`);
 
 spawnSync('python3', [path.join(ROOT, 'scripts', 'refresh_designs_snapshot.py')],
           { stdio: 'inherit', cwd: ROOT, timeout: 120_000 });
-spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9792/admin/reload-designs'],
+spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9878/admin/reload-designs'],
           { stdio: 'inherit', cwd: ROOT, timeout: 10_000 });
 
 process.exit(fail === 0 ? 0 : 1);
diff --git a/scripts/stoned_animals_tick.js b/scripts/stoned_animals_tick.js
index a791f13..dd59b6f 100644
--- a/scripts/stoned_animals_tick.js
+++ b/scripts/stoned_animals_tick.js
@@ -69,7 +69,7 @@ const r = spawnSync('node', [
 
 spawnSync('python3', [path.join(ROOT, 'scripts', 'refresh_designs_snapshot.py')],
           { stdio: 'inherit', cwd: ROOT, timeout: 60_000 });
-spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9792/admin/reload-designs'],
+spawnSync('curl', ['-sf', '-m', '5', '-X', 'POST', 'http://127.0.0.1:9878/admin/reload-designs'],
           { stdio: 'inherit', cwd: ROOT, timeout: 10_000 });
 
 process.exit(r.status || 0);
diff --git a/scripts/test_drunk_animals.sh b/scripts/test_drunk_animals.sh
index 9267cad..fbd5946 100755
--- a/scripts/test_drunk_animals.sh
+++ b/scripts/test_drunk_animals.sh
@@ -2,7 +2,7 @@
 # End-to-end smoke test for the drunk-animals overnight pipeline.
 # Validates every endpoint + page + DB state I touched tonight.
 
-BASE=http://127.0.0.1:9792
+BASE=http://127.0.0.1:9878
 PSQL=/opt/homebrew/opt/postgresql@14/bin/psql
 PASS=0
 FAIL=0
@@ -29,7 +29,7 @@ check "pm2 daemon online" $([[ $pm2_state == "1" ]] && echo PASS || echo "daemon
 
 # 2. wallco-ai server responding
 http=$(curl -s -o /dev/null -w "%{http_code}" -m 3 $BASE/health)
-check "wallco-ai :9792 health" $([[ $http == "200" ]] && echo PASS || echo "http $http")
+check "wallco-ai :9878 health" $([[ $http == "200" ]] && echo PASS || echo "http $http")
 
 # 3. PG row count
 pg_count=$($PSQL dw_unified -At -c "SELECT count(*) FROM spoon_all_designs WHERE category='drunk-animals';" 2>&1)
diff --git a/server.js b/server.js
index 174ee8a..525a950 100644
--- a/server.js
+++ b/server.js
@@ -349,7 +349,7 @@ function _lev(a, b, cap) {
 
 // ── Same-origin proxy for the Design Coordinate UI block. The upstream
 // pairs.designerwallcoverings.com returns valid JSON but its prod CORS
-// allowlist doesn't include 127.0.0.1:9792 / localhost, so browsers
+// allowlist doesn't include 127.0.0.1:9878 / localhost, so browsers
 // silently fall into the .catch() ("Could not load coordinates right
 // now."). Proxy through wallco-ai so the call is same-origin.
 const PAIRS_UPSTREAM = process.env.PAIRS_UPSTREAM || 'https://pairs.designerwallcoverings.com';
@@ -2353,7 +2353,7 @@ app.post('/api/trade/login', (req, res) => {
     console.error('[trade-login] upsert failed:', e.message);
     return res.status(500).json({ ok: false, error: 'Could not generate sign-in link.' });
   }
-  // Build link from request host so dev (localhost:9792) + prod (wallco.ai) both work.
+  // Build link from request host so dev (localhost:9878) + prod (wallco.ai) both work.
   const proto = (req.headers['x-forwarded-proto'] || req.protocol || 'http').split(',')[0].trim();
   const host = req.headers['x-forwarded-host'] || req.get('host');
   const magicLink = `${proto}://${host}/trade/auth?token=${token}&return=${encodeURIComponent(returnTo)}`;

← d2291bc Fix 3: inject SeamlessTile node into workflow for tile categ  ·  back to Wallco Ai  ·  Fix 3 v2: add MakeCircularVAE — UNet-only patch left VAE re- c89f613 →