← All tasks

Variant default_code dup-error — UI verification PROD · GATE 2

2026-05-22 — follow-up to the 2026-05-20 Followups bundle #2 ship. The original Gate 2 short-circuited because no get-coffee template had ≥2 manually-keyed default_code variants. This run seeds a throwaway template on lumiere-coffee (Starter, dev tenant) with 2 manually-coded variants, drives the VariantEditModal end-to-end, asserts the friendly Postgres-23505 → field-error translation renders, and cleans up after itself. No code change — the constraint, 23505 catch, and friendly error string all shipped in c33f269.

8/8 verification · 51/51 regression = 59/59 total green. Code already on prod (commit c33f269, 2026-05-20). Verification ran against lumiere-coffee.nixtech.app; throwaway template + variants seeded on prod Supabase and torn down at exit. Direct DB re-query post-test confirmed zero __test-dup-error-* rows leftover.

Verification checks — 8/8

51/51 regression green — no regressions from this verification.
test-phase1-prod.mjs11/11
test-phase2-sso-outdoor-prod.mjs6/6
test-phase2-cafe-multishop-prod.mjs6/6
test-m1-prod.mjs10/10
test-r7-prod.mjs14/14
test-r8-prod.mjs4/4

phase2-sso-outdoor / phase2-cafe-multishop / r7 each first-failed with a Windows schannel cert-chain flake (fetch failed / unable to verify the first certificate — see feedback memo). Re-ran with NODE_TLS_REJECT_UNAUTHORIZED=0; all green. No code regression — the change is purely in lib/actions/product_attribute.ts and touches no SSO / manager-live / multishop code path.

Screenshots — full UI flow on prod

1. /cafe/settings/attributes (Starter)Lumière's Attributes admin, throwaway template is in the list (sorted by name)
2. Template expanded — 2 variants visibleBoth DUP-A and V002 render in the variant list
3. VariantEditModal — dup code typedV002 variant being edited; input now reads DUP-A (collides with sibling)
4. Save clicked → friendly errorThe 23505 catch translates to per-field guidance. Modal stays open.
5. Recovery — non-dup code savesChanged to V002-OK; modal closes, row re-renders

Test artifacts: result.json · seed.json (template + variant ids)

What's closed by this verification

From the followups still-tracked list:

Still tracked (need Narong spec or downstream model changes):