From 69de37c4c3f44de2b867119d6f1ef2f310a550ea Mon Sep 17 00:00:00 2001 From: Will Gordon Date: Sat, 8 Aug 2026 09:59:34 -0400 Subject: [PATCH] chore(tests): drop explanatory comments on ALL_TARGETS_SKIPPED assertions Kept the assertion value fix (ALL_ACCOUNTS_INACTIVE -> ALL_TARGETS_SKIPPED); the comments were unnecessary. Reverts the file-size baseline bump these comments caused (combo-routing-engine.test.ts back to its original 3457). --- config/quality/file-size-baseline.json | 3 +-- tests/unit/combo-routing-engine.test.ts | 7 ------- tests/unit/t23-t24-fallback-resilience.test.ts | 4 ---- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/config/quality/file-size-baseline.json b/config/quality/file-size-baseline.json index 9d496b81f6..fe16cc8abc 100644 --- a/config/quality/file-size-baseline.json +++ b/config/quality/file-size-baseline.json @@ -1,5 +1,4 @@ { - "_rebaseline_2026_08_08_9619_own_comment_growth": "PR #9619's own follow-up commit (58ab721fe/15b9cb194): tests/unit/combo-routing-engine.test.ts 3457->3464 (+7) is this PR's own growth — explanatory comment blocks added alongside the ALL_ACCOUNTS_INACTIVE->ALL_TARGETS_SKIPPED stale-assertion fix (matching the identical fix applied to #9173/#9006/#8909 the same day; upstream's own test was never updated when the recordedAttempts===0 pre-dispatch-skip branch shipped). Caught by CI's PR-mode check:file-size (--base-ref) after the fix commit; missed locally because check-file-size.mjs was not re-run after that specific edit.", "_rebaseline_2026_08_07_9619_reconcile_onto_tip": "PR #9619 (fix/basered-changelog-integrity-fabricated-docs) rebase-onto-tip reconciliation. 10 files + 1 test file grew via already-merged release/v3.8.50 PRs since this branch's creation, none touched by this PR's own diff: open-sse/mcp-server/server.ts 1411->1444, open-sse/services/accountFallback.ts 1972->1978, src/app/(dashboard)/dashboard/combos/page.tsx 4647->4703, src/app/(dashboard)/dashboard/providers/[id]/components/modals/EditConnectionModal.tsx 1316->1324, src/app/api/providers/[id]/models/route.ts 2250->2304, src/app/api/v1/models/catalog.ts 1549->1556, src/lib/tokenHealthCheck.ts 1021->1053, src/lib/db/core.ts 1637->1639, src/sse/handlers/chat.ts 1877->1878, tests/unit/translator-openai-to-gemini.test.ts 1619->1622. open-sse/mcp-server/schemas/tools.ts 1505->1553 is new growth not previously tracked. Same root cause as every other entry in this chain: fast-gates PR->release does not run check:file-size. No offending branch left to fix.", "_rebaseline_2026_08_02_9259_rolling_rpm": "PR #9259 (issue #8733) own growth: open-sse/services/rateLimitManager.ts baseline 1060->1167 (+107; final source 1153). The existing withRateLimit chokepoint now composes process-local rolling RPM leases with Bottleneck admission, releases pre-dispatch leases on queue timeout/abort/connection disable, preserves caller abort reasons, and wires 429/header state into the extracted rollingRpmGate.ts. The remaining growth is irreducible lifecycle wiring at the dispatch boundary plus the real watchdog test hooks needed to verify queued-wedge recovery; moving it further would obscure lease ownership and Bottleneck cleanup. Covered by the focused rate-limit manager/sliding-window suite (33/33); distributed multi-instance coordination remains explicitly out of scope.", "_rebaseline_2026_07_24_8470_hyperagent_sticky_thread": "PR #8470 (artickc, fix/hyperagent-tool-loop-thread-sticky) own growth: open-sse/executors/hyperagent.ts 936->1025 (wc -l; check-file-size.mjs counts via split(\"\\n\").length so the gate sees 937->1026, +89, crosses the 1000 cap). Fixes a real bug where a reverse-conversion proxy (text-Intent/JSON to Claude Code native tool_calls) rewrites assistant messages between agentic tool-loop turns, breaking HyperAgent’s conversation-prefix fingerprint and cold-starting the thread mid tool-loop. Adds Anthropic tool_use/tool_result flattening to extractMessageText() plus a new rootUserFingerprint()/root-key lookup tier in resolveHyperAgentThreadBinding()/storeHyperAgentThreadAfterTurn() so the thread stays sticky across the tool loop. Cohesive additions inside the existing single-file executor; not extractable without splitting the executor mid-request-flow. Covered by tests/unit/executor-hyperagent.test.ts (19/19, +5 new cases for tool_result/tool_use flattening + root-key stickiness). Pre-merge review flagged a cross-conversation root-key collision risk (tracked in the PR’s own mandatory pre-merge checklist, not yet addressed) — unrelated to this file-size ratchet, tracked separately by /fix-prs.", @@ -363,7 +362,7 @@ "tests/unit/cc-compatible-provider.test.ts": 1217, "tests/unit/chatcore-translation-paths.test.ts": 2876, "tests/unit/chatgpt-web.test.ts": 3148, - "tests/unit/combo-routing-engine.test.ts": 3464, + "tests/unit/combo-routing-engine.test.ts": 3457, "tests/unit/db-migration-runner.test.ts": 1499, "tests/unit/deepseek-web.test.ts": 1092, "tests/unit/executor-codex.test.ts": 1339, diff --git a/tests/unit/combo-routing-engine.test.ts b/tests/unit/combo-routing-engine.test.ts index a13cbb1d7b..e3f71e8052 100644 --- a/tests/unit/combo-routing-engine.test.ts +++ b/tests/unit/combo-routing-engine.test.ts @@ -2318,10 +2318,6 @@ test("handleComboChat returns a 503 when every model is unavailable before execu const payload = (await result.json()) as any; assert.equal(result.status, 503); - // 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"); }); @@ -2851,9 +2847,6 @@ test("handleComboChat round-robin resolves nested combos and returns inactive wh const payload = (await result.json()) as any; assert.equal(result.status, 503); - // 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"); }); diff --git a/tests/unit/t23-t24-fallback-resilience.test.ts b/tests/unit/t23-t24-fallback-resilience.test.ts index 22f9c5d7da..f0f51d30a2 100644 --- a/tests/unit/t23-t24-fallback-resilience.test.ts +++ b/tests/unit/t23-t24-fallback-resilience.test.ts @@ -148,10 +148,6 @@ test("T24: all inactive accounts return 503 service_unavailable (not 406)", asyn assert.equal(result.status, 503); const body = (await result.json()) as any; - // 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(body.error?.code, "ALL_TARGETS_SKIPPED"); });