From 368eb44439bcc31ec2f88e43d1cbbfd25c33ca26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sat, 1 Aug 2026 11:59:29 +0200 Subject: [PATCH] Point the score-config contract test at the pillar list that survived Two branches met here. One retired the fitness pillar and renamed the test's pillar list accordingly; the other, written against the eight-pillar world, referred to it by its old name and its old count. The merge kept the new declaration and the old references, so nothing compiled. The name carried the count, which is why the collision was visible at all. There are seven now. --- .../api/auth/me/health-score-config/__tests__/route.test.ts | 6 +++--- src/lib/analytics/score/types.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/api/auth/me/health-score-config/__tests__/route.test.ts b/src/app/api/auth/me/health-score-config/__tests__/route.test.ts index a02746236..ae1f5db38 100644 --- a/src/app/api/auth/me/health-score-config/__tests__/route.test.ts +++ b/src/app/api/auth/me/health-score-config/__tests__/route.test.ts @@ -455,10 +455,10 @@ describe("the published contract matches what the route serves", () => { // Body that fails validation. await record({ pillars: ["NOT_A_PILLAR"] }); // Present-but-unparseable base token. - await record({ pillars: ALL_EIGHT, baseUpdatedAt: null }); + await record({ pillars: ALL_PILLARS, baseUpdatedAt: null }); // Stale base token. await record( - { pillars: ALL_EIGHT, baseUpdatedAt: "2026-07-24T08:00:00.000Z" }, + { pillars: ALL_PILLARS, baseUpdatedAt: "2026-07-24T08:00:00.000Z" }, true, ); return byStatus; @@ -506,7 +506,7 @@ describe("the published contract matches what the route serves", () => { vi.mocked(prisma.user.updateMany).mockResolvedValue({ count: 1 } as never); const res = await (PATCH as (r: Request) => Promise)( - mkPatch({ pillars: ALL_EIGHT }), + mkPatch({ pillars: ALL_PILLARS }), ); const env = (await res.json()) as { data: ResolvedBody }; expect(res.status).toBe(200); diff --git a/src/lib/analytics/score/types.ts b/src/lib/analytics/score/types.ts index e958263ce..e9ce9f3b7 100644 --- a/src/lib/analytics/score/types.ts +++ b/src/lib/analytics/score/types.ts @@ -22,7 +22,7 @@ export const SCORE_VERSION = 3 as const; /** * The pillars a score can be built from. * - * v1.35.1 — FITNESS is gone. The schema records VO₂max but cannot tell a + * v1.35.2 — FITNESS is gone. The schema records VO₂max but cannot tell a * measured test apart from a device estimate, so every FITNESS row * reached the scorer unproven and was refused: the pillar had never once * produced a value on any account. A pillar that cannot score is not a