Compare commits

...

1 Commits

Author SHA1 Message Date
Probe Test
f9ffdb2781 test(tail): retire stale i18n __MISSING__ repro + fix qianfan website URL
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.
2026-07-23 10:04:18 -03:00
2 changed files with 7 additions and 17 deletions

View File

@@ -29,11 +29,7 @@ function loadLocale(locale: string): Record<string, unknown> {
return JSON.parse(raw) as Record<string, unknown>;
}
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<string, unknown> = {
localUsageCommand: `${PLACEHOLDER_PREFIX}Run this command locally`,

View File

@@ -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);