惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
爱范儿
爱范儿
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
Apple Machine Learning Research
Apple Machine Learning Research
云风的 BLOG
云风的 BLOG
量子位
博客园 - 三生石上(FineUI控件)
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
V2EX
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
Jina AI
Jina AI
L
LangChain Blog
M
MIT News - Artificial intelligence
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(ci): skip locale refresh on invalid provider auth · o...
vincentkoc · 2026-05-14 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -140,6 +140,7 @@ jobs:

140140

OPENCLAW_CONTROL_UI_I18N_PROVIDER: ${{ secrets.ANTHROPIC_API_KEY != '' && 'anthropic' || 'openai' }}

141141

OPENCLAW_CONTROL_UI_I18N_MODEL: ${{ secrets.ANTHROPIC_API_KEY != '' && 'claude-opus-4-6' || vars.OPENCLAW_CI_OPENAI_MODEL_BARE }}

142142

OPENCLAW_CONTROL_UI_I18N_THINKING: low

143+

OPENCLAW_CONTROL_UI_I18N_AUTH_OPTIONAL: "1"

143144

LOCALE: ${{ matrix.locale }}

144145

run: node --import tsx scripts/control-ui-i18n.ts sync --locale "${LOCALE}" --write

145146
Original file line numberDiff line numberDiff line change

@@ -19,7 +19,7 @@ Docs: https://docs.openclaw.ai

1919

- Canvas: return not found for malformed percent-encoded Canvas/A2UI/document asset paths and keep decoded parent traversal blocked before path normalization.

2020

- Telegram: allow trusted local Bot API media files whose filenames start with dots instead of falling back to remote download.

2121

- Agents/Codex app-server: remap injected context files under dot-dot-prefixed workspace directories when a run switches to an effective sandbox workspace.

22-

- Control UI/i18n: use the installed workspace pi runtime for locale refreshes, update the fallback package pin, and prefer the Anthropic CI provider when available, restoring the scheduled locale refresh workflow.

22+

- Control UI/i18n: use the installed workspace pi runtime for locale refreshes, update the fallback package pin, and skip scheduled refreshes with invalid provider credentials instead of failing main.

2323

- Plugins: preserve installed package metadata and persisted registry freshness checks for plugin package paths under dot-dot-prefixed directories.

2424

- Agents: allow dot-dot-prefixed filenames such as `..note.txt` through sandbox FS bridge, remote sandbox reads, and apply_patch summaries without mistaking the name for parent traversal.

2525

- CLI/migrate: hide per-item source/plugin hints on non-conflicting Codex skill and plugin selection prompts, keeping the hint text reserved for rows that actually need attention. Thanks @sjf.

Original file line numberDiff line numberDiff line change

@@ -110,6 +110,7 @@ const ENV_PI_ARGS = "OPENCLAW_CONTROL_UI_I18N_PI_ARGS";

110110

const ENV_PI_PACKAGE_VERSION = "OPENCLAW_CONTROL_UI_I18N_PI_PACKAGE_VERSION";

111111

const ENV_BATCH_CHAR_BUDGET = "OPENCLAW_CONTROL_UI_I18N_BATCH_CHAR_BUDGET";

112112

const ENV_PROMPT_TIMEOUT = "OPENCLAW_CONTROL_UI_I18N_PROMPT_TIMEOUT";

113+

const ENV_AUTH_OPTIONAL = "OPENCLAW_CONTROL_UI_I18N_AUTH_OPTIONAL";

113114
114115

const LOCALE_ENTRIES: readonly LocaleEntry[] = [

115116

{ locale: "zh-CN", fileName: "zh-CN.ts", exportName: "zh_CN", languageKey: "zhCN" },

@@ -873,6 +874,21 @@ function isPromptTimeoutError(error: Error): boolean {

873874

return error.message.toLowerCase().includes("timed out");

874875

}

875876
877+

export function isProviderAuthError(error: Error): boolean {

878+

const message = error.message.toLowerCase();

879+

return (

880+

message.includes("401") ||

881+

message.includes("authentication_error") ||

882+

message.includes("incorrect api key") ||

883+

message.includes("invalid x-api-key")

884+

);

885+

}

886+
887+

function isProviderAuthOptional(): boolean {

888+

const raw = process.env[ENV_AUTH_OPTIONAL]?.trim().toLowerCase();

889+

return raw === "1" || raw === "true" || raw === "yes";

890+

}

891+
876892

function resolvePromptTimeoutMs(): number {

877893

const raw = process.env[ENV_PROMPT_TIMEOUT]?.trim();

878894

if (!raw) {

@@ -1553,6 +1569,18 @@ async function syncLocale(

15531569

});

15541570

}

15551571

}

1572+

} catch (error) {

1573+

const failure = error instanceof Error ? error : new Error(String(error));

1574+

if (isProviderAuthOptional() && isProviderAuthError(failure)) {

1575+

logProgress(`${localeLabel}: translation provider auth failed; skipping refresh`);

1576+

return {

1577+

changed: false,

1578+

fallbackCount: previousMeta?.fallbackKeys.length ?? 0,

1579+

locale: entry.locale,

1580+

wrote: false,

1581+

} satisfies SyncOutcome;

1582+

}

1583+

throw failure;

15561584

} finally {

15571585

await clientAccess.resetClient();

15581586

}

Original file line numberDiff line numberDiff line change

@@ -5,6 +5,7 @@ import { describe, expect, it } from "vitest";

55

import {

66

DEFAULT_PI_PACKAGE_VERSION,

77

findPlaceholderMismatches,

8+

isProviderAuthError,

89

resolveLocalPiCommand,

910

} from "../../scripts/control-ui-i18n.ts";

1011

@@ -75,3 +76,17 @@ describe("control-ui-i18n pi runtime resolution", () => {

7576

}

7677

});

7778

});

79+
80+

describe("control-ui-i18n provider auth errors", () => {

81+

it("recognizes OpenAI and Anthropic authentication failures", () => {

82+

expect(isProviderAuthError(new Error("401 Incorrect API key provided"))).toBe(true);

83+

expect(

84+

isProviderAuthError(

85+

new Error(

86+

'401 {"type":"error","error":{"type":"authentication_error","message":"invalid x-api-key"}}',

87+

),

88+

),

89+

).toBe(true);

90+

expect(isProviderAuthError(new Error("model timed out"))).toBe(false);

91+

});

92+

});