← back to Wallco Ai
convergence EXECUTED (Option B per /dtd): prod spoon_all_designs is now a view over all_designs — one id-space, churn structurally impossible
7d91223672a90f9a01b18d8745fddff4d0d87774 · 2026-06-01 17:41:01 -0700 · Steve Abrams
- pg_dump + legacy table retained for rollback
- updatable view write-through + dig trigger verified; live grid 4021 unchanged
- mark prod-table migration obsolete (spoon is now a view)
Files touched
M docs/spoon-convergence-migration-plan.mdM migrations/20260601_prompt_match_columns_PROD.sql
Diff
commit 7d91223672a90f9a01b18d8745fddff4d0d87774
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Mon Jun 1 17:41:01 2026 -0700
convergence EXECUTED (Option B per /dtd): prod spoon_all_designs is now a view over all_designs — one id-space, churn structurally impossible
- pg_dump + legacy table retained for rollback
- updatable view write-through + dig trigger verified; live grid 4021 unchanged
- mark prod-table migration obsolete (spoon is now a view)
---
docs/spoon-convergence-migration-plan.md | 19 ++++++++++++++++++-
migrations/20260601_prompt_match_columns_PROD.sql | 7 +++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/docs/spoon-convergence-migration-plan.md b/docs/spoon-convergence-migration-plan.md
index eba3c82..a3a3ec2 100644
--- a/docs/spoon-convergence-migration-plan.md
+++ b/docs/spoon-convergence-migration-plan.md
@@ -1,7 +1,24 @@
# Migration Plan — Converge prod `spoon_all_designs` to a view over `all_designs`
-**Status:** Phase 0 MEASURED + interim fixes APPLIED (2026-06-01). Full convergence (§6–§7) still PENDING Steve sign-off + a maintenance window.
+**Status:** ✅ **CONVERGENCE EXECUTED 2026-06-01** (Option B per /dtd). Prod `spoon_all_designs` is now a VIEW over `all_designs` — one id-space. Remaining = follow-ups §10 only.
**Author:** drafted 2026-06-01 (root-cause dig into catalog id churn).
+
+---
+
+## EXECUTION LOG — 2026-06-01 evening (Option B, /dtd 2-0 valid votes, Qwen errored)
+
+Reconciliation policy decided by /dtd = **Option B (view-only)** — Claude + Codex both B; the served catalog is Mac2-sourced so prod spoon's orphans/conflicts carry only secondary fields the PDP tolerates as null, and the renamed legacy table makes the deferral reversible.
+
+Executed against prod `dw_unified`:
+1. `pg_dump -t all_designs -t spoon_all_designs` → `/root/dw_designs_pre_converge_1780360566.dump` (2.3 MB rollback artifact).
+2. `ALTER TABLE all_designs ADD COLUMN IF NOT EXISTS` user_prompt_match/verdict/rated_at (user_stars already present). Column delta spoon−all_designs now **empty**; **0 dependent objects** on spoon.
+3. **Cutover tx:** `ALTER TABLE spoon_all_designs RENAME TO spoon_all_designs_legacy_20260601` + `CREATE VIEW spoon_all_designs AS SELECT * FROM all_designs`.
+4. Verified: spoon `relkind=v`, view count = all_designs (10,587); updatable-view write-through works (`UPDATE spoon… → all_designs`); dig trigger fires on insert via view (new id **56003**, `DIG_AI_056003` — confirms the sequence bump too); live health 200, grid **4,021** unchanged (public catalog is Mac2-sourced, unaffected); palette serves for all_designs rows (id 53713), and the null-palette ids were null before too (no regression).
+5. Cleanup: marked `migrations/20260601_prompt_match_columns_PROD.sql` OBSOLETE (its `ALTER TABLE spoon` would now error). Confirmed server.js does NOT auto-run sql files on boot → no restart landmine.
+
+**Rollback (if ever needed):** `DROP VIEW spoon_all_designs; ALTER TABLE spoon_all_designs_legacy_20260601 RENAME TO spoon_all_designs;` — or `pg_restore` the dump. Legacy table retained (1,579 rows).
+
+**Still open = §10 follow-ups only:** (1) two-master generation — pick a single minting master or disjoint id ranges; (2) restore the `settlement_publish_check` DB trigger on prod (JS-gate-only today); (3) retire the `MAX(id)+1` minting in heal/reroll scripts.
**Risk class:** prod schema migration on `dw_unified` (live catalog). Data-reconciliation + settlement-trigger + live `designs.json` sync all in scope.
---
diff --git a/migrations/20260601_prompt_match_columns_PROD.sql b/migrations/20260601_prompt_match_columns_PROD.sql
index 80ddae2..e7dcb43 100644
--- a/migrations/20260601_prompt_match_columns_PROD.sql
+++ b/migrations/20260601_prompt_match_columns_PROD.sql
@@ -1,5 +1,12 @@
-- 20260601_prompt_match_columns_PROD.sql
--
+-- ⚠️ OBSOLETE / DO NOT RE-RUN (2026-06-01 evening): the topology drift this file
+-- worked around has been RESOLVED — prod `spoon_all_designs` is now a VIEW over
+-- `all_designs` (converged to match Mac2; see docs/spoon-convergence-migration-plan.md).
+-- Its `ALTER TABLE spoon_all_designs ...` statements will now ERROR ("is not a
+-- table"). The canonical migration for both envs is the VIEW-based sibling
+-- 20260601_prompt_match_columns.sql. Kept for history only.
+--
-- PROD variant of 20260601_prompt_match_columns.sql.
--
-- TOPOLOGY DRIFT (discovered 2026-06-01): on PROD dw_unified,
← 9e5eb22 untrack public/refiner-compare + public/uploads/rooms (regen
·
back to Wallco Ai
·
genComfy: COMFY_SAMPLER/COMFY_SCHEDULER env knob (seam inves 833bd9f →