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

推荐订阅源

G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
V
Visual Studio Blog
雷峰网
雷峰网
博客园_首页
The Cloudflare Blog
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
小众软件
小众软件
D
Docker
P
Proofpoint News Feed
B
Blog
Vercel News
Vercel News
B
Blog RSS Feed
U
Unit 42
月光博客
月光博客
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
Y
Y Combinator Blog
I
InfoQ
Recent Announcements
Recent Announcements

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: name gateway lifecycle payloads · openclaw/openclaw...
shakkernerd · 2026-05-12 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -201,9 +201,7 @@ describe("createGatewayCloseHandler", () => {

201201

await close({ reason: "SIGTERM" });

202202
203203

expect(drainActiveSessionsForShutdown).toHaveBeenCalledTimes(1);

204-

expect(drainActiveSessionsForShutdown.mock.calls[0][0]).toMatchObject({

205-

reason: "shutdown",

206-

});

204+

expect(drainActiveSessionsForShutdown.mock.calls[0]?.[0]?.reason).toBe("shutdown");

207205

});

208206
209207

it("drains the active-session tracker with reason=restart when restartExpectedMs is set", async () => {

@@ -218,9 +216,7 @@ describe("createGatewayCloseHandler", () => {

218216

await close({ reason: "gateway restarting", restartExpectedMs: 1234 });

219217
220218

expect(drainActiveSessionsForShutdown).toHaveBeenCalledTimes(1);

221-

expect(drainActiveSessionsForShutdown.mock.calls[0][0]).toMatchObject({

222-

reason: "restart",

223-

});

219+

expect(drainActiveSessionsForShutdown.mock.calls[0]?.[0]?.reason).toBe("restart");

224220

});

225221
226222

it("records a warning and continues shutdown when the session-end drain reports a timeout", async () => {

Original file line numberDiff line numberDiff line change

@@ -707,10 +707,9 @@ describe("buildGatewayCronService", () => {

707707

expect((enqueueCall?.[1] as { sessionKey?: string } | undefined)?.sessionKey).toBe(

708708

"agent:primary:discord:channel:ops",

709709

);

710-

expect(wakeCall?.[0]).toMatchObject({

711-

agentId: "primary",

712-

sessionKey: "agent:primary:discord:channel:ops",

713-

});

710+

const wakeRequest = wakeCall?.[0] as { agentId?: string; sessionKey?: string } | undefined;

711+

expect(wakeRequest?.agentId).toBe("primary");

712+

expect(wakeRequest?.sessionKey).toBe("agent:primary:discord:channel:ops");

714713

} finally {

715714

state.cron.stop();

716715

}

@@ -768,10 +767,9 @@ describe("buildGatewayCronService", () => {

768767

expect((enqueueCall?.[1] as { sessionKey?: string } | undefined)?.sessionKey).toBe(

769768

"agent:primary:main",

770769

);

771-

expect(wakeCall?.[0]).toMatchObject({

772-

agentId: "primary",

773-

sessionKey: "agent:primary:main",

774-

});

770+

const wakeRequest = wakeCall?.[0] as { agentId?: string; sessionKey?: string } | undefined;

771+

expect(wakeRequest?.agentId).toBe("primary");

772+

expect(wakeRequest?.sessionKey).toBe("agent:primary:main");

775773

} finally {

776774

state.cron.stop();

777775

}

@@ -813,15 +811,20 @@ describe("buildGatewayCronService", () => {

813811

expect((enqueueCall?.[1] as { sessionKey?: string } | undefined)?.sessionKey).toMatch(

814812

/^agent:ops:/,

815813

);

816-

expect(wakeCall?.[0]).toMatchObject({

817-

source: "manual",

818-

intent: "immediate",

819-

reason: "wake",

820-

agentId: "ops",

821-

});

822-

expect((wakeCall?.[0] as { sessionKey?: string } | undefined)?.sessionKey).toMatch(

823-

/^agent:ops:/,

824-

);

814+

const wakeRequest = wakeCall?.[0] as

815+

| {

816+

source?: string;

817+

intent?: string;

818+

reason?: string;

819+

agentId?: string;

820+

sessionKey?: string;

821+

}

822+

| undefined;

823+

expect(wakeRequest?.source).toBe("manual");

824+

expect(wakeRequest?.intent).toBe("immediate");

825+

expect(wakeRequest?.reason).toBe("wake");

826+

expect(wakeRequest?.agentId).toBe("ops");

827+

expect(wakeRequest?.sessionKey).toMatch(/^agent:ops:/);

825828

} finally {

826829

state.cron.stop();

827830

}