From 239389f42b1089289d4ff3cfad3724f4f6492cf2 Mon Sep 17 00:00:00 2001 From: sai sai Date: Tue, 1 Sep 2026 18:10:27 -0300 Subject: [PATCH 1/3] fix(live): move remaining Umbral sessions to 14:00 ART --- .../migration.sql | 37 +++++++++++++++++++ src/lib/__tests__/public-cycle.test.ts | 18 ++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 prisma/migrations/20260901180000_move_remaining_umbral_sessions_to_1400_argentina/migration.sql diff --git a/prisma/migrations/20260901180000_move_remaining_umbral_sessions_to_1400_argentina/migration.sql b/prisma/migrations/20260901180000_move_remaining_umbral_sessions_to_1400_argentina/migration.sql new file mode 100644 index 00000000..60b19a3d --- /dev/null +++ b/prisma/migrations/20260901180000_move_remaining_umbral_sessions_to_1400_argentina/migration.sql @@ -0,0 +1,37 @@ +-- Sai moved the two remaining public-cycle sessions to 14:00 Argentina +-- (America/Argentina/Cordoba, UTC-3), which is 17:00 UTC. Historical sessions +-- keep their actual times. Access, facilitator and room state remain intact. +WITH corrected_sessions ("id", "scheduled_at") AS ( + VALUES + ('50000000-0000-4000-8000-202609050001'::uuid, '2026-09-05 17:00:00'::timestamp), + ('50000000-0000-4000-8000-202609120001'::uuid, '2026-09-12 17:00:00'::timestamp) +) +UPDATE "scheduled_sessions" AS session +SET + "scheduled_at" = corrected_sessions."scheduled_at", + "updated_at" = CURRENT_TIMESTAMP +FROM corrected_sessions +WHERE session."id" = corrected_sessions."id" + AND session."status" = 'SCHEDULED'::"ScheduledSessionStatus"; + +DO $$ +DECLARE + initialized_count integer; + corrected_count integer; +BEGIN + SELECT count(*) INTO initialized_count FROM "users"; + + SELECT count(*) INTO corrected_count + FROM "scheduled_sessions" + WHERE ("id", "scheduled_at") IN ( + ('50000000-0000-4000-8000-202609050001'::uuid, '2026-09-05 17:00:00'::timestamp), + ('50000000-0000-4000-8000-202609120001'::uuid, '2026-09-12 17:00:00'::timestamp) + ) + AND "status" = 'SCHEDULED'::"ScheduledSessionStatus"; + + IF initialized_count = 0 AND corrected_count <> 0 THEN + RAISE EXCEPTION 'Empty installation contains a partial remaining Umbral cycle'; + ELSIF initialized_count > 0 AND corrected_count <> 2 THEN + RAISE EXCEPTION 'Remaining Umbral sessions must both start at 17:00 UTC'; + END IF; +END $$; diff --git a/src/lib/__tests__/public-cycle.test.ts b/src/lib/__tests__/public-cycle.test.ts index cdc849ee..2a546df4 100644 --- a/src/lib/__tests__/public-cycle.test.ts +++ b/src/lib/__tests__/public-cycle.test.ts @@ -14,7 +14,7 @@ describe('public four-Saturday cycle', () => { expect(isPublicCycleSession('10000000-0000-4000-8000-000000000001')).toBe(false); }); - it('keeps the final migration contract at the confirmed 16:00 UTC', () => { + it('preserves the historical four-session correction at 16:00 UTC', () => { const migration = readFileSync( new URL( '../../../prisma/migrations/20260821194000_correct_four_saturday_cycle_start/migration.sql', @@ -31,6 +31,22 @@ describe('public four-Saturday cycle', () => { expect(migration).not.toContain('14:00:00'); }); + it('moves only the two remaining sessions to 14:00 Argentina / 17:00 UTC', () => { + const migration = readFileSync( + new URL( + '../../../prisma/migrations/20260901180000_move_remaining_umbral_sessions_to_1400_argentina/migration.sql', + import.meta.url, + ), + 'utf8', + ); + + expect(migration).toContain("'2026-09-05 17:00:00'::timestamp"); + expect(migration).toContain("'2026-09-12 17:00:00'::timestamp"); + expect(migration).not.toContain('2026-08-22 17:00:00'); + expect(migration).not.toContain('2026-08-29 17:00:00'); + expect(migration).toContain('corrected_count <> 2'); + }); + it('recognizes only an entirely anonymous COMP entitlement for a reviewed public room', () => { const candidate = { staffUser: null, From 89c6693b53ab7dc7cf30376fff73450be67e7a11 Mon Sep 17 00:00:00 2001 From: sai sai Date: Tue, 1 Sep 2026 22:15:58 -0300 Subject: [PATCH 2/3] fix(deps): pin patched mysql2 for Prisma tooling --- package-lock.json | 43 +++++++++++++++++++++++-------------------- package.json | 1 + 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 103d7e74..babbf2ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8271,23 +8271,25 @@ "license": "MIT" }, "node_modules/mysql2": { - "version": "3.15.3", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.15.3.tgz", - "integrity": "sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg==", + "version": "3.22.0", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.22.0.tgz", + "integrity": "sha512-4jaJYBObj7FhD3lnZhqX1yDMuZN4mQNz+IolDySDXT7fbozMBpeGQNcuWXKUqo4ahkAEfkjUHPjnwuDI0/6VKw==", "license": "MIT", "dependencies": { - "aws-ssl-profiles": "^1.1.1", + "aws-ssl-profiles": "^1.1.2", "denque": "^2.1.0", "generate-function": "^2.3.1", - "iconv-lite": "^0.7.0", - "long": "^5.2.1", - "lru.min": "^1.0.0", - "named-placeholders": "^1.1.3", - "seq-queue": "^0.0.5", - "sqlstring": "^2.3.2" + "iconv-lite": "^0.7.2", + "long": "^5.3.2", + "lru.min": "^1.1.4", + "named-placeholders": "^1.1.6", + "sql-escaper": "^1.3.3" }, "engines": { "node": ">= 8.0" + }, + "peerDependencies": { + "@types/node": ">= 8" } }, "node_modules/named-placeholders": { @@ -9623,11 +9625,6 @@ "semver": "bin/semver.js" } }, - "node_modules/seq-queue": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", - "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" - }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -9914,13 +9911,19 @@ "node": ">= 10.x" } }, - "node_modules/sqlstring": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", - "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", + "node_modules/sql-escaper": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.5.1.tgz", + "integrity": "sha512-4toX5E1fQbBrpfXidaHnF0669nkAdETeIPTs2SUjxxD7RRIs9ICG4gtpmfc68JCEKehsdwLFqBu9VlQqZ1P1gg==", "license": "MIT", "engines": { - "node": ">= 0.6" + "bun": ">=1.0.0", + "deno": ">=2.0.0", + "node": ">=12.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/mysqljs/sql-escaper?sponsor=1" } }, "node_modules/stable-hash": { diff --git a/package.json b/package.json index 5ed97826..0346ae32 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "overrides": { "deepmerge-ts": "8.0.1", "esbuild": "0.28.2", + "mysql2": "3.22.0", "playwright-core": "1.61.0", "next": { "postcss": "8.5.25", From f8ca1d0a00df556c062f168abf11074b2ff40006 Mon Sep 17 00:00:00 2001 From: sai sai Date: Wed, 2 Sep 2026 12:43:08 -0300 Subject: [PATCH 3/3] revert: keep Umbral schedule change scoped --- package-lock.json | 43 ++++++++++++++++++++----------------------- package.json | 1 - 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index babbf2ef..103d7e74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8271,25 +8271,23 @@ "license": "MIT" }, "node_modules/mysql2": { - "version": "3.22.0", - "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.22.0.tgz", - "integrity": "sha512-4jaJYBObj7FhD3lnZhqX1yDMuZN4mQNz+IolDySDXT7fbozMBpeGQNcuWXKUqo4ahkAEfkjUHPjnwuDI0/6VKw==", + "version": "3.15.3", + "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.15.3.tgz", + "integrity": "sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg==", "license": "MIT", "dependencies": { - "aws-ssl-profiles": "^1.1.2", + "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", "generate-function": "^2.3.1", - "iconv-lite": "^0.7.2", - "long": "^5.3.2", - "lru.min": "^1.1.4", - "named-placeholders": "^1.1.6", - "sql-escaper": "^1.3.3" + "iconv-lite": "^0.7.0", + "long": "^5.2.1", + "lru.min": "^1.0.0", + "named-placeholders": "^1.1.3", + "seq-queue": "^0.0.5", + "sqlstring": "^2.3.2" }, "engines": { "node": ">= 8.0" - }, - "peerDependencies": { - "@types/node": ">= 8" } }, "node_modules/named-placeholders": { @@ -9625,6 +9623,11 @@ "semver": "bin/semver.js" } }, + "node_modules/seq-queue": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/seq-queue/-/seq-queue-0.0.5.tgz", + "integrity": "sha512-hr3Wtp/GZIc/6DAGPDcV4/9WoZhjrkXsi5B/07QgX8tsdc6ilr7BFM6PM6rbdAX1kFSDYeZGLipIZZKyQP0O5Q==" + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -9911,19 +9914,13 @@ "node": ">= 10.x" } }, - "node_modules/sql-escaper": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.5.1.tgz", - "integrity": "sha512-4toX5E1fQbBrpfXidaHnF0669nkAdETeIPTs2SUjxxD7RRIs9ICG4gtpmfc68JCEKehsdwLFqBu9VlQqZ1P1gg==", + "node_modules/sqlstring": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/sqlstring/-/sqlstring-2.3.3.tgz", + "integrity": "sha512-qC9iz2FlN7DQl3+wjwn3802RTyjCx7sDvfQEXchwa6CWOx07/WVfh91gBmQ9fahw8snwGEWU3xGzOt4tFyHLxg==", "license": "MIT", "engines": { - "bun": ">=1.0.0", - "deno": ">=2.0.0", - "node": ">=12.0.0" - }, - "funding": { - "type": "github", - "url": "https://github.com/mysqljs/sql-escaper?sponsor=1" + "node": ">= 0.6" } }, "node_modules/stable-hash": { diff --git a/package.json b/package.json index 0346ae32..5ed97826 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,6 @@ "overrides": { "deepmerge-ts": "8.0.1", "esbuild": "0.28.2", - "mysql2": "3.22.0", "playwright-core": "1.61.0", "next": { "postcss": "8.5.25",