Compare commits

...

3 Commits

Author SHA1 Message Date
diegosouzapw
889a898e51 test(sse): align turn-pin suites to the provider-cooldown window gate
The two native-codex-turn-pin suites landed via the #10379 merge wave after
PR #12247 forked, so #12247's green CI never saw them: they set up 'provider
in global cooldown' with a single recordProviderCooldown call, the pre-#12247
contract. Since the window gate, a provider only counts as cooling after
providerFailureThreshold failures inside the window — the setup now loops to
the profile threshold (same alignment the tracker's own legacy suite got in
Sibling sweep: all 7 suites touching recordProviderCooldown pass (60/60).
2026-09-01 02:13:22 -03:00
diegosouzapw
eb41a5d48a style: prettier pass on stryker.conf.json 2026-09-01 02:11:22 -03:00
diegosouzapw
56ae688113 chore(quality): register native-codex-turn-pin tests in stryker tap.testFiles
The mutation-test-coverage gate (--strict) fails on the release tip: the two
native-codex-turn-pin suites (#10379 merge wave) cover open-sse turn-pin code
and src/shared/utils/circuitBreaker.ts but were not listed in
stryker.conf.json tap.testFiles, so their mutant kills would not count. Adds
both files; the gate now passes clean (4728 test files scanned, no drift).
2026-09-01 02:11:22 -03:00
3 changed files with 16 additions and 4 deletions

View File

@@ -406,7 +406,9 @@
"tests/unit/felo-web-runtime-block.test.ts",
"tests/unit/microsoft-designer-web-runtime-block.test.ts",
"tests/unit/qwen-web-runtime-block.test.ts",
"tests/unit/tunnel-routes-error-sanitization.test.ts"
"tests/unit/tunnel-routes-error-sanitization.test.ts",
"tests/unit/native-codex-turn-pin-10379.test.ts",
"tests/unit/native-codex-turn-pin-model-scoped-fallback.test.ts"
],
"nodeArgs": [
"--import",

View File

@@ -20,6 +20,7 @@ const { getCircuitBreaker, resetAllCircuitBreakers } =
await import("../../src/shared/utils/circuitBreaker.ts");
const { recordProviderCooldown, clearCooldownState } =
await import("../../open-sse/services/providerCooldownTracker.ts");
const { PROVIDER_PROFILES } = await import("../../open-sse/config/constants.ts");
const { resolveResilienceSettings } = await import("../../src/lib/resilience/settings.ts");
const BODY = {
@@ -222,9 +223,13 @@ test("isPinnedTargetModelScopedUnusable distinguishes model lockout from provide
false
);
// Reset breaker, test provider cooldown
// Reset breaker, test provider cooldown. Since #12247 the global provider
// cooldown honors the PROVIDER_PROFILES window gate: the provider only counts
// as cooling after providerFailureThreshold failures inside the window.
cb.reset();
recordProviderCooldown("antigravity", undefined, resilienceSettings);
for (let i = 0; i < PROVIDER_PROFILES.oauth.providerFailureThreshold; i++) {
recordProviderCooldown("antigravity", undefined, resilienceSettings);
}
assert.equal(
await isPinnedTargetModelScopedUnusable({
target,

View File

@@ -19,6 +19,7 @@ const {
} = await import("../../open-sse/services/combo/nativeCodexTurnPin.ts");
const { recordProviderCooldown, isProviderInCooldown, clearCooldownState } =
await import("../../open-sse/services/providerCooldownTracker.ts");
const { PROVIDER_PROFILES } = await import("../../open-sse/config/constants.ts");
const { getCircuitBreaker, resetAllCircuitBreakers } =
await import("../../src/shared/utils/circuitBreaker.ts");
const { resolveResilienceSettings } = await import("../../src/lib/resilience/settings.ts");
@@ -403,7 +404,11 @@ describe("Native Codex Turn Pin model-scoped fallback", () => {
allCombos: null,
});
recordProviderCooldown("antigravity", undefined, settings);
// #12247: the window gate needs providerFailureThreshold failures before
// the whole provider counts as cooling.
for (let i = 0; i < PROVIDER_PROFILES.oauth.providerFailureThreshold; i++) {
recordProviderCooldown("antigravity", undefined, settings);
}
assert.equal(isProviderInCooldown("antigravity", undefined, settings), true);
const attempted: string[] = [];