test(SecurityService): update test case for complaint count thresholds to reflect new ceiling values

This commit is contained in:
Dries Augustyns
2026-05-22 20:20:45 +02:00
parent 4de40f40fa
commit 079e1879b3
@@ -137,10 +137,9 @@ describe('SecurityService', () => {
}); });
it('should NOT trigger on high absolute complaint count when rate is healthy', async () => { it('should NOT trigger on high absolute complaint count when rate is healthy', async () => {
// 20,000 emails, 50 complaints = 0.25% (above warning 0.075%, would have // 100,000 emails, 30 complaints = 0.03% (at warning floor, below critical 0.15%)
// tripped old absolute ceiling). With rate-only enforcement and rate // Old absolute ceiling (25 complaints in 7d critical) would have tripped.
// above warning but below critical, this is a warning, not a violation. await createEmails(100000, {complainedCount: 30});
await createEmails(20000, {complainedCount: 50});
const status = await SecurityService.getSecurityStatus(projectId); const status = await SecurityService.getSecurityStatus(projectId);
expect(status.shouldDisable).toBe(false); expect(status.shouldDisable).toBe(false);