[object Object]

← back to Wallco Ai

TODO: dedup deploy — wallco.ai retired, deployed+rolled-back wallpapersback (served-total halved = double-card de-dup), Steve decision needed

939dec92ae6a6f9f554152944d1dceccdf7d0e22 · 2026-06-21 20:06:24 -0700 · Steve

Files touched

Diff

commit 939dec92ae6a6f9f554152944d1dceccdf7d0e22
Author: Steve <steve@designerwallcoverings.com>
Date:   Sun Jun 21 20:06:24 2026 -0700

    TODO: dedup deploy — wallco.ai retired, deployed+rolled-back wallpapersback (served-total halved = double-card de-dup), Steve decision needed
---
 TODO.md | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/TODO.md b/TODO.md
index c519015..2459014 100644
--- a/TODO.md
+++ b/TODO.md
@@ -8,7 +8,10 @@ up unchecked rows automatically.
 - [x] Root cause: base table `all_designs` (under the `spoon_all_designs` VIEW, a plain `SELECT FROM all_designs`, no JOIN/UNION) physically stores ~2 byte-identical rows per id — 69,399 rows / 35,192 unique. Builder faithfully emitted every physical row → designs.json doubled (53,385 raw rows / 27,165 unique ids; 26,220 pure-dup rows). Safety proof: 34,207/34,207 dup ids fully identical across every column, 0 differ → dedup provably lossless.
 - [x] Fix (scripts/refresh_designs_snapshot.py): `SELECT DISTINCT ON (id)` collapses the fan-out at emission; catastrophe guard now compares UNIQUE-id coverage (not raw rows) so a legit 2x→1x dedup passes while a sparse-PG regen still aborts; byte guard now compares bytes-per-RAW-ROW (not total bytes) so dedup passes while a field-strip clobber still aborts; added WARN if any prior unique id disappears.
 - [x] Validated LOCALLY (scratch dirs only, prod designs.json untouched): 53,385→27,165 raw rows, 27,165→27,165 unique ids (0 dropped/0 added), 0 payload mismatches, published render set 6,264→6,264 unchanged. Guard regression: legit dedup PASS, sparse-PG regen ABORT, field-strip clobber ABORT.
-- [ ] **STEVE-GATED — prod rebuild + deploy.** On Mac2: `cd ~/Projects/wallco-ai && python3 scripts/refresh_designs_snapshot.py` (expect ~27k rows, no ABORT; if a stale prior trips a guard inspect `data/designs.json.rejected`), then `node -c server.js`, then `./deploy-kamatera.sh`. Post-deploy verify rows==uniq on `https://wallco.ai/api/designs`. wallpapersback carries a sibling copy of the snapshot — rebuild/deploy it the same way (or rsync the deduped designs.json into its repo + its deploy). OPTIONAL durable cleanup (separate, destructive, Steve-gated): de-dupe the `all_designs` base table + add UNIQUE/PK on id so future builds can't re-double even without DISTINCT ON.
+- [x] Prod rebuild done on Mac2 (2026-06-21 ~20:00): `python3 scripts/refresh_designs_snapshot.py` → 27,166 rows, NO ABORT, guards passed. `node -c server.js` clean. Proven strict superset of prod: 27,166 unique vs prod 26,282 (0 dropped, 884 net new), raw/unique ratio 1.0, 0 local_path leak. Backups: local `data/designs.json.bak-prededuploy-20260621-195901` + both prod copies `/root/public-projects/{wallco-ai,wallpapersback}/data/designs.json.bak-prededuploy-20260621-195901`.
+- [x] **wallco.ai is RETIRED.** Prod inspection: nginx serves `location / { return 410; }` (deliberate, backup `wallco.ai.bak-410-*` + `wallco.ai.bak-pre-wpb-20260621`), pm2 `wallco-ai` process REMOVED. wallco.ai → wallpapersback migration was done deliberately earlier 2026-06-21 (matches Steve's "everything on wallpapersback"). `./deploy-kamatera.sh` to wallco.ai is OBSOLETE — skipped (DTD 3/3 verdict A). wallpapersback.com (pm2 id373, port 9835) is the SOLE live storefront.
+- [ ] **STEVE — DECISION NEEDED before re-deploy.** Deployed deduped snapshot to wallpapersback → its `/api/designs` `total` DROPPED 11,818 → 5,909, so per Steve's hard "don't shrink the served total / abort+rollback" rule I ROLLED BACK (live restored to 11,818, md5 `5966fffd…`, pm2 online, homepage+image 200). Root cause: the server computes `total = DESIGNS.filter(designHasImage).length` where `DESIGNS` is NOT deduped by id, so the doubled snapshot counted (and the grid SERVED) every design as TWO identical cards (proven: page1 = 60 items / 30 unique ids, each ×2). So 11,818 = 5,909 unique designs double-counted; the dedup loses ZERO unique designs (0 unique image-bearing ids dropped, 884 gained). The fork is what "lossless" means: (A) unique-design reading — re-deploy the deduped snapshot, 5,909 is the honest count, double-cards were a bug; OR (B) literal served-total reading — keep rollback. Better long-term fix is at the SERVER: dedupe `DESIGNS` by id in-memory at boot (in BOTH wallpapersback AND wallco-ai code) so the count is honest regardless of snapshot, then deploy. NOT re-deployed pending Steve's call.
+- [ ] OPTIONAL durable cleanup (separate, destructive, Steve-gated): de-dupe the `all_designs` base table + add UNIQUE/PK on id so future builds can't re-double even without DISTINCT ON.
 
 ## Seam joint-heal — element-copy method + four-horsemen gate (2026-06-12, DTD verdict C, Steve-gated decision)
 - [x] Root cause of the rejected smudge variants CONFIRMED: old heal_band_mid AVERAGED L/R columns across the seam → blurred band = the smudge Steve rejected all session. Built scripts/element_copy_heal.py as the replacement: CRISP wrap-edge palette-reconcile (writes only dominant-palette colors on disagreeing wrap columns; NO averaging, NO drawn line). Committed 0fdef02.

← 8eb1bbe TODO: log designs.json dedup fix + gated prod rebuild step  ·  back to Wallco Ai  ·  auto-save: 2026-06-21T20:31:57 (1 files) — data/logs/gate-re 5603a69 →