← All tests

Multi-register Bundle 3 — final cutover PROD

2026-05-14 on Supabase prod. Multi-register arc COMPLETE. Final cutover: legacy int pos_config_id columns dropped, pos_config_uuid renamed to pos_config_id (UUID), NOT NULL + FK enforced on sessions/shop_pos_configs/pos_sequences (orders stays nullable for pre-R5.2 history). Schema is now in its final UUID-keyed shape.

10/10 prod test green. 51/51 regression green. 61/61 total. shopToConfigId helper deleted — multi-register arc shipped.

Final schema state

cafe.sessions.pos_config_id           UUID NOT NULL  FK → cafe.pos_configs.id
cafe.orders.pos_config_id             UUID NULL      FK → cafe.pos_configs.id  (pre-R5.2 history)
cafe.shop_pos_configs.pos_config_id   UUID NOT NULL  PK part + unique + FK
cafe.pos_sequences.pos_config_id      UUID NOT NULL  PK part + FK

cafe.pos_configs.pos_config_int_id    BIGINT         (URL identifier — unchanged)
cafe.pos_configs.id                   UUID PK        (canonical register identifier)

Regression sweep — 51/51 + 10 new

test-multi-register-bundle2-prod.mjs (re-run vs Bundle 2)10/10
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
Total61/61

⚠ Cold-Worker flakiness during Gate 2 (resolved on retry)

The multi-register UI test flapped 4/10 → 6/10 → 8/10 → 10/10 over 5 runs on
prod immediately post-deploy. Two issues converged:

1. CF Workers on lumiere subdomain were cold post-deploy. The modal-open
   step (useState transition + DOM substitution) needs the Worker JS
   already isolate-loaded; cold first-clicks timed out the modal locator
   even at 15s. Resolved by re-running after Workers warm up.

2. The bundle's test had a stale `pos_config_uuid` reference (the DB column
   was renamed to `pos_config_id` by this migration). 1-line fix to the
   test, no impact on production code.

3. Once: 502 from a server action during the dup-name pre-check on a
   cold Worker. Not reproducible after Workers warmed. Not a real
   regression — same flake pattern Bundle 2 had at first push.

These are test-harness fragilities, not Bundle 3 regressions. Functional
behavior verified across multiple test runs.

Multi-register arc is DONE

3 bundles shipped over 2026-05-13 → 2026-05-14:

Bundle 1 (2026-05-13) — schema additions + backfill
  • Added shop_id/sequence_prefix/sync_state to cafe.pos_configs
  • Added pos_config_uuid alongside legacy int on 4 tables
  • Auto-seeded 'Register 1' per shop without a pos_configs row
  • 15/15 prod probe + 51/51 regression

Bundle 2 (2026-05-13) — user-visible feature
  • /cafe/settings/registers admin page
  • Starter POS landing renders N cards per shop
  • Top-bar register picker; sequence_prefix in order numbers
  • Dual-write pos_config_uuid on every new session + order INSERT
  • Closed get-coffee data-shape gap (5 Pro pos.configs now properly
    linked, 171 orders re-mapped, redundant Register 1 deleted)
  • 10/10 prod + 51/51 regression

Bundle 3 (2026-05-14) — final cutover (THIS DEPLOY)
  • Dropped legacy int pos_config_id columns from 4 tables
  • Renamed pos_config_uuid → pos_config_id
  • Set NOT NULL + FK on the 4 referencer tables
  • Refactored ~14 cafe files to take UUIDs
  • Deleted lib/starter-config.ts (shopToConfigId / findShopIdForConfigId
    no longer referenced anywhere)
  • 10/10 prod + 51/51 regression

After this lands the schema is in its final shape — there is no Bundle 4.

Still out-of-scope (separate future task):
  The Odoo connector that pushes new NIX-created Pro registers to
  pos.config.create. Bundle 2 sets sync_state='pending_create' on those
  rows; today they're usable in NIX but invisible in Odoo until the
  connector drains them (mirrors R11.5's session-close-move drain).