From 17f5e4e0e99cac7541222b4d9299dec03b5ef32d Mon Sep 17 00:00:00 2001 From: Xiangzhe Date: Sun, 23 Aug 2026 17:01:54 -0300 Subject: [PATCH] fix(sse): drain new-base reds surfaced on the merged tip (#11178, #11238, #11267) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three reds the PR's CI surfaced after the base advanced past the branch cut — each discriminated with its origin PR: 1. chatcore-translation-paths 'Combo skip behavior' (shard 3/4) — REAL BUG in #11178: the incompatible-reasoning action derivation switched from the explicit fallback config to isComboStep = Boolean(comboStepId || comboExecutionKey). Combos whose records carry no explicit stepId/executionKey (plain model-list combos) had their explicit reasoningTransportFallback: 'skip' config silently degraded to 'drop', contradicting the PR's own stated intent ('combos keep their explicit strategy'). Fix: isComboStep now honors the isCombo marker (isCombo || step ids present). RED->GREEN on the exact CI failing test; the #10959 single-target drop defaults stay green. 2. check-db-rules-classification 'recovery zero importers' (shard 1/4) — STALE GATE, not dead code: #11238 converted bin/cli/runtime.mjs dynamic imports to the Windows-safe projectFileUrl('...') idiom, and the gate's importer regexes only recognized static/from/template import forms. recovery's only importer became invisible. Fix: gate pattern set extended to recognize import(projectFileUrl('…/db/.ts')). 3. mutation-test-coverage gate — #11267 added tests/unit/quota-exhaustion-cutoff-opencode.test.ts covering src/sse/services/auth.ts without registering it in stryker.conf.json tap.testFiles. Fix: register it (gate green locally). Refs #9985 --- open-sse/handlers/chatCore.ts | 7 ++++++- stryker.conf.json | 1 + tests/unit/check-db-rules-classification.test.ts | 5 +++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/open-sse/handlers/chatCore.ts b/open-sse/handlers/chatCore.ts index 10e6c32ae6..07e3a25857 100644 --- a/open-sse/handlers/chatCore.ts +++ b/open-sse/handlers/chatCore.ts @@ -1218,7 +1218,12 @@ export async function handleChatCore({ credentials?.providerSpecificData?.preserveEncryptedReasoning === true, onIncompatibleReasoning: resolveIncompatibleReasoningAction({ reasoningTransportFallback, - isComboStep: Boolean(comboStepId || comboExecutionKey), + // #11178 regressed combo steps whose combo record carries no explicit + // stepId/executionKey (plain model-list combos): their explicit + // `reasoningTransportFallback: "skip"` config was silently degraded to + // "drop". `isCombo` is the combo marker; step ids are optional + // finer-grained metadata that plain combos never set. + isComboStep: Boolean(isCombo) || Boolean(comboStepId || comboExecutionKey), headers: clientRawRequest?.headers ?? null, }), } diff --git a/stryker.conf.json b/stryker.conf.json index 33428a46da..f039eeaca8 100644 --- a/stryker.conf.json +++ b/stryker.conf.json @@ -307,6 +307,7 @@ "tests/unit/public-client-ids-3493.test.ts", "tests/unit/publicCreds.test.ts", "tests/unit/qoder-oauth-config.test.ts", + "tests/unit/quota-exhaustion-cutoff-opencode.test.ts", "tests/unit/quota-groups-route.test.ts", "tests/unit/quota-key-models-route.test.ts", "tests/unit/quota-policy-generalization.test.ts", diff --git a/tests/unit/check-db-rules-classification.test.ts b/tests/unit/check-db-rules-classification.test.ts index 5707878b8a..82ca183f0f 100644 --- a/tests/unit/check-db-rules-classification.test.ts +++ b/tests/unit/check-db-rules-classification.test.ts @@ -61,6 +61,11 @@ function hasImporter(mod: string, roots: string[]): boolean { new RegExp(`(?:import|require)\\s*\\(\\s*['""][^'"]+/db/${escaped}['"]`), // dynamic template: import(`…/db/.ts`) — bin/cli/runtime.mjs uses template literals new RegExp(`import\\s*\\(\`[^'"\`]+/db/${escaped}\\.ts\`\\)`), + // dynamic via file:// URL helper: import(projectFileUrl("…/db/.ts")) — + // bin/cli/runtime.mjs since #11238 (Windows-safe file:// dynamic imports). + new RegExp( + `import\\s*\\(\\s*projectFileUrl\\(\\s*['""][^'"]+/db/${escaped}\\.ts['"]\\s*\\)\\s*\\)` + ), // relative import within db/: from "./" or from "./" new RegExp(`from\\s+['"]\\.\\.?/${escaped}['"]`), ];