diff --git a/src/selfhost/sentry.ts b/src/selfhost/sentry.ts index 7e427403f5..b4e96cd64d 100644 --- a/src/selfhost/sentry.ts +++ b/src/selfhost/sentry.ts @@ -109,7 +109,21 @@ const SENTRY_MONITORS: Record { expect(mocks.captureException).not.toHaveBeenCalled(); }); + it("gives orb-relay-drain a 6-minute checkin margin so a normal redeploy cycle doesn't false-positive as a missed check-in (LOOPOVER-12 regression)", async () => { + await initSentry({ + SENTRY_DSN: "d", + SENTRY_ENVIRONMENT: "prod", + } as unknown as NodeJS.ProcessEnv); + + await expect( + withSentryMonitor("orb-relay-drain", { jobType: "orb-relay-drain" }, async () => "ok"), + ).resolves.toBe("ok"); + + expect(mocks.captureCheckIn).toHaveBeenNthCalledWith( + 1, + { monitorSlug: "loopover-selfhost-prod-orb-relay-drain", status: "in_progress" }, + expect.objectContaining({ + schedule: { type: "interval", value: 1, unit: "minute" }, + checkinMargin: 6, + maxRuntime: 1, + failureIssueThreshold: 3, + recoveryThreshold: 1, + }), + ); + expect(mocks.captureException).not.toHaveBeenCalled(); + }); + it("records failed Sentry cron monitor check-ins with sanitized context", async () => { await initSentry({ SENTRY_DSN: "d",