From 5e13c8ec1de9f69981bff5fd63c8a34d3fa1f67a Mon Sep 17 00:00:00 2001 From: Jose Lago Date: Mon, 19 Oct 2026 20:41:51 +0200 Subject: [PATCH] docs(release): record the points/sessions/sidecar deployment Backup 20261019T181646Z with the four pre-migration function definitions (the migration drops them, so the dump alone was not a rollback path); 113/24/57 assertions run rollback-only against prod data before applying; welcome +10 -> session +10 -> total 20 and the staff zero-award path both proven on real prod rows inside rolled-back transactions; three container IDs changed, seventeen preserved; the llm-test verdict fix redeployed without recreating convivo-app. --- docs/releases/2026-10-19.md | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/docs/releases/2026-10-19.md b/docs/releases/2026-10-19.md index 7c395b3..4a6fccc 100644 --- a/docs/releases/2026-10-19.md +++ b/docs/releases/2026-10-19.md @@ -568,3 +568,51 @@ shells). Every symptom was "the new feature is broken"; the cause was `net::ERR_CONNECTION_REFUSED`. Lesson recorded here because it cost time twice: **a mock-based suite failing wholesale on every assertion is an environment problem, not a product problem** — check the server before debugging the code. + +## Deployment (2026-10-19) + +**Deployed to production.** Two rounds: the feature set (`fdb6045`, migration + +both apps + sidecar) and the verdict fix (`d14e1c2`, admin + sidecar only). + +- **Backup** `/home/APPE/convivo-backups/pointsfix-20261019T181646Z` (mode 0700): + `postgres.dump` (2.2 MB, `pg_restore -l` verified — 239 table entries), + pre/post counts, **the four previous function definitions** + (`functions-pre.sql`, needed because the migration drops them), the ledger list, + `docker-compose.yml` and all 17 pre-existing source files it replaces. + Rollback tags `convivo-{app,admin,sidecar}:rollback-pointsfix-20261019T181646Z`. +- **Drift guard**: all 17 replaced files were byte-identical to my `HEAD~1` on the + VM before copying, and all 19 shipped files verified byte-identical to `HEAD` + afterwards. Two files (`useSilentRefresh.ts`, `Sessions.tsx`) were new — their + absence in prod was confirmed, not assumed. +- **Rollback-only against prod data first**: migration + all three SQL suites in + one transaction each → **113 / 24 / 57 assertions**, then `rollback`. Ten + counters plus the queue compared byte-identical to the backup afterwards. +- **Migration applied** in one transaction, recorded in the ledger + (`20261019160000` / `welcome_points_and_toggle_restore`, matching how local + already stored bare versions). Verified live signatures: + `welcome_checkin → (…, points, points_awarded)`, + `checkin_attendee → (…, points, already, points_awarded)`, + `set_registration_checked_in → (…, points_removed, points_added)`, + `preview_welcome_checkin → (…, copies, points_awarded)` — all owner `postgres`, + `authenticated` yes / `anon` no. +- **Behaviour proven on real prod rows** (rolled back, counts verified identical): + a session scan of an unwelcomed attendee raised *"This attendee needs to be + checked in at the front desk first."*; `welcome_checkin` then returned + `points = 10, points_awarded = t`; the following session scan returned + `points = 20`; `points_log` held exactly two `checkin = 10` rows. For a staff + contact, `welcome_checkin` returned `points = 0, points_awarded = f` with **no + `points_log` row at all**, and the preview reported `copies = 0` on the re-scan. +- **Containers**: exactly three IDs changed (app, admin, sidecar); all 17 + unrelated containers kept their IDs, including Supabase and NPM. Served bundles + are `index-CE_n-ZUs.js` then `index-Dj1lozKv.js` (admin) and `index-BE2x44BJ.js` + (attendee), each md5-identical to the local HEAD build. PostgREST reloaded its + schema cache on its own (72 RPCs). `/sidecar/llm-test` answers `401` unaided and + `401` through the admin's nginx proxy, which proves routing without a credential. + **`convivo-app` was deliberately not recreated in the second round** — the fix + touched only admin and sidecar. +- **Sidecar stayed healthy** through both rounds: the every-minute pretix sync kept + reporting `errors: [], updated: 115`. The only log matches for "error" were those + empty arrays. +- **Not run against prod**: the browser suites. They provision and delete real + contacts/registrations (`checkin-points.spec.ts` deletes by email), which on this + database would collide with imported pretix data. Local only, as before.