mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 05:12:14 +00:00
test(ai): follow the retired Correlations switch and the closed default
The Coach gate inventory lists the correlations route with the routes no assistant switch owns. The seeded-question test gives the switch read a settings row, since a read that fails no longer opens every switch.
This commit is contained in:
1 parent
fccc44f7f1
commit
f434ba7d29
2 files changed
+6
-1
No files matched your search
@@ -41,7 +41,6 @@ const NON_COACH_GATED_ROUTES: ReadonlyArray<string> = [
|
||||
"src/app/api/insights/blood-pressure-status/route.ts",
|
||||
"src/app/api/insights/bmi-status/route.ts",
|
||||
"src/app/api/insights/cards/route.ts",
|
||||
"src/app/api/insights/correlations/route.ts",
|
||||
"src/app/api/insights/medication-compliance-status/route.ts",
|
||||
// v1.8.7.1 — generic per-HealthKit-metric assessment. Gated on the
|
||||
// same `insightStatus` sub-flag as the seven specialised status routes.
|
||||
@@ -65,6 +64,9 @@ const NOT_COACH_OWNED_ROUTES: ReadonlyArray<string> = [
|
||||
// prose. Disabling Coach must not break these reads — the user can
|
||||
// still inspect and reconfigure the chain that gets re-enabled.
|
||||
"src/app/api/insights/provider-chain/route.ts",
|
||||
// Correlation statistics: computed, never written by a model. The switch
|
||||
// that used to gate them was retired because it stopped no AI work.
|
||||
"src/app/api/insights/correlations/route.ts",
|
||||
"src/app/api/insights/settings/route.ts",
|
||||
// Read-only data feeds — `/targets` is a non-assistant Zielwerte
|
||||
// page driven by classifications, not LLM prose; the GLP-1 timeline
|
||||
|
||||
@@ -12,6 +12,9 @@ const findUniqueMock = vi.fn().mockResolvedValue({ notificationPrefs: null });
|
||||
vi.mock("@/lib/db", () => ({
|
||||
prisma: {
|
||||
user: { findUnique: (...args: unknown[]) => findUniqueMock(...args) },
|
||||
// No settings row: every assistant switch at its default (on). A switch
|
||||
// read that fails now fails closed, so the row has to be readable.
|
||||
appSettings: { findUnique: vi.fn().mockResolvedValue(null) },
|
||||
},
|
||||
}));
|
||||
|
||||
|
||||
Reference in new issue
Block a user