← back to Wallco Ai

docs/mac2-prod-parity-2026-05-29.md

71 lines

# Mac2 ↔ prod parity audit — wallco-ai — 2026-05-29

Autonomous overnight thread (Steve asleep, /dtd holds override authority).

## File md5 parity — 5 of 5 IDENTICAL

| file | mac2 md5 | prod md5 | verdict |
|---|---|---|---|
| server.js | 0af03e0cd39cb9e3755d45128a7934d4 | 0af03e0cd39cb9e3755d45128a7934d4 | MATCH |
| src/colorways.js | a1b4f8f3b12130302f80deb157bf5984 | a1b4f8f3b12130302f80deb157bf5984 | MATCH |
| public/js/color-dots.js | 8d667b5946b67deea9550ff462db3908 | 8d667b5946b67deea9550ff462db3908 | MATCH |
| public/admin/elements.html | 6f9b31ff6692a0d32b1785efa6db3935 | 6f9b31ff6692a0d32b1785efa6db3935 | MATCH |
| public/admin/theme-gallery.html | 611b58b72c421076820418e7d1912907 | 611b58b72c421076820418e7d1912907 | MATCH |

No file drift. No deploy needed.

## PG schema parity — 4 tables compared

### all_designs — Mac2 ahead by 1 column → BACK-PORTED TO PROD TONIGHT

Mac2 had `product_line text` (nullable); prod lacked it.
server.js references `d.product_line` at line 1991 and `product_line` in 4
INSERT/SELECT statements (9694, 9850, 10112, 10268). Since server.js is
byte-identical Mac2→prod, those queries were failing on prod silently.

/dtd verdict: A (execute). Codex=A, Claude=A, Qwen=ABSTAIN (offline).

Executed on prod:
```sql
ALTER TABLE all_designs ADD COLUMN IF NOT EXISTS product_line text;
```

Verified: `product_line | text | nullable=true` now exists on prod.

Reversal (if needed, <1s, zero data loss because no rows have been written
to this column yet — all NULL):
```sql
ALTER TABLE all_designs DROP COLUMN product_line;
```

Type-width nuance (cosmetic, no action):
- `tif_max_print_h_in/w_in` are `numeric(8,2)` on Mac2, plain `numeric` on
  prod. Semantically equivalent for stored values that fit in 8,2.

### spoon_all_designs — drift, NON-URGENT, surfaced to morning digest

- Prod has 2 columns Mac2 lacks: `element_motif_path text`, `element_ref_path text`.
- Nullability differs on 11 shared columns (prod NOT NULL, Mac2 nullable).
- `user_stars` is smallint on Mac2, integer on prod.

server.js touches `element_motif_path` / `element_ref_path` on `all_designs`
only (line 1803, 2548), not on `spoon_all_designs`, so no live path is broken.
No autonomous write performed. Direction of back-port (prod → Mac2 ADD COLUMN,
or Mac2-as-canonical) is a judgment call for Steve.

### wallco_user_colorways — IDENTICAL (8 cols)

Owner discrepancy on Mac2 (`stevestudio2` instead of `dw_admin`) caused
information_schema.columns to return empty for dw_admin; pg_attribute query
bypassed that and confirmed match.

### wallco_trade_users — IDENTICAL (9 cols)

## Summary

- 5 of 5 files byte-identical
- 1 prod-PG additive write completed under /dtd authority (reversible)
- 1 schema delta surfaced for Steve (spoon_all_designs cosmetic + 2 missing cols)
- 2 tables fully identical
- Total autonomous prod writes: 1 (ADD COLUMN, nullable, no row writes)