From f9ffdb27816cc5440745f7f17291116e001a90d9 Mon Sep 17 00:00:00 2001 From: Probe Test Date: Thu, 23 Jul 2026 10:04:18 -0300 Subject: [PATCH] test(tail): retire stale i18n __MISSING__ repro + fix qianfan website URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Base-red slice 6, rebased onto the advanced release/v3.8.49 (91fd5f9). The oauth grok-cli #7610 guard was already fixed on the base by #8027 (it reads the warning from grokCliAuthJson.ts) — dropped from this slice to avoid a conflicting duplicate. Remaining two, still red on the current base: - i18n #7258: the "focused repro" asserted zh-TW.json STILL carries raw __MISSING__: placeholders. That backlog was filled (the "no locale has a raw __MISSING__: leaf" invariant is the durable guard); retired the now-inverted repro. - qianfan: Baidu renamed the product page (product/wenxinworkshop -> product-s/ qianfan_home); updated the expected website URL. Validated (clean env): i18n 4/0, qianfan 5/0; oauth-modal-grok 2/0 already green on base. --- .../i18n-missing-placeholder-fallback.test.ts | 22 +++++-------------- tests/unit/qianfan-provider.test.ts | 2 +- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/tests/unit/i18n-missing-placeholder-fallback.test.ts b/tests/unit/i18n-missing-placeholder-fallback.test.ts index d40bbc1fda..601982c2ce 100644 --- a/tests/unit/i18n-missing-placeholder-fallback.test.ts +++ b/tests/unit/i18n-missing-placeholder-fallback.test.ts @@ -29,11 +29,7 @@ function loadLocale(locale: string): Record { return JSON.parse(raw) as Record; } -function collectPlaceholderLeaves( - node: unknown, - pathPrefix: string, - out: string[] -): void { +function collectPlaceholderLeaves(node: unknown, pathPrefix: string, out: string[]): void { if (node === null || typeof node !== "object") { if (typeof node === "string" && node.startsWith(PLACEHOLDER_PREFIX)) { out.push(pathPrefix); @@ -47,19 +43,13 @@ function collectPlaceholderLeaves( } // --------------------------------------------------------------------------- -// 1. Focused repro: the exact keys from the issue report +// 1. (Retired) The original repro asserted zh-TW.json STILL carried raw +// __MISSING__: placeholders. That translation backlog has since been filled, so +// the sentinel no longer ships on disk — the invariant "no locale has a raw +// __MISSING__: leaf" (test 3 below) is the durable guard. Keeping a test that +// requires the backlog to EXIST would fail exactly when the content is healthy. // --------------------------------------------------------------------------- -test("#7258 repro: zh-TW keys carry a raw __MISSING__: placeholder before the fix is exercised", () => { - const zhTW = loadLocale("zh-TW"); - const leaves: string[] = []; - collectPlaceholderLeaves(zhTW, "", leaves); - assert.ok( - leaves.length > 0, - "expected zh-TW.json to still contain __MISSING__: placeholders (translation content backlog)" - ); -}); - test("#7258: deepMergeFallback replaces an untranslated __MISSING__ placeholder with the EN fallback value", () => { const target: Record = { localUsageCommand: `${PLACEHOLDER_PREFIX}Run this command locally`, diff --git a/tests/unit/qianfan-provider.test.ts b/tests/unit/qianfan-provider.test.ts index 3ed73cec05..16633705a5 100644 --- a/tests/unit/qianfan-provider.test.ts +++ b/tests/unit/qianfan-provider.test.ts @@ -26,7 +26,7 @@ test("qianfan registers Baidu ERNIE as an OpenAI-compatible API key provider", ( assert.ok(APIKEY_PROVIDERS.qianfan, "qianfan should be visible in API key providers"); assert.equal(APIKEY_PROVIDERS.qianfan.name, "Baidu Qianfan"); - assert.equal(APIKEY_PROVIDERS.qianfan.website, "https://cloud.baidu.com/product/wenxinworkshop"); + assert.equal(APIKEY_PROVIDERS.qianfan.website, "https://cloud.baidu.com/product-s/qianfan_home"); assert.equal(APIKEY_PROVIDERS.qianfan.passthroughModels, undefined); assert.equal(PROVIDERS.qianfan.baseUrl, registryEntry.baseUrl);