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

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
S
SegmentFault 最新的问题
大猫的无限游戏
大猫的无限游戏
The GitHub Blog
The GitHub Blog
M
MIT News - Artificial intelligence
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
H
Help Net Security
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
阮一峰的网络日志
阮一峰的网络日志
J
Java Code Geeks
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
F
Fortinet All Blogs
腾讯CDC
博客园 - Franky
WordPress大学
WordPress大学
U
Unit 42

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 patch restart-required notices · openclaw/open...
xuruiray · 2026-06-22 · via Recent Commits to openclaw:main

@@ -194,6 +194,36 @@ describe("restart sentinel", () => {

194194

});

195195

});

196196197+

it("keeps old config restart sentinels readable without restart-required stats", async () => {

198+

await withRestartSentinelStateDir(async () => {

199+

const filePath = path.join(process.env.OPENCLAW_STATE_DIR ?? "", "restart-sentinel.json");

200+

const payload = {

201+

kind: "config-patch" as const,

202+

status: "ok" as const,

203+

ts: Date.now(),

204+

message: "Config updated successfully",

205+

stats: { mode: "config.patch" },

206+

};

207+

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

208+

await fs.writeFile(filePath, JSON.stringify({ version: 1, payload }, null, 2), "utf-8");

209+210+

const read = await readRestartSentinel();

211+212+

expect(read?.payload).toEqual(payload);

213+

if (!read) {

214+

throw new Error("Expected old restart sentinel to be readable");

215+

}

216+

expect(summarizeRestartSentinel(read.payload)).toBe(

217+

"Gateway restart config-patch ok (config.patch)",

218+

);

219+

expect(formatRestartSentinelMessage(read.payload)).toBe(

220+

["Gateway restart config-patch ok (config.patch)", "Config updated successfully"].join(

221+

"\n",

222+

),

223+

);

224+

});

225+

});

226+197227

it("formatRestartSentinelMessage uses custom message when present", () => {

198228

const payload = {

199229

kind: "config-apply" as const,

@@ -242,6 +272,48 @@ describe("restart sentinel", () => {

242272

expect(result).toContain("Gateway restart");

243273

});

244274275+

it("formats config write success notices as restart required when marked", () => {

276+

const payload = {

277+

kind: "config-patch" as const,

278+

status: "ok" as const,

279+

ts: Date.now(),

280+

message: "Run restart-gateway.ps1 to apply config changes.",

281+

doctorHint: "Run openclaw doctor --non-interactive",

282+

stats: { mode: "config.patch", requiresRestart: true },

283+

};

284+285+

expect(formatRestartSentinelMessage(payload)).toBe(

286+

[

287+

"Gateway restart required (config.patch)",

288+

"Run restart-gateway.ps1 to apply config changes.",

289+

"Run openclaw doctor --non-interactive",

290+

].join("\n"),

291+

);

292+

expect(summarizeRestartSentinel(payload)).toBe("Gateway restart required (config.patch)");

293+294+

expect(

295+

summarizeRestartSentinel({

296+

kind: "config-apply",

297+

status: "ok",

298+

ts: Date.now(),

299+

stats: { mode: "config.apply", requiresRestart: true },

300+

}),

301+

).toBe("Gateway restart required (config.apply)");

302+

});

303+304+

it("does not mark hot-reloaded config patch notices as restart required", () => {

305+

const payload = {

306+

kind: "config-patch" as const,

307+

status: "ok" as const,

308+

ts: Date.now(),

309+

stats: { mode: "config.patch", requiresRestart: false },

310+

};

311+312+

expect(summarizeRestartSentinel(payload)).toBe(

313+

"Gateway restart config-patch ok (config.patch)",

314+

);

315+

});

316+245317

it("formats summary, distinct reason, and doctor hint together", () => {

246318

const payload = {

247319

kind: "config-patch" as const,