From b1d58c516e15df04d66c0a6e4d113e65e312bc4c Mon Sep 17 00:00:00 2001 From: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Date: Fri, 11 Sep 2026 18:32:45 -0300 Subject: [PATCH] chore(quality): clear the file-size and stryker gates for the base-red sweep - stryker.conf.json: register three covering tests that drifted out of tap.testFiles on the base tip (combo-predicates-epoch-cooldown, opencode-400-model-unavailable, chat-correlation-id-exhaustion). Reproduced on the clean tip, so this is inherited drift, not this branch's. - file-size: models-catalog-route.test.ts was already at its frozen ceiling, so the one-line CATALOG_BUILD_TIMEOUT_MS pin cannot be absorbed. Comment trimmed to a single trailing note and testFrozen bumped 1652 -> 1653 with the rationale recorded in the baseline. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --- config/quality/file-size-baseline.json | 3 ++- stryker.conf.json | 3 +++ tests/unit/models-catalog-route.test.ts | 9 +-------- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/config/quality/file-size-baseline.json b/config/quality/file-size-baseline.json index f855229516..618b6f5e82 100644 --- a/config/quality/file-size-baseline.json +++ b/config/quality/file-size-baseline.json @@ -1,4 +1,5 @@ { + "_rebaseline_2026_09_11_12732_catalog_timeout_pin": "+1 in tests/unit/models-catalog-route.test.ts (1652->1653) for a single line: process.env.CATALOG_BUILD_TIMEOUT_MS. #12627 bounds a cold catalog build at 8s; beforeEach resets the catalog cache so every case in this file pays a cold build, and a tsx runner needs 10-13s under load — the file returned catalog_build_timeout instead of rows and oscillated between 1 and 10 failures per run, reddening the whole PR queue (base-red #12732). The bound itself stays covered by tests/unit/12627-catalog-inflight-timeout.test.ts. The file is already at its frozen ceiling, so the pin cannot be absorbed; structural shrink tracked in #3501.", "_rebaseline_2026_09_10_12975_rotation_correlation_id": "PR #12975 own growth: open-sse/executors/base.ts 1751->1753 (+2) and open-sse/handlers/chatCore.ts 6021->6024 (+3). The opencode rotation lines carry the request correlationId: one optional ExecuteInput field and one correlationId argument at each of the three executor.execute call sites in handleChatCore. Irreducible plumbing at existing call sites; the rotation logic itself lives in open-sse/executors/opencode.ts and the new leaf predicates (under cap). Covered by tests/unit/opencode-transient-rotation.test.ts and tests/unit/chat-correlation-id-exhaustion.test.ts.", "_rebaseline_2026_09_11_mergebatch_v3851_maxmad_opencode": "/merge-batch 2026-09-11 (v3.8.51), PRs #13141, #13146 and #12975 by maxmad64bis. src/sse/services/auth.ts 3450->3488 (+38): #13146 adds the narrow ruleScope===model branch to markAccountUnavailable (gated on status 400; every other status keeps its path) plus the HONORS_RULE_LOCK_SCOPE_PROVIDERS opencode entry, taking it to 3464; #12975 then adds buildExhaustionOptions so the exhaustion log lines carry the request correlationId (+24). open-sse/services/accountFallback.ts 2467->2468 (+1): #13141 routes hasFutureRateLimitUntil through the tolerant epoch normalizer; #13146 is net zero there (+16/-16). open-sse/executors/base.ts 1751->1753 (+2): #12975 adds the optional ExecuteInput.correlationId field with its doc comment. src/sse/handlers/chat.ts is NOT rebaselined: #12975 threads correlationId through the three executor call sites (+2) but the file lands at 2452, still under its existing 2458 freeze. open-sse/utils/stream.ts is deliberately NOT rebaselined either: it is already 3115 > 3098 on the pure tip with zero contribution from this batch (base-red #12732, owned by /sweep-reds). No new branching beyond the two guarded branches named above. Covered by tests/unit/combo-predicates-epoch-cooldown.test.ts, opencode-400-model-unavailable.test.ts, agentrouter-error-rules.test.ts, opencode-transient-rotation.test.ts and chat-correlation-id-exhaustion.test.ts.", "_rebaseline_2026_09_10_mergebatch_v3851_greenpt_eurouter": "/merge-batch 2026-09-10 (v3.8.51), PRs #13024 (GreenPT, closes #12986) and #13025 (EURouter, closes #12985) by ntdatt812: src/shared/constants/providers/apikey/gateways.ts 1462->1502 (+40 = two APIKEY_PROVIDERS_GATEWAYS catalog entries, declarative data only: id/alias/name/icon/color/website plus the hasFree=false rationale comments and the apiHint copy each PR verified). No logic and no new branching. Same god-file no-split rationale as every prior gateways.ts rebaseline (#11786 seekai, #10987 logfare, #10668 tabitoken, #10531 freebuff, #11631 1min.ai): the file header says it is pure data merged by apikey/index.ts via spread, and it is already split into 6 family files under apikey/, so splitting a catalog for two entries would violate the semantic-families rule rather than help. Both entries are deliberately conservative (models: [] with passthroughModels, no tool/vision capability declared, hasFree false), so the growth is the entry itself, not claims. EURouter is in AGGREGATOR_PROVIDER_IDS because it routes to third-party upstreams; GreenPT is not because it serves its own inference. Covered by tests/unit/greenpt-provider.test.ts and tests/unit/eurouter-provider.test.ts.", @@ -232,7 +233,7 @@ "tests/unit/executor-default-base.test.ts": 1632, "tests/unit/grok-web.test.ts": 2985, "tests/unit/image-generation-handler.test.ts": 2133, - "tests/unit/models-catalog-route.test.ts": 1652, + "tests/unit/models-catalog-route.test.ts": 1653, "tests/unit/perplexity-web.test.ts": 1384, "tests/unit/provider-models-route.test.ts": 1783, "tests/unit/provider-validation-specialty.test.ts": 2912, diff --git a/stryker.conf.json b/stryker.conf.json index e09883155f..de2702eec3 100644 --- a/stryker.conf.json +++ b/stryker.conf.json @@ -58,7 +58,9 @@ "tests/unit/account-fallback-retry-after-json.test.ts", "tests/unit/account-fallback-route-restriction-403.test.ts", "tests/unit/account-fallback-service.test.ts", + "tests/unit/chat-correlation-id-exhaustion.test.ts", "tests/unit/combo-pin-implicit-allowlist.test.ts", + "tests/unit/combo-predicates-epoch-cooldown.test.ts", "tests/unit/combo/execute-target-gates.test.ts", "tests/unit/moonshot-quota-writeback.test.ts", "tests/unit/accountfallback-ratelimit-400-4976.test.ts", @@ -78,6 +80,7 @@ "tests/unit/api-key-rotator-health.test.ts", "tests/unit/chat-routing-synced-inventory-11089.test.ts", "tests/unit/openai-compatible-per-upstream-402-health.test.ts", + "tests/unit/opencode-400-model-unavailable.test.ts", "tests/unit/quota-window-label.test.ts", "tests/unit/repro-combo-persisted-cooldown-preskip.test.ts", "tests/unit/repro-glm-iso-reset-24h-cap.test.ts", diff --git a/tests/unit/models-catalog-route.test.ts b/tests/unit/models-catalog-route.test.ts index 9fc3584a2d..ef03c3017c 100644 --- a/tests/unit/models-catalog-route.test.ts +++ b/tests/unit/models-catalog-route.test.ts @@ -7,14 +7,7 @@ import path from "node:path"; const TEST_DATA_DIR = fs.mkdtempSync(path.join(os.tmpdir(), "omniroute-model-catalog-")); process.env.DATA_DIR = TEST_DATA_DIR; process.env.API_KEY_SECRET = process.env.API_KEY_SECRET || "catalog-test-secret"; -// #12627 bounds a cold catalog build at 8s and, with no last-good response to fall -// back on, surfaces `catalog_build_timeout` as an error body — no `data` array. That -// bound is sized for a warm production process; a tsx-transpiled test runner building -// the full 500+ model catalog from a fresh SQLite file on a loaded CI box crosses it -// (10-13s observed), which turned the assertions below into a load-dependent flake. -// Raise it here so these cases test catalog CONTENT; the timeout behavior itself is -// covered by tests/unit/12627-catalog-inflight-timeout.test.ts. -process.env.CATALOG_BUILD_TIMEOUT_MS = process.env.CATALOG_BUILD_TIMEOUT_MS || "120000"; +process.env.CATALOG_BUILD_TIMEOUT_MS = process.env.CATALOG_BUILD_TIMEOUT_MS || "120000"; // #12627 bound flakes a cold tsx build; 12627-catalog-inflight-timeout owns it const core = await import("../../src/lib/db/core.ts"); const providersDb = await import("../../src/lib/db/providers.ts");