fix(sse): drain new-base reds surfaced on the merged tip (#11178, #11238, #11267)

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/<mod>.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
This commit is contained in:
Xiangzhe
2026-08-23 17:01:54 -03:00
parent 950855e168
commit 17f5e4e0e9
3 changed files with 12 additions and 1 deletions

View File

@@ -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,
}),
}

View File

@@ -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",

View File

@@ -61,6 +61,11 @@ function hasImporter(mod: string, roots: string[]): boolean {
new RegExp(`(?:import|require)\\s*\\(\\s*['""][^'"]+/db/${escaped}['"]`),
// dynamic template: import(`…/db/<mod>.ts`) — bin/cli/runtime.mjs uses template literals
new RegExp(`import\\s*\\(\`[^'"\`]+/db/${escaped}\\.ts\`\\)`),
// dynamic via file:// URL helper: import(projectFileUrl("…/db/<mod>.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 "./<mod>" or from "./<mod>"
new RegExp(`from\\s+['"]\\.\\.?/${escaped}['"]`),
];