← back to Wallco Ai
fliepaper-bugs: scrub category-leak in generator + YOLO loop wrapper
6e609a5fcf1b4551bb9266740a57448960248b8c · 2026-05-26 07:50:10 -0700 · Steve Abrams
The 2026-05-20 'Never show FLIEPAPER word on any image' cleanup retroactively
renamed category fliepaper-bugs → designer-bugs on 43 existing rows in
spoon_all_designs, but the GENERATOR script (fliepaper_bugs_tick.js) was
missed — any new tick would have regressed the cleanup.
Customer-facing writes now use 'designer-bugs':
- category column
- tags array (the 'fliepaper-bugs' tag dropped)
- title prefix ('Designer Bugs · ...' was 'Fliepaper Bugs · ...')
- request_text
- served PNG filename (image_url path is public)
Internal-only identifiers keep 'fliepaper-bugs':
- fliepaper_bugs_cells table name + collection_slug
- canonical disk path data/fliepaper-bugs/<pattern>/<colorway>.png
New scripts/fliepaper_bugs_loop.sh — keep calling the single-tick generator
until all PENDING cells are drained (N=6 cells/tick, 15-tick cap, halt
sentinel /tmp/halt-fliepaper-loop). Used to remake the full 6×6=36 collection
in one autonomous overnight pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Files touched
A scripts/fliepaper_bugs_loop.shM scripts/fliepaper_bugs_tick.js
Diff
commit 6e609a5fcf1b4551bb9266740a57448960248b8c
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue May 26 07:50:10 2026 -0700
fliepaper-bugs: scrub category-leak in generator + YOLO loop wrapper
The 2026-05-20 'Never show FLIEPAPER word on any image' cleanup retroactively
renamed category fliepaper-bugs → designer-bugs on 43 existing rows in
spoon_all_designs, but the GENERATOR script (fliepaper_bugs_tick.js) was
missed — any new tick would have regressed the cleanup.
Customer-facing writes now use 'designer-bugs':
- category column
- tags array (the 'fliepaper-bugs' tag dropped)
- title prefix ('Designer Bugs · ...' was 'Fliepaper Bugs · ...')
- request_text
- served PNG filename (image_url path is public)
Internal-only identifiers keep 'fliepaper-bugs':
- fliepaper_bugs_cells table name + collection_slug
- canonical disk path data/fliepaper-bugs/<pattern>/<colorway>.png
New scripts/fliepaper_bugs_loop.sh — keep calling the single-tick generator
until all PENDING cells are drained (N=6 cells/tick, 15-tick cap, halt
sentinel /tmp/halt-fliepaper-loop). Used to remake the full 6×6=36 collection
in one autonomous overnight pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---
scripts/fliepaper_bugs_loop.sh | 48 ++++++++++++++++++++++++++++++++++++++++++
scripts/fliepaper_bugs_tick.js | 12 ++++++-----
2 files changed, 55 insertions(+), 5 deletions(-)
diff --git a/scripts/fliepaper_bugs_loop.sh b/scripts/fliepaper_bugs_loop.sh
new file mode 100755
index 0000000..ff9ec64
--- /dev/null
+++ b/scripts/fliepaper_bugs_loop.sh
@@ -0,0 +1,48 @@
+#!/usr/bin/env bash
+# fliepaper-bugs YOLO loop — keep calling the single-tick generator until all
+# PENDING cells are drained, then exit. Each tick generates up to N=6 cells
+# (N=8 = the script's hard cap), then we sleep briefly between ticks.
+#
+# Usage:
+# bash scripts/fliepaper_bugs_loop.sh # foreground
+# nohup bash scripts/fliepaper_bugs_loop.sh > /tmp/fliepaper-loop.log 2>&1 &
+#
+# Stop early: touch /tmp/halt-fliepaper-loop
+
+set -u
+ROOT="$(cd "$(dirname "$0")/.." && pwd)"
+cd "$ROOT"
+
+PER_TICK="${PER_TICK:-6}"
+HALT_FILE="${HALT_FILE:-/tmp/halt-fliepaper-loop}"
+MAX_TICKS="${MAX_TICKS:-15}"
+
+count_pending() {
+ psql -d dw_unified -At -c \
+ "SELECT count(*) FROM fliepaper_bugs_cells WHERE collection_slug='fliepaper-bugs' AND status='PENDING';" \
+ 2>/dev/null | head -1
+}
+
+echo "[$(date +%H:%M:%S)] fliepaper-bugs loop start — per-tick=$PER_TICK halt=$HALT_FILE"
+
+for t in $(seq 1 "$MAX_TICKS"); do
+ if [ -f "$HALT_FILE" ]; then
+ echo "[$(date +%H:%M:%S)] halt file present — stopping"
+ break
+ fi
+ pending="$(count_pending)"
+ echo "[$(date +%H:%M:%S)] tick $t/$MAX_TICKS — pending=$pending"
+ if [ "$pending" = "0" ]; then
+ echo "[$(date +%H:%M:%S)] all cells GENERATED — exiting clean"
+ break
+ fi
+ node scripts/fliepaper_bugs_tick.js "$PER_TICK" 2>&1 | sed "s/^/ /"
+ rc=$?
+ if [ $rc -ne 0 ]; then
+ echo "[$(date +%H:%M:%S)] tick $t exit code $rc — continuing (next pass will retry)"
+ fi
+ sleep 3
+done
+
+pending="$(count_pending)"
+echo "[$(date +%H:%M:%S)] loop done — pending=$pending"
diff --git a/scripts/fliepaper_bugs_tick.js b/scripts/fliepaper_bugs_tick.js
index 3760767..a1f6c8a 100644
--- a/scripts/fliepaper_bugs_tick.js
+++ b/scripts/fliepaper_bugs_tick.js
@@ -142,7 +142,9 @@ async function generateOne(cell) {
const buf = Buffer.from(data, 'base64');
fs.writeFileSync(canonicalPath, buf);
- const servedFilename = `fliepaper-bugs_${pattern.slug}_${colorway.slug}.png`;
+ // Customer-facing filename uses scrubbed prefix (designer-bugs) per the
+ // 2026-05-20 "Never show FLIEPAPER word on any image" directive.
+ const servedFilename = `designer-bugs_${pattern.slug}_${colorway.slug}.png`;
const servedPath = path.join(IMG_DIR, servedFilename);
fs.writeFileSync(servedPath, buf);
@@ -167,11 +169,11 @@ print(json.dumps(palette))
// ── Insert spoon_all_designs row (is_published=false; Steve reviews/pushes) ──
const seed = crypto.randomInt(1, 2 ** 31 - 1);
- const title = `Fliepaper Bugs · ${pattern.name} · ${colorway.name}`;
+ const title = `Designer Bugs · ${pattern.name} · ${colorway.name}`;
const promptDesc = (title + ' — ' + fullPrompt).slice(0, 1800);
const palJsonSql = "'" + JSON.stringify(palette).replace(/'/g, "''") + "'::jsonb";
const tags = [
- 'fliepaper-bugs', pattern.slug, colorway.slug, pattern.bug,
+ 'designer-bugs', pattern.slug, colorway.slug, pattern.bug,
'gucci-coord', 'owned-by-steve', 'designer-wallcoverings', colorway.role,
];
const tagSql = 'ARRAY[' + tags.map(t => esc(t)).join(',') + ']::text[]';
@@ -185,10 +187,10 @@ print(json.dumps(palette))
${dominant ? "'" + dominant + "'" : 'NULL'},
${palJsonSql},
${esc(servedPath)}, ${esc('/designs/img/' + servedFilename)},
- 'fliepaper-bugs',
+ 'designer-bugs',
${motifsSql},
${tagSql},
- FALSE, ${esc(`fliepaper-bugs ${pattern.slug} × ${colorway.slug}`)})
+ FALSE, ${esc(`designer-bugs ${pattern.slug} × ${colorway.slug}`)})
RETURNING id;`;
const designId = parseInt(psql(insertSql), 10);
if (!Number.isFinite(designId)) throw new Error('spoon_all_designs insert returned no id');
← 57869a4 edges-agent: unpublish 11,274 seam-defect designs + admin re
·
back to Wallco Ai
·
fix: ensureUserRemovedColumn targets all_designs base table, 71e56c5 →