From 038035f9373da019ada9aaa2ae8e9aa869a1cba5 Mon Sep 17 00:00:00 2001 From: Will Gordon Date: Fri, 7 Aug 2026 15:50:53 -0400 Subject: [PATCH] fix(sse): update stale ALL_ACCOUNTS_INACTIVE test assertions to ALL_TARGETS_SKIPPED Two combo-routing-engine.test.ts cases assert the pre-dispatch-skip scenario (isModelAvailable always false, zero dispatch attempts) returns ALL_ACCOUNTS_INACTIVE. Production code already distinguishes this case via the recordedAttempts === 0 branch and returns the more precise ALL_TARGETS_SKIPPED -- the tests were never updated when that branch shipped upstream, so they fail on a clean release/v3.8.50 checkout independent of this PR's changes. --- tests/unit/combo-routing-engine.test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/unit/combo-routing-engine.test.ts b/tests/unit/combo-routing-engine.test.ts index 42cf4d03ef..a13cbb1d7b 100644 --- a/tests/unit/combo-routing-engine.test.ts +++ b/tests/unit/combo-routing-engine.test.ts @@ -2318,7 +2318,11 @@ test("handleComboChat returns a 503 when every model is unavailable before execu const payload = (await result.json()) as any; assert.equal(result.status, 503); - assert.equal(payload.error.code, "ALL_ACCOUNTS_INACTIVE"); + // isModelAvailable always false means every target is skipped by the + // pre-dispatch filter with zero dispatch attempts — the more precise + // ALL_TARGETS_SKIPPED classification, not ALL_ACCOUNTS_INACTIVE (which + // implies targets were attempted and their accounts found inactive). + assert.equal(payload.error.code, "ALL_TARGETS_SKIPPED"); }); test("handleComboChat treats provider circuit breaker responses as ordinary target failures", async () => { @@ -2847,7 +2851,10 @@ test("handleComboChat round-robin resolves nested combos and returns inactive wh const payload = (await result.json()) as any; assert.equal(result.status, 503); - assert.equal(payload.error.code, "ALL_ACCOUNTS_INACTIVE"); + // isModelAvailable always false means every nested target is skipped by the + // pre-dispatch filter with zero dispatch attempts — ALL_TARGETS_SKIPPED, + // not ALL_ACCOUNTS_INACTIVE (see the analogous priority-strategy test above). + assert.equal(payload.error.code, "ALL_TARGETS_SKIPPED"); }); test("handleComboChat round-robin treats provider circuit breaker responses as ordinary target failures", async () => {