release: v1.32.0 — hardening and scalability (#580)

* release: prepare v1.32.0

* test: stabilize water capture re-entry
This commit is contained in:
Marc-André Bombeck authored and GitHub committed 2026-07-22 04:14:15 +02:00
1 parent b01822be48
commit 62eb431d66
372 files changed
+25178 -8561

No files matched your search

@@ -52,6 +52,7 @@ import { GET } from "../route";
import { prisma } from "@/lib/db";
const userFind = prisma.user.findUnique as ReturnType<typeof vi.fn>;
const whoopFind = prisma.whoopConnection.findUnique as ReturnType<typeof vi.fn>;
type Entry = {
integration: string;
@@ -112,3 +113,29 @@ describe("/api/integrations/status — Polar/Oura fold (04-M2)", () => {
expect(polar.configured).toBe(false);
});
});
describe("/api/integrations/status — WHOOP identity ownership", () => {
beforeEach(() => {
vi.clearAllMocks();
userFind.mockResolvedValue({
whoopClientIdEncrypted: "id",
whoopClientSecretEncrypted: "secret",
});
});
it("reports an identity-cleared duplicate row as disconnected", async () => {
whoopFind.mockResolvedValue({
whoopUserId: null,
tokenExpiresAt: new Date(Date.now() + 3_600_000),
lastSyncedAt: null,
createdAt: new Date("2026-06-01T00:00:00Z"),
backfillCompletedAt: null,
});
const entries = await fetchEntries();
const whoop = entries.find((entry) => entry.integration === "whoop");
expect(whoop?.connected).toBe(false);
expect(whoop?.configured).toBe(true);
});
});