docs(release): record the 2026-10-19 production deployment
Deployed to prod: migration 20261019110000 (ledger 41 -> 42) applied with the
badge_print suite run rollback-only in the same transaction (113/113), both
images rebuilt and recreated, live bundles now index-DSNhW0mZ.js (admin) and
index-CXd2kxEv.js (attendee) md5-identical to the HEAD build.
Gate and copies verified against real prod data inside rolled-back transactions:
a session scan of an un-welcomed attendee raised the front-desk message, the same
call returned a checkin_id after welcome_checkin, and refused again once the flag
was cleared; with badge_copies = 3 one welcome enqueued exactly 3 pgmq jobs and
preview reported copies = 3. Counts match the backup afterwards (119 contacts,
115 registrations, 2 checkins, queue 0, 173 auth users).
Backup /home/APPE/convivo-backups/gatecopies-20261019T131204Z with rollback tags
convivo-{app,admin}:rollback-gatecopies-20261019T131204Z. No data backfill:
[email protected] keeps checked_in = false, so the front desk re-welcomes him or an
admin flips the toggle. No printer change - the Pi renders from its own bundled
dist-print, and multiplicity is N queue jobs. .design-audit/ is ignored now.
This commit is contained in:
1 parent
c49a94fe80
commit
96e4e6a6ea
2 files changed
+63
-16
No files matched your search
@@ -47,3 +47,6 @@ test-results/
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
.scratch/
|
.scratch/
|
||||||
|
|
||||||
|
# Design-audit capture artifacts (screenshots + measurements)
|
||||||
|
.design-audit/
|
||||||
+60
-16
@@ -305,20 +305,64 @@ can be scanned into a session."** with **OK** (`data-testid="front-desk-required
|
|||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
**Not deployed.** Production is still missing everything from this change set:
|
**Deployed to production 2026-10-19** (commit `c49a94f`, both apps + DB
|
||||||
`events.badge_copies` does not exist, `checkin_attendee` has no gate,
|
migration).
|
||||||
`welcome_checkin` prints one label, and `admin.appe.at` serves the pre-fix
|
|
||||||
bundle `index-Czkxg0C-.js` (which is exactly the reload-everything behaviour
|
|
||||||
described above). `set_registration_checked_in` already exists there with the
|
|
||||||
same signature, so the migration will not conflict.
|
|
||||||
|
|
||||||
**One data consequence to decide on before shipping:** in production 2 people
|
- **Migration** `20261019110000_front_desk_gate_and_badge_copies.sql` applied in
|
||||||
already have session check-ins without `checked_in = true`, so the gate would
|
a single transaction with `ON_ERROR_STOP=1` and recorded in the ledger
|
||||||
lock 1 of them out of further session scans until the front desk welcomes them.
|
(ledger **41 → 42**, name `front_desk_gate_and_badge_copies`). Verified after
|
||||||
Either backfill `checked_in = true` for anyone with an existing check-in as part
|
commit: `events.badge_copies` present with
|
||||||
of the rollout, or accept that the front desk re-welcomes them (they print a
|
`CHECK (badge_copies >= 1 AND badge_copies <= 4)`, default `1` on the active
|
||||||
badge on the way back through).
|
event, `checkin_attendee` carries the gate, `welcome_checkin` reads
|
||||||
|
`badge_copies`, and `preview_welcome_checkin` returns
|
||||||
To ship: apply `20261019110000_front_desk_gate_and_badge_copies.sql` (records
|
`(attendee_email, attendee_name, already, will_print, copies)` granted to
|
||||||
41 → 42), rebuild `convivo-app` **and** `convivo-admin`, then re-run the suites
|
`authenticated` only. `set_registration_checked_in` was already there with the
|
||||||
above against prod.
|
same signature, so nothing conflicted.
|
||||||
|
- **Backup** `/home/APPE/convivo-backups/gatecopies-20261019T131204Z` (mode
|
||||||
|
0700): full `postgres.dump` (7.6 MB), pre/post counts, the three previous
|
||||||
|
function definitions, the ledger list, `docker-compose.yml`, and a copy of all
|
||||||
|
nine runtime source files the deploy touches. Rollback tags
|
||||||
|
`convivo-app:rollback-gatecopies-20261019T131204Z` and
|
||||||
|
`convivo-admin:rollback-gatecopies-20261019T131204Z`.
|
||||||
|
- **SQL regression rollback-only against prod**: migration +
|
||||||
|
`badge_print_tests.sql` in one transaction, **113/113 assertions**, then
|
||||||
|
`rollback`. Counts afterwards matched the backup exactly (contacts 119,
|
||||||
|
registrations 115, checkins 2, events 1, badge_layouts 1, print_stations 1,
|
||||||
|
queue 0, auth users 173) and `badge_copies` was still absent.
|
||||||
|
- **Baseline drift guard**: all 8 modified prod source files were byte-identical
|
||||||
|
to `HEAD~1`, so whole-file copies were safe. The 9 shipped files
|
||||||
|
(8 modified + `BadgeCopiesSetting.tsx`) verified byte-identical to HEAD on the
|
||||||
|
VM; `package.json`, `package-lock.json` and both `Dockerfile`s already matched,
|
||||||
|
so no dependency or manifest change was involved.
|
||||||
|
- **Both images** rebuilt on the VM and recreated with
|
||||||
|
`docker compose up -d --force-recreate`; healthy in both cases, every
|
||||||
|
unrelated container ID preserved (sidecar kept its 2-day uptime). Live bundles
|
||||||
|
are now `index-DSNhW0mZ.js` (admin) and `index-CXd2kxEv.js` (attendee), each
|
||||||
|
md5-identical to the local HEAD build — the admin console no longer serves
|
||||||
|
`index-Czkxg0C-.js`.
|
||||||
|
- **Gate proven on prod data**, as an authenticated admin through the real RPC:
|
||||||
|
a session scan of `markus@appe.at` (who has a session check-in but was never
|
||||||
|
welcomed) raised *"This attendee needs to be checked in at the front desk
|
||||||
|
first."*; after `welcome_checkin` the same call returned a
|
||||||
|
`checkin_id`; re-clearing the flag refused again. All inside a rolled-back
|
||||||
|
transaction — queue and checkin counts unchanged.
|
||||||
|
- **Copies proven on prod data**: with `badge_copies = 3`, one welcome enqueued
|
||||||
|
exactly **3** pgmq jobs for that attendee, and
|
||||||
|
`preview_welcome_checkin` reported `will_print = true, copies = 3`; a re-run
|
||||||
|
against an already welcomed attendee reported `copies = 0`. Rolled back
|
||||||
|
(`queue = 0`, `badge_copies = 1`).
|
||||||
|
- **PostgREST cache** picked the change up on its own: the served OpenAPI
|
||||||
|
already contains `badge_copies`. `preview_welcome_checkin` is absent from the
|
||||||
|
*anon* OpenAPI, which is correct — it is granted to `authenticated` only, as
|
||||||
|
before. Both apps proxy `/rest/v1` and `/auth/v1` normally (200 + GoTrue
|
||||||
|
health), and both SPAs render on the new bundles.
|
||||||
|
- **No printer change was needed.** The Pi renders badges from its own bundled
|
||||||
|
`/app/renderer` (built from `dist-print`), not from the admin site, and the
|
||||||
|
print entry imports only `lib/types` (type-only, erased at build) plus the
|
||||||
|
unchanged `BadgeRender`. Multiplicity comes from N queue jobs, which is why the
|
||||||
|
worker stayed untouched.
|
||||||
|
- **Deliberately not done:** no data backfill. `markus@appe.at` keeps
|
||||||
|
`checked_in = false`, so the front desk re-welcomes him (one badge) or an
|
||||||
|
admin flips the toggle before his next session scan. The print station
|
||||||
|
`Welcome desk` had not heartbeated for ~77 minutes at deploy time, so any
|
||||||
|
welcome before it comes back simply queues — jobs wait, nothing is lost.
|
||||||
Reference in new issue
Block a user