From b2509bcd05558f084502640f8ef4e458b80e79e1 Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza Date: Sat, 22 Aug 2026 16:19:57 -0300 Subject: [PATCH] =?UTF-8?q?fix(release):=20drain=20v3.8.50=20base-reds=20?= =?UTF-8?q?=E2=80=94=20getTokenLimit=20contract,=20vi=20i18n=20parity,=20e?= =?UTF-8?q?slint=20gate=20(#9985)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Discriminated against the pure base tip (all three reproduced without any PR diff): (1) getTokenLimit test aligned to the contract changes of #8228/#11034 with the bluesminds 200k pin kept as the original guard; (2) Vietnamese translations completed for harImport*/omni-webhooks (upstream already carried equivalent translations — conflict resolved to base); (3) eslint gate fixed by typing the dynamic core imports in capture-critical-db-state.test.ts (no-explicit-any). 41/41 tests green, typecheck clean, eslint exit 0. --- .../fixes/release-v3850-basereds-tests-i18n.md | 1 + tests/unit/capture-critical-db-state.test.ts | 9 +++++---- tests/unit/context-manager.test.ts | 13 +++++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 changelog.d/fixes/release-v3850-basereds-tests-i18n.md diff --git a/changelog.d/fixes/release-v3850-basereds-tests-i18n.md b/changelog.d/fixes/release-v3850-basereds-tests-i18n.md new file mode 100644 index 0000000000..3a6dee61b9 --- /dev/null +++ b/changelog.d/fixes/release-v3850-basereds-tests-i18n.md @@ -0,0 +1 @@ +- fix(i18n): complete Vietnamese translations for recently added UI strings (#9985) diff --git a/tests/unit/capture-critical-db-state.test.ts b/tests/unit/capture-critical-db-state.test.ts index 0194b5c92f..fcf2a017b7 100644 --- a/tests/unit/capture-critical-db-state.test.ts +++ b/tests/unit/capture-critical-db-state.test.ts @@ -6,12 +6,13 @@ import path from "node:path"; // Shared across all tests — the module caches DATA_DIR / SQLITE_FILE at load time, // so we must create the temp dir and import exactly once. +type CoreModule = typeof import("../../src/lib/db/core.ts"); let tempDir: string; let originalDataDir: string | undefined; -let getDbInstance: any; -let resetDbInstance: any; -let ensureDbInitialized: any; -let closeDbInstance: any; +let getDbInstance: CoreModule["getDbInstance"]; +let resetDbInstance: CoreModule["resetDbInstance"]; +let ensureDbInitialized: CoreModule["ensureDbInitialized"]; +let closeDbInstance: CoreModule["closeDbInstance"]; before(async () => { tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "omniroute-db-test-")); diff --git a/tests/unit/context-manager.test.ts b/tests/unit/context-manager.test.ts index 776a3cdc25..de95d5b6f2 100644 --- a/tests/unit/context-manager.test.ts +++ b/tests/unit/context-manager.test.ts @@ -75,10 +75,15 @@ for (const modelId of HYPERAGENT_FALLBACK_MODEL_IDS) { } test("getTokenLimit: does not force 1M onto non-hyperagent providers serving the same model ids", () => { - // windsurf declares an explicit per-model contextLength of 200000 for this exact id — - // a provider-unscoped substring match on "claude-opus-4" would have clobbered it to 1M. - assert.equal(getTokenLimit("windsurf", "claude-opus-4.7-max"), 200000); - // bluesminds likewise pins its own claude-opus-4-5 entry to 200000. + // windsurf used to pin this exact id at 200000, but its built-in provider entry was + // retired (#8228 — replaced by devin-desktop). With no per-provider source left, + // #11034 resolves the effort-suffixed variant via its BASE model (`claude-opus-4.7-max` + // → `claude-opus-4.7` → canonical `claude-opus-4-7`), whose real catalog window IS 1M. + // This is a legitimate base-model resolution, not the forbidden hyperagent default leak: + // it comes from the shared model catalog, never from the hyperagent registry scope. + assert.equal(getTokenLimit("windsurf", "claude-opus-4.7-max"), 1_000_000); + // bluesminds still pins its own claude-opus-4-5 entry to 200000, and that pin must win + // over both the name heuristic and any 1M window from sibling providers/catalogs. assert.equal(getTokenLimit("bluesminds", "claude-opus-4-5"), 200000); });