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

推荐订阅源

Microsoft Security Blog
Microsoft Security Blog
Jina AI
Jina AI
量子位
博客园 - 叶小钗
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
S
SegmentFault 最新的问题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
博客园 - 聂微东
美团技术团队
Last Week in AI
Last Week in AI
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园_首页
V
Visual Studio Blog
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog

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(config): avoid env-ref reload restarts · openclaw/ope...
steipete · 2026-04-25 · via Recent Commits to openclaw:main

@@ -5,6 +5,7 @@ import type { PluginManifestRegistry } from "../plugins/manifest-registry.js";

55

import { createSuiteTempRootTracker } from "../test-helpers/temp-dir.js";

66

import {

77

createConfigIO,

8+

registerConfigWriteListener,

89

resetConfigRuntimeState,

910

setRuntimeConfigSnapshot,

1011

writeConfigFile,

@@ -532,4 +533,92 @@ describe("config io write", () => {

532533

}

533534

});

534535

});

536+537+

it("notifies in-process reloaders with resolved source config when persisted env refs are restored", async () => {

538+

await withSuiteHome(async (home) => {

539+

const configPath = path.join(home, ".openclaw", "openclaw.json");

540+

const previousConfigPath = process.env.OPENCLAW_CONFIG_PATH;

541+

const previousGatewayToken = process.env.OPENCLAW_GATEWAY_TOKEN;

542+

process.env.OPENCLAW_CONFIG_PATH = configPath;

543+

process.env.OPENCLAW_GATEWAY_TOKEN = "gateway-token-runtime";

544+

await fs.mkdir(path.dirname(configPath), { recursive: true });

545+

await fs.writeFile(

546+

configPath,

547+

`${JSON.stringify(

548+

{

549+

gateway: {

550+

mode: "local",

551+

auth: { mode: "token", token: "${OPENCLAW_GATEWAY_TOKEN}" },

552+

},

553+

agents: { defaults: { model: { primary: "openai/gpt-5.4" } } },

554+

},

555+

null,

556+

2,

557+

)}\n`,

558+

"utf-8",

559+

);

560+

const observedSources: unknown[] = [];

561+

const unsubscribe = registerConfigWriteListener((event) => {

562+

observedSources.push(event.sourceConfig);

563+

});

564+565+

try {

566+

setRuntimeConfigSnapshot(

567+

{

568+

gateway: {

569+

mode: "local",

570+

auth: { mode: "token", token: "gateway-token-runtime" },

571+

},

572+

agents: { defaults: { model: { primary: "openai/gpt-5.4" } } },

573+

},

574+

{

575+

gateway: {

576+

mode: "local",

577+

auth: { mode: "token", token: "gateway-token-runtime" },

578+

},

579+

agents: { defaults: { model: { primary: "openai/gpt-5.4" } } },

580+

},

581+

);

582+583+

await writeConfigFile({

584+

gateway: {

585+

mode: "local",

586+

auth: { mode: "token", token: "gateway-token-runtime" },

587+

},

588+

agents: { defaults: { model: { primary: "openrouter/anthropic/claude-sonnet-4.6" } } },

589+

});

590+591+

expect(JSON.parse(await fs.readFile(configPath, "utf-8"))).toMatchObject({

592+

gateway: {

593+

auth: { token: "${OPENCLAW_GATEWAY_TOKEN}" },

594+

},

595+

});

596+

expect(observedSources).toEqual([

597+

expect.objectContaining({

598+

gateway: {

599+

mode: "local",

600+

auth: { mode: "token", token: "gateway-token-runtime" },

601+

},

602+

agents: {

603+

defaults: {

604+

model: { primary: "openrouter/anthropic/claude-sonnet-4.6" },

605+

},

606+

},

607+

}),

608+

]);

609+

} finally {

610+

unsubscribe();

611+

if (previousConfigPath === undefined) {

612+

delete process.env.OPENCLAW_CONFIG_PATH;

613+

} else {

614+

process.env.OPENCLAW_CONFIG_PATH = previousConfigPath;

615+

}

616+

if (previousGatewayToken === undefined) {

617+

delete process.env.OPENCLAW_GATEWAY_TOKEN;

618+

} else {

619+

process.env.OPENCLAW_GATEWAY_TOKEN = previousGatewayToken;

620+

}

621+

}

622+

});

623+

});

535624

});