← All tests

R6.1 — Revert R5.7 reverse-sync PROD

First slice of NIX-OS-89 Cafe-as-master. Per Narong's 2026-05-07 architectural confirmation, the Cafe (NIX) Postgres becomes master record and Odoo becomes optional ERP-light receiving endpoint. The R5.7 Odoo→Cafe reverse sync (shipped 2026-05-04) is now wrong-direction and removed in full: cron disabled, route + DAO deleted, watermark column dropped. The close-shift Telegram message — the only remaining caller of the deleted fetchSessionOrders — was swapped to read from cafe.orders directly.

R6.1 shipped end-to-end on prod. No new prod test needed — test-phase4-prod.mjs already exercises the close-shift flow (10/10 green) which is the only behavior change. 38/38 across full regression sweep. ~500 LOC removed, 1 column dropped, 1 cron disabled. Forward sync (R5.5) untouched and still drains every minute.

R6.1 ship steps

Regression sweep

SuiteScoreStatusNotes
test-phase4-prod10/10PASSDe-facto R6.1 prod test — exercises close-shift flow (the rewritten Telegram block path).
test-receipt-fixes-prod6/6PASSRequired 1 retry (transient flake at SSO step on first run, clean on retry — matches the now-twice-observed pattern).
test-nix-os-87-prod11/11PASSSettings master-detail still mounted across navigations.
test-phase1-prod11/11PASSCore SSO + tenant routing baseline.
Total38/38PASS

Code surface (commits)

nix-outdoor-sales-backend (commit 9c6266d):
  migrations/20260507100000_drop_cafe_tenant_config_reverse_sync_watermark.ts   NEW
  migrate.js                                                                    + registry entry

nix-cafe (commit f4790b6) — net 858 LOC removed:
  app/api/cafe/cron/odoo-reverse-sync/route.ts                                  DELETED (~270 LOC)
  app/api/cafe/cron/odoo-reverse-sync/                                          dir removed
  lib/db/odoo_reverse_sync.ts                                                   DELETED (~140 LOC)
  scripts/test-r5-7-prod.ts                                                     DELETED
  cron-trigger/worker.ts                                                        dropped */15 case + fireOdooReverseSync
  cron-trigger/wrangler.jsonc                                                   dropped */15 from crons array
  lib/db/schema.ts                                                              dropped odooReverseSyncWatermark column
  lib/odoo/queries.ts                                                           dropped fetchSessionOrders
  lib/actions/register.ts                                                       Telegram block: fetchSessionOrders → listOrdersForSession

Next slice: R6.2a (cafe.products schema + dark backfill)

NIX-OS-89 arc continues with 6 more sub-phases:
  R6.2a  cafe.products schema (odoo_product_id) + dark backfill from Odoo
  R6.2b  per-tenant products_master flag flips Pro reads to listProductsForPos
  R6.3   cafe.customers end-to-end (schema + backfill + read + push)
  R6.4   product Cafe→Odoo push (blocked on Narong stock+photos clarification)
  R6.5   payment methods + POS configs as cafe-master
  R6.6   landing summary cards (fetchSessionSummariesForConfigs → cafe aggregation)

Scoping memo: see project_session_2026_05_07_r6_1.md when written.