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

推荐订阅源

人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
月光博客
月光博客
雷峰网
雷峰网
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
MongoDB | Blog
MongoDB | Blog
V
V2EX
博客园 - 【当耐特】
GbyAI
GbyAI
Stack Overflow Blog
Stack Overflow Blog
I
InfoQ
Martin Fowler
Martin Fowler
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Hugging Face - Blog
Hugging Face - Blog
B
Blog
V
Visual Studio Blog
D
DataBreaches.Net
C
Check Point Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
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: retry update channel persistence · openclaw/openclaw...
steipete · 2026-05-01 · via Recent Commits to openclaw:main

@@ -61,6 +61,15 @@ vi.mock("../infra/openclaw-root.js", () => ({

6161

}));

62626363

vi.mock("../config/config.js", () => ({

64+

ConfigMutationConflictError: class ConfigMutationConflictError extends Error {

65+

readonly currentHash: string | null;

66+67+

constructor(message: string, params: { currentHash: string | null }) {

68+

super(message);

69+

this.name = "ConfigMutationConflictError";

70+

this.currentHash = params.currentHash;

71+

}

72+

},

6473

readConfigFileSnapshot: vi.fn(),

6574

replaceConfigFile: vi.fn(),

6675

resolveGatewayPort: vi.fn(() => 18789),

@@ -226,7 +235,8 @@ vi.mock("../runtime.js", () => ({

226235227236

const { runGatewayUpdate } = await import("../infra/update-runner.js");

228237

const { resolveOpenClawPackageRoot } = await import("../infra/openclaw-root.js");

229-

const { readConfigFileSnapshot, replaceConfigFile } = await import("../config/config.js");

238+

const { ConfigMutationConflictError, readConfigFileSnapshot, replaceConfigFile } =

239+

await import("../config/config.js");

230240

const { checkUpdateStatus, fetchNpmPackageTargetStatus, fetchNpmTagVersion, resolveNpmChannelTag } =

231241

await import("../infra/update-check.js");

232242

const { runCommandWithTimeout } = await import("../process/exec.js");

@@ -757,6 +767,78 @@ describe("update-cli", () => {

757767

);

758768

});

759769770+

it("post-core resume mode retries update channel persistence after config hash drift", async () => {

771+

vi.mocked(readConfigFileSnapshot)

772+

.mockResolvedValueOnce({

773+

...baseSnapshot,

774+

parsed: { update: { channel: "stable" } },

775+

resolved: { update: { channel: "stable" } } as OpenClawConfig,

776+

sourceConfig: { update: { channel: "stable" } } as OpenClawConfig,

777+

runtimeConfig: { update: { channel: "stable" } } as OpenClawConfig,

778+

config: { update: { channel: "stable" } } as OpenClawConfig,

779+

hash: "stable-hash",

780+

})

781+

.mockResolvedValueOnce({

782+

...baseSnapshot,

783+

parsed: {

784+

meta: { lastTouchedVersion: "2026.4.30" },

785+

update: { channel: "stable" },

786+

},

787+

resolved: {

788+

meta: { lastTouchedVersion: "2026.4.30" },

789+

update: { channel: "stable" },

790+

} as OpenClawConfig,

791+

sourceConfig: {

792+

meta: { lastTouchedVersion: "2026.4.30" },

793+

update: { channel: "stable" },

794+

} as OpenClawConfig,

795+

runtimeConfig: {

796+

meta: { lastTouchedVersion: "2026.4.30" },

797+

update: { channel: "stable" },

798+

} as OpenClawConfig,

799+

config: {

800+

meta: { lastTouchedVersion: "2026.4.30" },

801+

update: { channel: "stable" },

802+

} as OpenClawConfig,

803+

hash: "newer-hash",

804+

});

805+

vi.mocked(replaceConfigFile)

806+

.mockRejectedValueOnce(

807+

new ConfigMutationConflictError("config changed since last load", {

808+

currentHash: "newer-hash",

809+

}),

810+

)

811+

.mockResolvedValueOnce({} as Awaited<ReturnType<typeof replaceConfigFile>>);

812+813+

await withEnvAsync(

814+

{

815+

OPENCLAW_UPDATE_POST_CORE: "1",

816+

OPENCLAW_UPDATE_POST_CORE_CHANNEL: "dev",

817+

OPENCLAW_UPDATE_POST_CORE_REQUESTED_CHANNEL: "dev",

818+

},

819+

async () => {

820+

await updateCommand({ restart: false });

821+

},

822+

);

823+824+

expect(replaceConfigFile).toHaveBeenCalledTimes(2);

825+

expect(replaceConfigFile).toHaveBeenLastCalledWith({

826+

nextConfig: {

827+

meta: { lastTouchedVersion: "2026.4.30" },

828+

update: { channel: "dev" },

829+

},

830+

baseHash: "newer-hash",

831+

});

832+

expect(syncPluginsForUpdateChannel).toHaveBeenCalledWith(

833+

expect.objectContaining({

834+

config: expect.objectContaining({

835+

meta: expect.objectContaining({ lastTouchedVersion: "2026.4.30" }),

836+

update: expect.objectContaining({ channel: "dev" }),

837+

}),

838+

}),

839+

);

840+

});

841+760842

it("passes the update timeout budget into post-core plugin updates", async () => {

761843

await withEnvAsync(

762844

{