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

推荐订阅源

罗磊的独立博客
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
MyScale Blog
MyScale Blog
M
MIT News - Artificial intelligence
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
T
The Blog of Author Tim Ferriss
Martin Fowler
Martin Fowler
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
Google DeepMind News
Google DeepMind News
C
Check Point Blog
Last Week in AI
Last Week in AI
F
Fortinet All Blogs
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
H
Help Net Security
GbyAI
GbyAI
云风的 BLOG
云风的 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
test: tighten restart handoff assertions · openclaw/openc...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -47,7 +47,7 @@ describe("gateway restart handoff", () => {

4747

it("writes a supervisor handoff for an exited gateway process", () => {

4848

const env = createHandoffEnv();

494950-

const handoff = writeGatewayRestartHandoffSync({

50+

const handoff = expectWrittenHandoff({

5151

env,

5252

pid: 12_345,

5353

processInstanceId: "gateway-instance-1",

@@ -57,23 +57,20 @@ describe("gateway restart handoff", () => {

5757

createdAt: 1_000,

5858

});

595960-

expect(handoff).toMatchObject({

61-

kind: GATEWAY_SUPERVISOR_RESTART_HANDOFF_KIND,

62-

version: 1,

63-

pid: 12_345,

64-

processInstanceId: "gateway-instance-1",

65-

reason: "plugin source changed",

66-

source: "plugin-change",

67-

restartKind: "full-process",

68-

supervisorMode: "launchd",

69-

createdAt: 1_000,

70-

expiresAt: 61_000,

71-

});

60+

expect(handoff.kind).toBe(GATEWAY_SUPERVISOR_RESTART_HANDOFF_KIND);

61+

expect(handoff.version).toBe(1);

62+

expect(handoff.pid).toBe(12_345);

63+

expect(handoff.processInstanceId).toBe("gateway-instance-1");

64+

expect(handoff.reason).toBe("plugin source changed");

65+

expect(handoff.source).toBe("plugin-change");

66+

expect(handoff.restartKind).toBe("full-process");

67+

expect(handoff.supervisorMode).toBe("launchd");

68+

expect(handoff.createdAt).toBe(1_000);

69+

expect(handoff.expiresAt).toBe(61_000);

7270

expect(fs.statSync(handoffPath(env)).mode & 0o777).toBe(0o600);

73-

expect(readGatewayRestartHandoffSync(env, 1_500)).toMatchObject({

74-

pid: 12_345,

75-

reason: "plugin source changed",

76-

});

71+

const persisted = readGatewayRestartHandoffSync(env, 1_500);

72+

expect(persisted?.pid).toBe(12_345);

73+

expect(persisted?.reason).toBe("plugin source changed");

7774

});

78757976

it("consumes a fresh handoff by exited pid instead of current process pid", () => {

@@ -88,18 +85,15 @@ describe("gateway restart handoff", () => {

8885

createdAt: 2_000,

8986

});

908791-

expect(

92-

consumeGatewayRestartHandoffForExitedProcessSync({

93-

env,

94-

exitedPid: process.pid + 1,

95-

now: 2_001,

96-

}),

97-

).toMatchObject({

98-

pid: process.pid + 1,

99-

source: "gateway-update",

100-

restartKind: "update-process",

101-

supervisorMode: "systemd",

88+

const consumed = consumeGatewayRestartHandoffForExitedProcessSync({

89+

env,

90+

exitedPid: process.pid + 1,

91+

now: 2_001,

10292

});

93+

expect(consumed?.pid).toBe(process.pid + 1);

94+

expect(consumed?.source).toBe("gateway-update");

95+

expect(consumed?.restartKind).toBe("update-process");

96+

expect(consumed?.supervisorMode).toBe("systemd");

10397

expect(fs.existsSync(handoffPath(env))).toBe(false);

10498

});

10599

@@ -247,8 +241,8 @@ describe("gateway restart handoff", () => {

247241

consumeGatewayRestartHandoffForExitedProcessSync({

248242

env,

249243

exitedPid: 12_345,

250-

}),

251-

).toMatchObject({ pid: 12_345 });

244+

})?.pid,

245+

).toBe(12_345);

252246

});

253247254248

it("formats a concise diagnostic line for status surfaces", () => {