feat(resilience): default the credential health check sweep to 60 minutes (#12138)

Validado em worktree combinada com typecheck limpo, testes focados verdes, gates de file-size/complexity/cognitive-complexity/cycles OK. Obrigado!
This commit is contained in:
Abhishek Divekar
2026-08-31 04:09:42 +05:30
committed by GitHub
parent ececf91e9e
commit 8a1d9bf910
3 changed files with 12 additions and 11 deletions

View File

@@ -129,7 +129,7 @@ export function resolveCredentialHealthSweepInterval(
const parsed = parseInt(envVal, 10);
if (!isNaN(parsed) && parsed >= 10_000) return parsed;
}
return 300_000; // default 5 min
return 3_600_000; // default 60 min
}
/**
@@ -142,7 +142,7 @@ function getSweepInterval(): number {
const parsed = parseInt(envVal, 10);
if (!isNaN(parsed) && parsed >= 10_000) return parsed;
}
return 300_000; // default 5 min
return 3_600_000; // default 60 min
}
/**

View File

@@ -184,10 +184,11 @@ export const DEFAULT_RESILIENCE_SETTINGS: ResilienceSettings = {
// default until an operator adds an override here.
providerQuotaOverrides: {},
// Global default cadence for the background credential health check sweep.
// 5 minutes preserves the pre-setting scheduler default (300 000 ms);
// 0 disables the sweep entirely. Per-connection overrides always win.
// 60 minutes: the sweep makes a real upstream probe against EVERY active
// connection, so the previous 5-minute default cost 12 requests/hour per
// connection. 0 disables the sweep entirely. Per-connection overrides win.
credentialHealthCheck: {
intervalMinutes: 5,
intervalMinutes: 60,
},
};