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

推荐订阅源

Google DeepMind News
Google DeepMind News
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
M
MIT News - Artificial intelligence
D
Docker
量子位
T
Tailwind CSS Blog
人人都是产品经理
人人都是产品经理
月光博客
月光博客
有赞技术团队
有赞技术团队
J
Java Code Geeks
A
About on SuperTechFans
P
Proofpoint News Feed
Jina AI
Jina AI
Y
Y Combinator Blog
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
Microsoft Security Blog
Microsoft Security Blog
V
V2EX
GbyAI
GbyAI
F
Fortinet All Blogs

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(gateway): avoid restarts for auth cooldown reloads · ...
IWhatsskill · 2026-05-31 · via Recent Commits to openclaw:main

@@ -411,6 +411,20 @@ describe("buildGatewayReloadPlan", () => {

411411

expect(plan.noopPaths).toStrictEqual([]);

412412

});

413413414+

it("hot-reloads auth cooldown changes without a gateway restart", () => {

415+

const changedPaths = [

416+

"auth.cooldowns.billingBackoffHours",

417+

"auth.cooldowns.billingBackoffHoursByProvider.anthropic",

418+

];

419+

const plan = buildGatewayReloadPlan(changedPaths);

420+421+

expect(plan.restartGateway).toBe(false);

422+

expect(plan.restartReasons).toStrictEqual([]);

423+

expect(plan.hotReasons).toStrictEqual(changedPaths);

424+

expect(plan.noopPaths).toStrictEqual([]);

425+

expect(resolveConfigReloadMetadata("auth.cooldowns.billingBackoffHours").kind).toBe("hot");

426+

});

427+414428

it("restarts for gateway.auth.token changes", () => {

415429

const plan = buildGatewayReloadPlan(["gateway.auth.token"]);

416430

expect(plan.restartGateway).toBe(true);

@@ -464,6 +478,11 @@ describe("buildGatewayReloadPlan", () => {

464478

expectRestartGateway: false,

465479

expectNoopPath: "gateway.remote.url",

466480

},

481+

{

482+

path: "auth.cooldowns.billingBackoffHours",

483+

expectRestartGateway: false,

484+

expectHotPath: "auth.cooldowns.billingBackoffHours",

485+

},

467486

{

468487

path: "gateway.auth.token",

469488

expectRestartGateway: true,

@@ -1334,6 +1353,57 @@ describe("startGatewayConfigReloader", () => {

13341353

await harness.reloader.stop();

13351354

});

133613551356+

it("keeps external auth cooldown writes on the hot reload path", async () => {

1357+

const previousConfig: OpenClawConfig = {

1358+

gateway: { reload: { debounceMs: 0 } },

1359+

auth: {

1360+

cooldowns: {

1361+

billingBackoffHours: 1,

1362+

billingBackoffHoursByProvider: { anthropic: 2 },

1363+

},

1364+

},

1365+

};

1366+

const nextConfig: OpenClawConfig = {

1367+

gateway: { reload: { debounceMs: 0 } },

1368+

auth: {

1369+

cooldowns: {

1370+

billingBackoffHours: 3,

1371+

billingBackoffHoursByProvider: { anthropic: 4 },

1372+

},

1373+

},

1374+

};

1375+

const readSnapshot = vi.fn<() => Promise<ConfigFileSnapshot>>().mockResolvedValueOnce(

1376+

makeSnapshot({

1377+

sourceConfig: nextConfig,

1378+

runtimeConfig: nextConfig,

1379+

config: nextConfig,

1380+

hash: "external-auth-cooldowns-1",

1381+

}),

1382+

);

1383+

const harness = createReloaderHarness(readSnapshot, {

1384+

initialCompareConfig: previousConfig,

1385+

});

1386+1387+

harness.watcher.emit("change");

1388+

await vi.runOnlyPendingTimersAsync();

1389+1390+

expect(harness.onRestart).not.toHaveBeenCalled();

1391+

const [plan, hotConfig] = getOnlyHotReloadCall(harness);

1392+

expect(plan.changedPaths).toEqual([

1393+

"auth.cooldowns.billingBackoffHours",

1394+

"auth.cooldowns.billingBackoffHoursByProvider.anthropic",

1395+

]);

1396+

expect(plan.restartGateway).toBe(false);

1397+

expect(plan.hotReasons).toEqual([

1398+

"auth.cooldowns.billingBackoffHours",

1399+

"auth.cooldowns.billingBackoffHoursByProvider.anthropic",

1400+

]);

1401+

expect(plan.noopPaths).toStrictEqual([]);

1402+

expect(hotConfig).toBe(nextConfig);

1403+1404+

await harness.reloader.stop();

1405+

});

1406+13371407

it("queues restart when an external plugin source write also changes plugin config", async () => {

13381408

const previousConfig: OpenClawConfig = {

13391409

gateway: { reload: { debounceMs: 0 } },