From fc4423c93435b76d36c72ebb8370bc618e1464d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Fri, 16 Oct 2026 02:59:48 +0200 Subject: [PATCH] test(environment): stop asserting the readable location columns 0409 dropped The free-text backfill no longer seals home, period or day locations, so its summary has no counts for them, and a stored day has no readable lat left to be null. --- .../environment-air-quality-history.test.ts | 4 +++- .../free-text-encryption-backfill.test.ts | 23 ++----------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/tests/integration/environment-air-quality-history.test.ts b/tests/integration/environment-air-quality-history.test.ts index 249ecd696..26ef059c2 100644 --- a/tests/integration/environment-air-quality-history.test.ts +++ b/tests/integration/environment-air-quality-history.test.ts @@ -261,8 +261,10 @@ describe("air-quality history backfill", () => { source: "TRAVEL", pm25Mean: 12, tempMax: 5, - lat: null, }); + // The place lives only in the sealed copy; migration 0409 dropped the + // readable columns. + expect(byDate.get("2020-03-01")).not.toHaveProperty("lat"); expect( openLocation(byDate.get("2020-03-01")!.locationEncrypted!), ).toMatchObject({ lat: 51.5, lon: 7.0 }); diff --git a/tests/integration/free-text-encryption-backfill.test.ts b/tests/integration/free-text-encryption-backfill.test.ts index f35b9a577..1733c5130 100644 --- a/tests/integration/free-text-encryption-backfill.test.ts +++ b/tests/integration/free-text-encryption-backfill.test.ts @@ -126,6 +126,8 @@ describe("free-text encryption backfill (real Postgres)", () => { // The boot call is deferred past the startup storm. expect(first.sent.every((s) => s.startAfter === 180)).toBe(true); + // The summary carries no location counts: migration 0409 dropped the + // readable home, period and day locations, so there is nothing to seal. expect(await runFreeTextEncryptionBackfillForUser("ft-a")).toEqual({ conversationTitlesMigrated: 1, metricNotesMigrated: 0, @@ -133,9 +135,6 @@ describe("free-text encryption backfill (real Postgres)", () => { routeGeometriesMigrated: 0, appointmentAddressesCleared: 0, contactAuditRowsScrubbed: 0, - homeLocationsMigrated: 0, - travelLocationsMigrated: 0, - dayLocationsMigrated: 0, }); expect(await runFreeTextEncryptionBackfillForUser("ft-b")).toEqual({ conversationTitlesMigrated: 0, @@ -144,9 +143,6 @@ describe("free-text encryption backfill (real Postgres)", () => { routeGeometriesMigrated: 0, appointmentAddressesCleared: 0, contactAuditRowsScrubbed: 0, - homeLocationsMigrated: 0, - travelLocationsMigrated: 0, - dayLocationsMigrated: 0, }); const conversations = await prisma.coachConversation.findMany({ @@ -195,9 +191,6 @@ describe("free-text encryption backfill (real Postgres)", () => { routeGeometriesMigrated: 0, appointmentAddressesCleared: 0, contactAuditRowsScrubbed: 0, - homeLocationsMigrated: 0, - travelLocationsMigrated: 0, - dayLocationsMigrated: 0, }); }); @@ -282,9 +275,6 @@ describe("free-text encryption backfill (real Postgres)", () => { routeGeometriesMigrated: 0, appointmentAddressesCleared: 0, contactAuditRowsScrubbed: 0, - homeLocationsMigrated: 0, - travelLocationsMigrated: 0, - dayLocationsMigrated: 0, }); expect(await runFreeTextEncryptionBackfillForUser("pc-b")).toEqual({ conversationTitlesMigrated: 0, @@ -293,9 +283,6 @@ describe("free-text encryption backfill (real Postgres)", () => { routeGeometriesMigrated: 1, appointmentAddressesCleared: 0, contactAuditRowsScrubbed: 0, - homeLocationsMigrated: 0, - travelLocationsMigrated: 0, - dayLocationsMigrated: 0, }); const practitioners = await prisma.practitioner.findMany({ @@ -356,9 +343,6 @@ describe("free-text encryption backfill (real Postgres)", () => { routeGeometriesMigrated: 0, appointmentAddressesCleared: 0, contactAuditRowsScrubbed: 0, - homeLocationsMigrated: 0, - travelLocationsMigrated: 0, - dayLocationsMigrated: 0, }); }); @@ -456,9 +440,6 @@ describe("free-text encryption backfill (real Postgres)", () => { expect(summaryA).toMatchObject({ appointmentAddressesCleared: 1, contactAuditRowsScrubbed: 1, - homeLocationsMigrated: 0, - travelLocationsMigrated: 0, - dayLocationsMigrated: 0, }); await runFreeTextEncryptionBackfillForUser("ad-b");